diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index af827785424..3354ee1c842 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,5 +4,5 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -# The @googleapis/spanner-client-libraries-java is the default owner for changes in this repo -* @googleapis/yoshi-java @googleapis/spanner-client-libraries-java +# The @googleapis/spanner-team is the default owner for changes in this repo +* @googleapis/cloud-sdk-java-team @googleapis/spanner-team diff --git a/.github/release-please.yml b/.github/release-please.yml index c206376de63..5ddaeef6217 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -3,54 +3,29 @@ bumpMinorPreMajor: true handleGHRelease: true branches: - branch: 3.3.x - releaseType: java-yoshi - bumpMinorPreMajor: true - handleGHRelease: true - branch: 4.0.x - releaseType: java-yoshi - bumpMinorPreMajor: true - handleGHRelease: true - branch: 5.2.x - releaseType: java-yoshi - bumpMinorPreMajor: true - handleGHRelease: true - - releaseType: java-lts - bumpMinorPreMajor: true - handleGHRelease: true - branch: 6.4.4-sp - - releaseType: java-backport - bumpMinorPreMajor: true - handleGHRelease: true - branch: 6.14.x - - releaseType: java-yoshi - bumpMinorPreMajor: true - handleGHRelease: true - branch: 6.23.x - - releaseType: java-yoshi - bumpMinorPreMajor: true - handleGHRelease: true - branch: 6.33.x - - releaseType: java-backport - bumpMinorPreMajor: true - handleGHRelease: true - branch: 6.55.x - - releaseType: java-backport - bumpMinorPreMajor: true - handleGHRelease: true - branch: 6.67.x - - releaseType: java-backport - bumpMinorPreMajor: true - handleGHRelease: true - branch: 6.66.x - - releaseType: java-backport - bumpMinorPreMajor: true - handleGHRelease: true - branch: 6.88.x - - releaseType: java-backport - bumpMinorPreMajor: true - handleGHRelease: true - branch: 6.96.x + - branch: 6.4.4-sp + releaseType: java-lts + - branch: 6.14.x + releaseType: java-backport + - branch: 6.23.x + - branch: 6.33.x + - branch: 6.55.x + releaseType: java-backport + - branch: 6.67.x + releaseType: java-backport + - branch: 6.66.x + releaseType: java-backport + - branch: 6.88.x + releaseType: java-backport + - branch: 6.96.x + releaseType: java-backport + - branch: 6.95.x + releaseType: java-backport + - branch: protobuf-4.x-rc + manifest: true - releaseType: java-backport bumpMinorPreMajor: true handleGHRelease: true - branch: 6.95.x + branch: 6.109.x diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index 92efcf88191..74d0e6cc410 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -18,7 +18,17 @@ function get_latest_released_version() { group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" url="iframe.php?url=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F%24%7Bgroup_id_url_path%7D%2F%24%7Bartifact_id%7D%2Fmaven-metadata.xml" xml_content=$(curl -s --fail "${url}") - latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") + + # 1. Extract all version tags + # 2. Strip the XML tags to leave just the version numbers + # 3. Filter for strictly numbers.numbers.numbers (e.g., 2.54.0) + # 4. Sort by version (V) and take the last one (tail -n 1) + latest=$(echo "${xml_content}" \ + | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' \ + | sed -E 's/<[^>]+>//g' \ + | sort -V \ + | tail -n 1) + if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 39ea467f10b..66933646d40 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -14,13 +14,10 @@ branchProtectionRules: - units (8) - units (11) - 'Kokoro - Test: Integration' - - 'Kokoro - Test: Integration with Multiplexed Sessions' - cla/google - checkstyle - compile (8) - compile (11) - - units-with-multiplexed-session (8) - - units-with-multiplexed-session (11) - unmanaged_dependency_check - library_generation - pattern: 3.3.x @@ -154,7 +151,6 @@ branchProtectionRules: - units (8) - units (11) - 'Kokoro - Test: Integration' - - 'Kokoro - Test: Integration with Multiplexed Sessions' - cla/google - checkstyle - compile (8) @@ -173,7 +169,6 @@ branchProtectionRules: - units (8) - units (11) - 'Kokoro - Test: Integration' - - 'Kokoro - Test: Integration with Multiplexed Sessions' - cla/google - checkstyle - compile (8) @@ -194,7 +189,6 @@ branchProtectionRules: - units (8) - units (11) - 'Kokoro - Test: Integration' - - 'Kokoro - Test: Integration with Multiplexed Sessions' - cla/google - checkstyle - compile (8) @@ -215,7 +209,6 @@ branchProtectionRules: - units (8) - units (11) - 'Kokoro - Test: Integration' - - 'Kokoro - Test: Integration with Multiplexed Sessions' - cla/google - checkstyle - compile (8) @@ -224,6 +217,24 @@ branchProtectionRules: - units-with-multiplexed-session (11) - unmanaged_dependency_check - library_generation + - pattern: 6.109.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - dependencies (17) + - lint + - javadoc + - units (8) + - units (11) + - 'Kokoro - Test: Integration' + - cla/google + - checkstyle + - compile (8) + - compile (11) + - unmanaged_dependency_check + - library_generation permissionRules: - team: yoshi-admins permission: admin diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e2e6881c783..ae7ec53f5d7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,41 +36,6 @@ jobs: - run: .kokoro/build.sh env: JOB_TYPE: test - units-with-multiplexed-session: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - java: [ 11, 17, 21 ] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: test - GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS: true - GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW: true - units-with-regular-session: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - java: [ 11, 17, 21 ] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: test - GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: false units-java8: # Building using Java 17 and run the tests with Java 8 runtime name: "units (8)" @@ -90,48 +55,6 @@ jobs: - run: .kokoro/build.sh env: JOB_TYPE: test - units-with-multiplexed-session8: - # Building using Java 17 and run the tests with Java 8 runtime - name: "units-with-multiplexed-session (8)" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - java-version: 8 - distribution: temurin - - run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV - shell: bash - - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: temurin - - run: .kokoro/build.sh - env: - JOB_TYPE: test - GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true - GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS: true - GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW: true - units-with-regular-session8: - # Building using Java 17 and run the tests with Java 8 runtime - name: "units-with-regular-session (8)" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - java-version: 8 - distribution: temurin - - run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV - shell: bash - - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: temurin - - run: .kokoro/build.sh - env: - JOB_TYPE: test - GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: false windows: runs-on: windows-latest steps: diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml index 7023350ad0a..e8f02234113 100644 --- a/.github/workflows/hermetic_library_generation.yaml +++ b/.github/workflows/hermetic_library_generation.yaml @@ -32,14 +32,14 @@ jobs: else echo "SHOULD_RUN=true" >> $GITHUB_ENV fi - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 if: env.SHOULD_RUN == 'true' with: fetch-depth: 0 - token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - uses: googleapis/sdk-platform-java/.github/scripts@v2.63.0 + token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} + - uses: googleapis/sdk-platform-java/.github/scripts@v2.68.0 if: env.SHOULD_RUN == 'true' with: base_ref: ${{ github.base_ref }} head_ref: ${{ github.head_ref }} - token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/integration-tests-against-emulator-with-regular-session.yaml b/.github/workflows/integration-tests-against-emulator-with-regular-session.yaml deleted file mode 100644 index 371620cf5a6..00000000000 --- a/.github/workflows/integration-tests-against-emulator-with-regular-session.yaml +++ /dev/null @@ -1,42 +0,0 @@ -on: - push: - branches: - - main - pull_request: -name: integration-tests-against-emulator-with-multiplexed-session -jobs: - units: - runs-on: ubuntu-latest - - services: - emulator: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - 9020:9020 - - steps: - - uses: actions/checkout@v5 - - uses: stCarolas/setup-maven@v5 - with: - maven-version: 3.8.1 - # Build with JDK 11 and run tests with JDK 8 - - uses: actions/setup-java@v5 - with: - java-version: 11 - distribution: temurin - - name: Compiling main library - run: .kokoro/build.sh - - uses: actions/setup-java@v5 - with: - java-version: 8 - distribution: temurin - - name: Running tests - run: | - mvn -V -B -Dspanner.testenv.instance="" -Penable-integration-tests \ - -DtrimStackTrace=false -Dclirr.skip=true -Denforcer.skip=true \ - -Dmaven.main.skip=true -fae verify - env: - JOB_TYPE: test - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: false \ No newline at end of file diff --git a/.github/workflows/integration-tests-against-emulator.yaml b/.github/workflows/integration-tests-against-emulator.yaml index cd677dd1a6a..c1f81dd8f2b 100644 --- a/.github/workflows/integration-tests-against-emulator.yaml +++ b/.github/workflows/integration-tests-against-emulator.yaml @@ -16,7 +16,7 @@ jobs: - 9020:9020 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: stCarolas/setup-maven@v5 with: maven-version: 3.8.1 diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml index 704023d16cb..fc713448ef8 100644 --- a/.github/workflows/unmanaged_dependency_check.yaml +++ b/.github/workflows/unmanaged_dependency_check.yaml @@ -5,7 +5,7 @@ jobs: unmanaged_dependency_check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-java@v5 with: distribution: temurin @@ -17,6 +17,6 @@ jobs: # repository .kokoro/build.sh - name: Unmanaged dependency check - uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.53.0 + uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.58.0 with: bom-path: google-cloud-spanner-bom/pom.xml diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index a7e14bb483c..8de9d67eae7 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} - name: Install Dependencies shell: bash run: sudo apt-get update && sudo apt-get install -y libxml2-utils @@ -43,5 +43,5 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} diff --git a/.kokoro/build.sh b/.kokoro/build.sh index eb66097a4f1..caeff7a8b95 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -104,21 +104,6 @@ integration) verify RETURN_CODE=$? ;; -integration-regular-sessions) - mvn -B ${INTEGRATION_TEST_ARGS} \ - -ntp \ - -Penable-integration-tests \ - -Djava.net.preferIPv4Stack=true \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.main.skip=true \ - -Dspanner.gce.config.project_id=gcloud-devel \ - -Dspanner.testenv.instance=projects/gcloud-devel/instances/java-client-integration-tests-regular-sessions \ - -fae \ - verify - RETURN_CODE=$? - ;; integration-directpath-enabled) mvn -B ${INTEGRATION_TEST_ARGS} \ -ntp \ diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index 55c5543e260..de4ac9dbfa6 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current} + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.58.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 5c981b98482..d8ae3b32223 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current} + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.58.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-c.cfg b/.kokoro/presubmit/graalvm-native-c.cfg index f2032499dff..0e9d1203a7e 100644 --- a/.kokoro/presubmit/graalvm-native-c.cfg +++ b/.kokoro/presubmit/graalvm-native-c.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.53.0" # {x-version-update:google-cloud-shared-dependencies:current} + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.58.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { diff --git a/.kokoro/presubmit/integration-regular-sessions-enabled.cfg b/.kokoro/presubmit/integration-regular-sessions-enabled.cfg deleted file mode 100644 index b454868ebf1..00000000000 --- a/.kokoro/presubmit/integration-regular-sessions-enabled.cfg +++ /dev/null @@ -1,48 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration-regular-sessions" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} - -env_vars: { - key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS" - value: "false" -} - -env_vars: { - key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS" - value: "false" -} - -env_vars: { - key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW" - value: "false" -} diff --git a/.readme-partials.yaml b/.readme-partials.yaml index 65ae24d8b58..392f727e622 100644 --- a/.readme-partials.yaml +++ b/.readme-partials.yaml @@ -52,217 +52,30 @@ custom_content: | ## Metrics - ### Available client-side metrics: - - * `spanner/max_in_use_sessions`: This returns the maximum - number of sessions that have been in use during the last maintenance window - interval, so as to provide an indication of the amount of activity currently - in the database. - - * `spanner/max_allowed_sessions`: This shows the maximum - number of sessions allowed. - - * `spanner/num_sessions_in_pool`: This metric allows users to - see instance-level and database-level data for the total number of sessions in - the pool at this very moment. - - * `spanner/num_acquired_sessions`: This metric allows - users to see the total number of acquired sessions. - - * `spanner/num_released_sessions`: This metric allows - users to see the total number of released (destroyed) sessions. - - * `spanner/get_session_timeouts`: This gives you an - indication of the total number of get session timed-out instead of being - granted (the thread that requested the session is placed in a wait queue where - it waits until a session is released into the pool by another thread) due to - pool exhaustion since the server process started. - - * `spanner/gfe_latency`: This metric shows latency between - Google's network receiving an RPC and reading back the first byte of the response. - - * `spanner/gfe_header_missing_count`: This metric shows the - number of RPC responses received without the server-timing header, most likely - indicating that the RPC never reached Google's network. - - ### Instrument with OpenTelemetry - - Cloud Spanner client supports [OpenTelemetry Metrics](https://opentelemetry.io/), - which gives insight into the client internals and aids in debugging/troubleshooting - production issues. OpenTelemetry metrics will provide you with enough data to enable you to - spot, and investigate the cause of any unusual deviations from normal behavior. - - All Cloud Spanner Metrics are prefixed with `spanner/` and uses `cloud.google.com/java` as [Instrumentation Scope](https://opentelemetry.io/docs/concepts/instrumentation-scope/). The - metrics will be tagged with: - * `database`: the target database name. - * `instance_id`: the instance id of the target Spanner instance. - * `client_id`: the user defined database client id. - - By default, the functionality is disabled. You need to add OpenTelemetry dependencies, enable OpenTelemetry metrics and must configure the OpenTelemetry with appropriate exporters at the startup of your application: - - #### OpenTelemetry Dependencies - If you are using Maven, add this to your pom.xml file - ```xml - - io.opentelemetry - opentelemetry-sdk - {opentelemetry.version} - - - io.opentelemetry - opentelemetry-sdk-metrics - {opentelemetry.version} - - - io.opentelemetry - opentelemetry-exporter-otlp - {opentelemetry.version} - - ``` - If you are using Gradle, add this to your dependencies - ```Groovy - compile 'io.opentelemetry:opentelemetry-sdk:{opentelemetry.version}' - compile 'io.opentelemetry:opentelemetry-sdk-metrics:{opentelemetry.version}' - compile 'io.opentelemetry:opentelemetry-exporter-oltp:{opentelemetry.version}' - ``` - - #### OpenTelemetry Configuration - By default, all metrics are disabled. To enable metrics and configure the OpenTelemetry follow below: - - ```java - // Enable OpenTelemetry metrics before injecting OpenTelemetry object. - SpannerOptions.enableOpenTelemetryMetrics(); - - SdkMeterProvider sdkMeterProvider = SdkMeterProvider.builder() - // Use Otlp exporter or any other exporter of your choice. - .registerMetricReader(PeriodicMetricReader.builder(OtlpGrpcMetricExporter.builder().build()) - .build()) - .build(); - - OpenTelemetry openTelemetry = OpenTelemetrySdk.builder() - .setMeterProvider(sdkMeterProvider) - .build() - - SpannerOptions options = SpannerOptions.newBuilder() - // Inject OpenTelemetry object via Spanner Options or register OpenTelemetry object as Global - .setOpenTelemetry(openTelemetry) - .build(); - - Spanner spanner = options.getService(); - ``` + Cloud Spanner client supports [client-side metrics](https://cloud.google.com/spanner/docs/view-manage-client-side-metrics) that you can use along with server-side metrics to optimize performance and troubleshoot performance issues if they occur. - #### OpenTelemetry SQL Statement Tracing - The OpenTelemetry traces that are generated by the Java client include any request and transaction - tags that have been set. The traces can also include the SQL statements that are executed and the - name of the thread that executes the statement. Enable this with the `enableExtendedTracing` - option: + Client-side metrics are measured from the time a request leaves your application to the time your application receives the response. + In contrast, server-side metrics are measured from the time Spanner receives a request until the last byte of data is sent to the client. + + These metrics are enabled by default. You can opt out of using client-side metrics with the following code: ``` SpannerOptions options = SpannerOptions.newBuilder() - .setOpenTelemetry(openTelemetry) - .setEnableExtendedTracing(true) + .setBuiltInMetricsEnabled(false) .build(); ``` - This option can also be enabled by setting the environment variable - `SPANNER_ENABLE_EXTENDED_TRACING=true`. - - #### OpenTelemetry API Tracing - You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing` - option. These traces also include any retry attempts for an API call: - - ``` - SpannerOptions options = SpannerOptions.newBuilder() - .setOpenTelemetry(openTelemetry) - .setEnableApiTracing(true) - .build(); - ``` - - This option can also be enabled by setting the environment variable - `SPANNER_ENABLE_API_TRACING=true`. + You can also disable these metrics by setting `SPANNER_DISABLE_BUILTIN_METRICS` to `true`. - > Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release. - - - ### Instrument with OpenCensus - - > Note: OpenCensus project is deprecated. See [Sunsetting OpenCensus](https://opentelemetry.io/blog/2023/sunsetting-opencensus/). - We recommend migrating to OpenTelemetry, the successor project. - - Cloud Spanner client supports [Opencensus Metrics](https://opencensus.io/stats/), - which gives insight into the client internals and aids in debugging/troubleshooting - production issues. OpenCensus metrics will provide you with enough data to enable you to - spot, and investigate the cause of any unusual deviations from normal behavior. - - All Cloud Spanner Metrics are prefixed with `cloud.google.com/java/spanner` - - The metrics are tagged with: - * `database`: the target database name. - * `instance_id`: the instance id of the target Spanner instance. - * `client_id`: the user defined database client id. - * `library_version`: the version of the library that you're using. - - - By default, the functionality is disabled. You need to include opencensus-impl - dependency to collect the data and exporter dependency to export to backend. - - [Click here](https://medium.com/google-cloud/troubleshooting-cloud-spanner-applications-with-opencensus-2cf424c4c590) for more information. - - #### OpenCensus Dependencies - - If you are using Maven, add this to your pom.xml file - ```xml - - io.opencensus - opencensus-impl - 0.30.0 - runtime - - - io.opencensus - opencensus-exporter-stats-stackdriver - 0.30.0 - - ``` - If you are using Gradle, add this to your dependencies - ```Groovy - compile 'io.opencensus:opencensus-impl:0.30.0' - compile 'io.opencensus:opencensus-exporter-stats-stackdriver:0.30.0' - ``` - - #### Configure the OpenCensus Exporter - - At the start of your application configure the exporter: - - ```java - import io.opencensus.exporter.stats.stackdriver.StackdriverStatsExporter; - // Enable OpenCensus exporters to export metrics to Stackdriver Monitoring. - // Exporters use Application Default Credentials to authenticate. - // See https://developers.google.com/identity/protocols/application-default-credentials - // for more details. - // The minimum reporting period for Stackdriver is 1 minute. - StackdriverStatsExporter.createAndRegister(); - ``` - #### Enable RPC Views - - By default, all session metrics are enabled. To enable RPC views, use either of the following method: - - ```java - // Register views for GFE metrics, including gfe_latency and gfe_header_missing_count. - SpannerRpcViews.registerGfeLatencyAndHeaderMissingCountViews(); - - // Register GFE Latency view. - SpannerRpcViews.registerGfeLatencyView(); - - // Register GFE Header Missing Count view. - SpannerRpcViews.registerGfeHeaderMissingCountView(); - ``` + > Note: Client-side metrics needs `monitoring.timeSeries.create` IAM permission to export metrics data. Ask your administrator to grant your service account the [Monitoring Metric Writer](https://cloud.google.com/iam/docs/roles-permissions/monitoring#monitoring.metricWriter) (roles/monitoring.metricWriter) IAM role on the project. ## Traces Cloud Spanner client supports OpenTelemetry Traces, which gives insight into the client internals and aids in debugging/troubleshooting production issues. By default, the functionality is disabled. You need to add OpenTelemetry dependencies, enable OpenTelemetry traces and must configure the OpenTelemetry with appropriate exporters at the startup of your application. + See [Configure client-side tracing](https://cloud.google.com/spanner/docs/set-up-tracing#configure-client-side-tracing) for more details on configuring traces. + #### OpenTelemetry Dependencies If you are using Maven, add this to your pom.xml file @@ -348,10 +161,33 @@ custom_content: | `SPANNER_ENABLE_API_TRACING=true`. > Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release. + + #### End-to-end Tracing + + In addition to client-side tracing, you can opt in for [end-to-end tracing](https://cloud.google.com/spanner/docs/tracing-overview#end-to-end-side-tracing). End-to-end tracing helps you understand and debug latency issues that are specific to Spanner such as the following: + * Identify whether the latency is due to network latency between your application and Spanner, or if the latency is occurring within Spanner. + * Identify the Google Cloud regions that your application requests are being routed through and if there is a cross-region request. A cross-region request usually means higher latencies between your application and Spanner. + + ``` + SpannerOptions options = SpannerOptions.newBuilder() + .setOpenTelemetry(openTelemetry) + .setEnableEndToEndTracing(true) + .build(); + ``` + + Refer to [Configure end-to-end tracing](https://cloud.google.com/spanner/docs/set-up-tracing#configure-end-to-end-tracing) to configure end-to-end tracing and to understand its attributes. + + > Note: End-to-end traces can only be exported to [Cloud Trace](https://cloud.google.com/trace/docs). + + + ## Instrument with OpenCensus + > Note: OpenCensus project is deprecated. See [Sunsetting OpenCensus](https://opentelemetry.io/blog/2023/sunsetting-opencensus/). + We recommend migrating to OpenTelemetry, the successor project. + ## Migrate from OpenCensus to OpenTelemetry - > Using the [OpenTelemetry OpenCensus Bridge](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-opencensus-shim), you can immediately begin exporting your metrics and traces with OpenTelemetry + > Using the [OpenTelemetry OpenCensus Bridge](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-opencensus-shim), you can immediately begin exporting your metrics and traces with OpenTelemetry. #### Disable OpenCensus metrics Disable OpenCensus metrics for Spanner by including the following code if you still possess OpenCensus dependencies and exporter. diff --git a/.repo-metadata.json b/.repo-metadata.json index 03835744989..44368d809da 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -13,7 +13,7 @@ "api_id": "spanner.googleapis.com", "library_type": "GAPIC_COMBO", "requires_billing": true, - "codeowner_team": "@googleapis/spanner-client-libraries-java", + "codeowner_team": "@googleapis/spanner-team", "excluded_poms": "google-cloud-spanner-bom", "issue_tracker": "https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open", "recommended_package": "com.google.cloud.spanner", diff --git a/CHANGELOG.md b/CHANGELOG.md index ea713f9b3d7..917ff872041 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,212 @@ # Changelog +## [6.113.0](https://github.com/googleapis/java-spanner/compare/v6.112.0...v6.113.0) (2026-03-25) + + +### Features + +* Switch Eef metrics to using built in open telemetry ([#4385](https://github.com/googleapis/java-spanner/issues/4385)) ([0d0ad41](https://github.com/googleapis/java-spanner/commit/0d0ad4194dbfe46c505abcd237c93cbd39197331)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.68.0 ([bb63e92](https://github.com/googleapis/java-spanner/commit/bb63e929e96ee54e849e6295c074d4f4586c99f3)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.58.0 ([#4390](https://github.com/googleapis/java-spanner/issues/4390)) ([7f35761](https://github.com/googleapis/java-spanner/commit/7f357615c24ebb313043eabeae397f689866ad50)) +* Update googleapis/sdk-platform-java action to v2.68.0 ([#4389](https://github.com/googleapis/java-spanner/issues/4389)) ([737dfac](https://github.com/googleapis/java-spanner/commit/737dfac5972c921c8fd50a1e3c7c11652f67874d)) + +## [6.112.0](https://github.com/googleapis/java-spanner/compare/v6.111.1...v6.112.0) (2026-03-17) + + +### Features + +* Ability to update credentials on long running client ([#4371](https://github.com/googleapis/java-spanner/issues/4371)) ([e238990](https://github.com/googleapis/java-spanner/commit/e238990077badb063b1b05b0d71f58859434f7ee)) +* Add SI, adapt, split point related proto ([7aa4d90](https://github.com/googleapis/java-spanner/commit/7aa4d90cd4f001713ee2b0b5113303a748b237e0)) +* **spanner:** Include cache updates and routing hint into BeginTransaction and Commit request/response respectively ([7aa4d90](https://github.com/googleapis/java-spanner/commit/7aa4d90cd4f001713ee2b0b5113303a748b237e0)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.67.0 ([7aa4d90](https://github.com/googleapis/java-spanner/commit/7aa4d90cd4f001713ee2b0b5113303a748b237e0)) +* Fix unclosed literal error for consecutive backslashes ([#4387](https://github.com/googleapis/java-spanner/issues/4387)) ([f4884a8](https://github.com/googleapis/java-spanner/commit/f4884a83d15dcff6e246c7db47c8bafc3369a0a3)) + +## [6.111.1](https://github.com/googleapis/java-spanner/compare/v6.111.0...v6.111.1) (2026-03-03) + + +### Bug Fixes + +* Retry CreateSession also when waitForMinSessions is zero ([#4360](https://github.com/googleapis/java-spanner/issues/4360)) ([9263972](https://github.com/googleapis/java-spanner/commit/92639722793a994032761155013e506c9693b464)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.57.0 ([#4358](https://github.com/googleapis/java-spanner/issues/4358)) ([1ce4b8e](https://github.com/googleapis/java-spanner/commit/1ce4b8e24bac44c89f742f0afb395ae4c711abfd)) +* Update googleapis/sdk-platform-java action to v2.67.0 ([#4359](https://github.com/googleapis/java-spanner/issues/4359)) ([23781d9](https://github.com/googleapis/java-spanner/commit/23781d9f05db66d033d4d9125707a9988e1697db)) + +## [6.111.0](https://github.com/googleapis/java-spanner/compare/v6.110.0...v6.111.0) (2026-02-13) + + +### Features + +* Add E2E fallback to the spanner client. ([#4282](https://github.com/googleapis/java-spanner/issues/4282)) ([d36bd21](https://github.com/googleapis/java-spanner/commit/d36bd21a09cdd2006e53a43b6984d2a68ea24d3e)) + + +### Bug Fixes + +* Rollback transactions that are waiting for tx-id to be returned ([#4342](https://github.com/googleapis/java-spanner/issues/4342)) ([866a8c2](https://github.com/googleapis/java-spanner/commit/866a8c2d23f0d5edee1d98ead7d002b1981d5339)) + +## [6.110.0](https://github.com/googleapis/java-spanner/compare/v6.109.0...v6.110.0) (2026-02-11) + + +### Features + +* Add gRPC A66/A94 metrics ([#4333](https://github.com/googleapis/java-spanner/issues/4333)) ([485c700](https://github.com/googleapis/java-spanner/commit/485c70046e3e67dac899011580f9c350bdb31a6d)) +* ClientContext and secure parameters support ([#4316](https://github.com/googleapis/java-spanner/issues/4316)) ([6356ef2](https://github.com/googleapis/java-spanner/commit/6356ef2ce1ef87898e7bc4a6bc11174f629a9b5b)) +* Next release from main branch is 6.110.0 ([#4338](https://github.com/googleapis/java-spanner/issues/4338)) ([95ac7a7](https://github.com/googleapis/java-spanner/commit/95ac7a71463bfca4bb22f2e4ae61da97b97169ce)) +* **spanner:** Include cache updates into the ResultSet response ([aa53a43](https://github.com/googleapis/java-spanner/commit/aa53a43bdce6f4215fea8695837ad2c538598896)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.66.1 ([aa53a43](https://github.com/googleapis/java-spanner/commit/aa53a43bdce6f4215fea8695837ad2c538598896)) +* Preserve channel configurator for grpc-gcp and add opt-out for gcp OTel metrics ([#4329](https://github.com/googleapis/java-spanner/issues/4329)) ([2565137](https://github.com/googleapis/java-spanner/commit/25651378831fcd98ef48802872fe82a42cfa4942)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.56.1 ([#4331](https://github.com/googleapis/java-spanner/issues/4331)) ([2fd403f](https://github.com/googleapis/java-spanner/commit/2fd403f3c994b1b038e876be6e58ecadf731d848)) + +## [6.109.0](https://github.com/googleapis/java-spanner/compare/v6.108.0...v6.109.0) (2026-02-02) + + +### Features + +* Adding Send and Ack Mutation Support for Cloud Spanner Queue ([#4298](https://github.com/googleapis/java-spanner/issues/4298)) ([4b637ac](https://github.com/googleapis/java-spanner/commit/4b637ac0e4d6d696f3da8ae7fbac31c877aceba9)) + + +### Documentation + +* Add snippet for ReadLockMode configuration at client and transaction ([#4305](https://github.com/googleapis/java-spanner/issues/4305)) ([0fd4098](https://github.com/googleapis/java-spanner/commit/0fd40983b3bbb2f753e07036cedea9e7b9e26132)) + +## [6.108.0](https://github.com/googleapis/java-spanner/compare/v6.107.0...v6.108.0) (2026-01-28) + + +### Features + +* Add a ClientContext field to Spanner requests ([da6880e](https://github.com/googleapis/java-spanner/commit/da6880e425b7be55b11ba400046692e7af09bccb)) +* Add ChannelFinder server interfaces ([#4293](https://github.com/googleapis/java-spanner/issues/4293)) ([0b7a32e](https://github.com/googleapis/java-spanner/commit/0b7a32e7a24c027387a768a75632022a29562ef6)) +* Exposing total CPU related fields in AutoscalingConfig ([da6880e](https://github.com/googleapis/java-spanner/commit/da6880e425b7be55b11ba400046692e7af09bccb)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.66.0 ([da6880e](https://github.com/googleapis/java-spanner/commit/da6880e425b7be55b11ba400046692e7af09bccb)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.56.0 ([#4313](https://github.com/googleapis/java-spanner/issues/4313)) ([f7d0abc](https://github.com/googleapis/java-spanner/commit/f7d0abc241acb4c58d0ac3c60a7b18f5512275df)) +* Update googleapis/sdk-platform-java action to v2.66.0 ([#4314](https://github.com/googleapis/java-spanner/issues/4314)) ([d09a900](https://github.com/googleapis/java-spanner/commit/d09a900e26223eb9d646e33d29fc5692b8aba36a)) + +## [6.107.0](https://github.com/googleapis/java-spanner/compare/v6.106.0...v6.107.0) (2026-01-16) + + +### Features + +* Add Dynamic Channel Pooling (DCP) support to Connection API ([#4299](https://github.com/googleapis/java-spanner/issues/4299)) ([bba03a4](https://github.com/googleapis/java-spanner/commit/bba03a44dbfbd59288ecd33e3e53276809ad69b1)) +* Add SsFormat encoding library ([#4292](https://github.com/googleapis/java-spanner/issues/4292)) ([338a9b1](https://github.com/googleapis/java-spanner/commit/338a9b1409cafedcdef674bdff09a72c3f2cd772)) + + +### Dependencies + +* Update dependency com.google.api.grpc:proto-google-cloud-trace-v1 to v2.82.0 ([#4227](https://github.com/googleapis/java-spanner/issues/4227)) ([22bc6cf](https://github.com/googleapis/java-spanner/commit/22bc6cf3431f6e507d384f6e86a36503f1175ee7)) +* Update dependency com.google.cloud:google-cloud-monitoring to v3.83.0 ([#4169](https://github.com/googleapis/java-spanner/issues/4169)) ([61ae915](https://github.com/googleapis/java-spanner/commit/61ae915242a3c8a0aa1385bc1367f67df2c209d6)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.55.1 ([#4302](https://github.com/googleapis/java-spanner/issues/4302)) ([52acc0c](https://github.com/googleapis/java-spanner/commit/52acc0c620fec0aa67ecd81d634eec271fe4e429)) +* Update dependency net.bytebuddy:byte-buddy to v1.18.4 ([#4244](https://github.com/googleapis/java-spanner/issues/4244)) ([c8e4d91](https://github.com/googleapis/java-spanner/commit/c8e4d912155ab6829498822dcf0783fac5fe2747)) +* Update google.cloud.monitoring.version to v3.83.0 ([#4270](https://github.com/googleapis/java-spanner/issues/4270)) ([7ae68c8](https://github.com/googleapis/java-spanner/commit/7ae68c8e889f44f1057310bc45b70c086af9c385)) +* Update googleapis/sdk-platform-java action to v2.65.1 ([#4301](https://github.com/googleapis/java-spanner/issues/4301)) ([7d98f4e](https://github.com/googleapis/java-spanner/commit/7d98f4e12843826c18cbb8e0998c8687c94fc3d2)) + +## [6.106.0](https://github.com/googleapis/java-spanner/compare/v6.105.0...v6.106.0) (2026-01-07) + + +### Features + +* Support SHOW DEFAULT_TRANSACTION_ISOLATION for PG databases ([#4285](https://github.com/googleapis/java-spanner/issues/4285)) ([aec0515](https://github.com/googleapis/java-spanner/commit/aec051514dd3d122a7231eb6d25d1aaec8d90bda)) + + +### Bug Fixes + +* Adjust the initial polling delay for ddl operations ([#4275](https://github.com/googleapis/java-spanner/issues/4275)) ([8d36967](https://github.com/googleapis/java-spanner/commit/8d36967d010bed8f5a4a0c32f9ec1b5fe7d33e1d)) +* Retry creation of multiplexed session ([#4288](https://github.com/googleapis/java-spanner/issues/4288)) ([735e29e](https://github.com/googleapis/java-spanner/commit/735e29ed394faea9f5e697b5934a1f4895055d56)) + +## [6.105.0](https://github.com/googleapis/java-spanner/compare/v6.104.0...v6.105.0) (2025-12-16) + + +### Features + +* Add support of dynamic channel pooling ([#4265](https://github.com/googleapis/java-spanner/issues/4265)) ([923a14a](https://github.com/googleapis/java-spanner/commit/923a14aad99ff6fc91868f02d657145dd0f31c18)) +* Include RequestID in requests and errors ([#4263](https://github.com/googleapis/java-spanner/issues/4263)) ([afd7d6b](https://github.com/googleapis/java-spanner/commit/afd7d6b008f13d7a4d1a3b7f924122bd41d14b59)) +* Make grpc-gcp default enabled ([#4239](https://github.com/googleapis/java-spanner/issues/4239)) ([bb82f9e](https://github.com/googleapis/java-spanner/commit/bb82f9e55c40cac29b090e54be780c2e42545ee1)) + + +### Bug Fixes + +* Refine connecitivity metrics to capture RPCs with no response he… ([#4252](https://github.com/googleapis/java-spanner/issues/4252)) ([7b49412](https://github.com/googleapis/java-spanner/commit/7b4941221969f48d077ff459214c7d1e65ef843c)) +* Retry as PDML dit not retry Resource limit exceeded ([#4258](https://github.com/googleapis/java-spanner/issues/4258)) ([c735d42](https://github.com/googleapis/java-spanner/commit/c735d42875092b0d1482fe641b99645f288cdf4f)), closes [#4253](https://github.com/googleapis/java-spanner/issues/4253) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.54.2 ([#4261](https://github.com/googleapis/java-spanner/issues/4261)) ([61dfd62](https://github.com/googleapis/java-spanner/commit/61dfd620637da6ef76b699edbad1095c26b81950)) +* Update googleapis/sdk-platform-java action to v2.64.2 ([#4262](https://github.com/googleapis/java-spanner/issues/4262)) ([f9505a9](https://github.com/googleapis/java-spanner/commit/f9505a97bdd9f6da7dd5ab1b60b47f7ed0a70402)) + +## [6.104.0](https://github.com/googleapis/java-spanner/compare/v6.103.0...v6.104.0) (2025-12-03) + + +### Features + +* Include PostgreSQL error code in exceptions ([#4236](https://github.com/googleapis/java-spanner/issues/4236)) ([5874f8b](https://github.com/googleapis/java-spanner/commit/5874f8b3e65adc3e78832866ebe667cd746e2d7f)) + + +### Bug Fixes + +* Backslash at end of string literal was misinterpreted ([#4246](https://github.com/googleapis/java-spanner/issues/4246)) ([477ca51](https://github.com/googleapis/java-spanner/commit/477ca51baf6cd1a0a5773bd53677f64195100ae2)) +* Fix transaction tag issue with the blind-write ([#4243](https://github.com/googleapis/java-spanner/issues/4243)) ([cf2ba69](https://github.com/googleapis/java-spanner/commit/cf2ba695cdb4038dc8e3ca3e9859231a2203da60)) + +## [6.103.0](https://github.com/googleapis/java-spanner/compare/v6.102.1...v6.103.0) (2025-11-17) + + +### Features + +* Add grpc.xds.resource_type label to xDS client metrics ([#4222](https://github.com/googleapis/java-spanner/issues/4222)) ([97bed3c](https://github.com/googleapis/java-spanner/commit/97bed3cf1a9df542acc4685c2ce4dbfa629b2cd3)) +* Exposing AutoscalingConfig in InstancePartition ([22edecf](https://github.com/googleapis/java-spanner/commit/22edecf8518844860c3cb47883544efd36cbc311)) + + +### Bug Fixes + +* Add env var to allow disabling directpath bound token ([#4189](https://github.com/googleapis/java-spanner/issues/4189)) ([0ca9541](https://github.com/googleapis/java-spanner/commit/0ca95412c778e3478cb66e4bea124396326c6056)) +* Allow DML THEN RETURN with retryAbortsInternally=false ([#4225](https://github.com/googleapis/java-spanner/issues/4225)) ([f49cc47](https://github.com/googleapis/java-spanner/commit/f49cc47e663836696ef151738510e68324e139dc)) +* **deps:** Update the Java code generator (gapic-generator-java) to 2.64.1 ([22edecf](https://github.com/googleapis/java-spanner/commit/22edecf8518844860c3cb47883544efd36cbc311)) +* Remove URL encoding in project name ([#4188](https://github.com/googleapis/java-spanner/issues/4188)) ([abba0c1](https://github.com/googleapis/java-spanner/commit/abba0c1730ea792407bea073ea65da55128cd764)) + + +### Dependencies + +* Update actions/checkout action to v5 ([#4166](https://github.com/googleapis/java-spanner/issues/4166)) ([50a56f7](https://github.com/googleapis/java-spanner/commit/50a56f7d47541dd581f7b425df36a080ecc11a74)) +* Update all tracing and telemetry dependencies ([#4230](https://github.com/googleapis/java-spanner/issues/4230)) ([d60124c](https://github.com/googleapis/java-spanner/commit/d60124cbe317d4c2489ea35de81943cfd2b8f697)) +* Update dependency com.google.api.grpc:proto-google-cloud-trace-v1 to v2.79.0 ([#4172](https://github.com/googleapis/java-spanner/issues/4172)) ([3a329fd](https://github.com/googleapis/java-spanner/commit/3a329fdb2fc68ff9d19717b534dd667f931d51fd)) +* Update dependency com.google.auto.value:auto-value-annotations to v1.11.1 ([#4216](https://github.com/googleapis/java-spanner/issues/4216)) ([84150c7](https://github.com/googleapis/java-spanner/commit/84150c73bbed2a6d58408ae0b8bd59709fc751db)) +* Update dependency com.google.cloud:google-cloud-trace to v2.79.0 ([#4174](https://github.com/googleapis/java-spanner/issues/4174)) ([3e93ca0](https://github.com/googleapis/java-spanner/commit/3e93ca077b94ad06867e3c9fdfe19527855423a2)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.54.1 ([#4193](https://github.com/googleapis/java-spanner/issues/4193)) ([ad235cf](https://github.com/googleapis/java-spanner/commit/ad235cfc9041f52c2f7b76f67eeaa6c03c5840aa)) +* Update dependency commons-cli:commons-cli to v1.11.0 ([#4218](https://github.com/googleapis/java-spanner/issues/4218)) ([33449ba](https://github.com/googleapis/java-spanner/commit/33449baf64a3d5b78fff323737ffeb28c8a9461b)) +* Update dependency commons-io:commons-io to v2.21.0 ([#4198](https://github.com/googleapis/java-spanner/issues/4198)) ([1f31169](https://github.com/googleapis/java-spanner/commit/1f3116947069ac11c948b510e6a9a7a8a6aa6061)) +* Update dependency net.bytebuddy:byte-buddy to v1.18.1 ([#4214](https://github.com/googleapis/java-spanner/issues/4214)) ([0c1d843](https://github.com/googleapis/java-spanner/commit/0c1d843ad42f213d4d9ec2d98a12e21e991ac010)) +* Update dependency net.bytebuddy:byte-buddy-agent to v1.18.1 ([#4215](https://github.com/googleapis/java-spanner/issues/4215)) ([76ce01b](https://github.com/googleapis/java-spanner/commit/76ce01b99e5c1274e9103c27ebc6bbdf482bebcd)) +* Update opentelemetry.version to v1.56.0 ([#4167](https://github.com/googleapis/java-spanner/issues/4167)) ([a24f219](https://github.com/googleapis/java-spanner/commit/a24f21930978583a0b8d7d39130fa0fc3fec7b2d)) + ## [6.102.1](https://github.com/googleapis/java-spanner/compare/v6.102.0...v6.102.1) (2025-10-23) diff --git a/README.md b/README.md index ad16dd733b6..d34cbd74130 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +**_THIS REPOSITORY IS DEPRECATED. ALL OF ITS CONTENT AND HISTORY HAS BEEN MOVED TO [GOOGLE-CLOUD-JAVA](https://github.com/googleapis/google-cloud-java/tree/main/java-spanner)_** + # Google Cloud Spanner Client for Java Java idiomatic client for [Cloud Spanner][product-docs]. @@ -19,7 +21,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.70.0 + 26.78.0 pom import @@ -41,7 +43,7 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-spanner - 6.102.0 + 6.112.0 ``` @@ -49,20 +51,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.70.0') +implementation platform('com.google.cloud:libraries-bom:26.78.0') implementation 'com.google.cloud:google-cloud-spanner' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-spanner:6.102.1' +implementation 'com.google.cloud:google-cloud-spanner:6.113.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.102.1" +libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.113.0" ``` ## Authentication @@ -150,217 +152,30 @@ the Cloud Spanner Java client. ## Metrics -### Available client-side metrics: - -* `spanner/max_in_use_sessions`: This returns the maximum - number of sessions that have been in use during the last maintenance window - interval, so as to provide an indication of the amount of activity currently - in the database. - -* `spanner/max_allowed_sessions`: This shows the maximum - number of sessions allowed. - -* `spanner/num_sessions_in_pool`: This metric allows users to - see instance-level and database-level data for the total number of sessions in - the pool at this very moment. - -* `spanner/num_acquired_sessions`: This metric allows - users to see the total number of acquired sessions. - -* `spanner/num_released_sessions`: This metric allows - users to see the total number of released (destroyed) sessions. - -* `spanner/get_session_timeouts`: This gives you an - indication of the total number of get session timed-out instead of being - granted (the thread that requested the session is placed in a wait queue where - it waits until a session is released into the pool by another thread) due to - pool exhaustion since the server process started. - -* `spanner/gfe_latency`: This metric shows latency between - Google's network receiving an RPC and reading back the first byte of the response. +Cloud Spanner client supports [client-side metrics](https://cloud.google.com/spanner/docs/view-manage-client-side-metrics) that you can use along with server-side metrics to optimize performance and troubleshoot performance issues if they occur. -* `spanner/gfe_header_missing_count`: This metric shows the - number of RPC responses received without the server-timing header, most likely - indicating that the RPC never reached Google's network. +Client-side metrics are measured from the time a request leaves your application to the time your application receives the response. +In contrast, server-side metrics are measured from the time Spanner receives a request until the last byte of data is sent to the client. -### Instrument with OpenTelemetry +These metrics are enabled by default. You can opt out of using client-side metrics with the following code: -Cloud Spanner client supports [OpenTelemetry Metrics](https://opentelemetry.io/), -which gives insight into the client internals and aids in debugging/troubleshooting -production issues. OpenTelemetry metrics will provide you with enough data to enable you to -spot, and investigate the cause of any unusual deviations from normal behavior. - -All Cloud Spanner Metrics are prefixed with `spanner/` and uses `cloud.google.com/java` as [Instrumentation Scope](https://opentelemetry.io/docs/concepts/instrumentation-scope/). The -metrics will be tagged with: -* `database`: the target database name. -* `instance_id`: the instance id of the target Spanner instance. -* `client_id`: the user defined database client id. - -By default, the functionality is disabled. You need to add OpenTelemetry dependencies, enable OpenTelemetry metrics and must configure the OpenTelemetry with appropriate exporters at the startup of your application: - -#### OpenTelemetry Dependencies -If you are using Maven, add this to your pom.xml file -```xml - - io.opentelemetry - opentelemetry-sdk - {opentelemetry.version} - - - io.opentelemetry - opentelemetry-sdk-metrics - {opentelemetry.version} - - - io.opentelemetry - opentelemetry-exporter-otlp - {opentelemetry.version} - -``` -If you are using Gradle, add this to your dependencies -```Groovy -compile 'io.opentelemetry:opentelemetry-sdk:{opentelemetry.version}' -compile 'io.opentelemetry:opentelemetry-sdk-metrics:{opentelemetry.version}' -compile 'io.opentelemetry:opentelemetry-exporter-oltp:{opentelemetry.version}' ``` - -#### OpenTelemetry Configuration -By default, all metrics are disabled. To enable metrics and configure the OpenTelemetry follow below: - -```java -// Enable OpenTelemetry metrics before injecting OpenTelemetry object. -SpannerOptions.enableOpenTelemetryMetrics(); - -SdkMeterProvider sdkMeterProvider = SdkMeterProvider.builder() -// Use Otlp exporter or any other exporter of your choice. - .registerMetricReader(PeriodicMetricReader.builder(OtlpGrpcMetricExporter.builder().build()) - .build()) - .build(); - -OpenTelemetry openTelemetry = OpenTelemetrySdk.builder() - .setMeterProvider(sdkMeterProvider) - .build() - SpannerOptions options = SpannerOptions.newBuilder() -// Inject OpenTelemetry object via Spanner Options or register OpenTelemetry object as Global - .setOpenTelemetry(openTelemetry) + .setBuiltInMetricsEnabled(false) .build(); - -Spanner spanner = options.getService(); ``` -#### OpenTelemetry SQL Statement Tracing -The OpenTelemetry traces that are generated by the Java client include any request and transaction -tags that have been set. The traces can also include the SQL statements that are executed and the -name of the thread that executes the statement. Enable this with the `enableExtendedTracing` -option: - -``` -SpannerOptions options = SpannerOptions.newBuilder() - .setOpenTelemetry(openTelemetry) - .setEnableExtendedTracing(true) - .build(); -``` +You can also disable these metrics by setting `SPANNER_DISABLE_BUILTIN_METRICS` to `true`. -This option can also be enabled by setting the environment variable -`SPANNER_ENABLE_EXTENDED_TRACING=true`. - -#### OpenTelemetry API Tracing -You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing` -option. These traces also include any retry attempts for an API call: - -``` -SpannerOptions options = SpannerOptions.newBuilder() -.setOpenTelemetry(openTelemetry) -.setEnableApiTracing(true) -.build(); -``` - -This option can also be enabled by setting the environment variable -`SPANNER_ENABLE_API_TRACING=true`. - -> Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release. - - -### Instrument with OpenCensus - -> Note: OpenCensus project is deprecated. See [Sunsetting OpenCensus](https://opentelemetry.io/blog/2023/sunsetting-opencensus/). -We recommend migrating to OpenTelemetry, the successor project. - -Cloud Spanner client supports [Opencensus Metrics](https://opencensus.io/stats/), -which gives insight into the client internals and aids in debugging/troubleshooting -production issues. OpenCensus metrics will provide you with enough data to enable you to -spot, and investigate the cause of any unusual deviations from normal behavior. - -All Cloud Spanner Metrics are prefixed with `cloud.google.com/java/spanner` - -The metrics are tagged with: -* `database`: the target database name. -* `instance_id`: the instance id of the target Spanner instance. -* `client_id`: the user defined database client id. -* `library_version`: the version of the library that you're using. - - -By default, the functionality is disabled. You need to include opencensus-impl -dependency to collect the data and exporter dependency to export to backend. - -[Click here](https://medium.com/google-cloud/troubleshooting-cloud-spanner-applications-with-opencensus-2cf424c4c590) for more information. - -#### OpenCensus Dependencies - -If you are using Maven, add this to your pom.xml file -```xml - - io.opencensus - opencensus-impl - 0.30.0 - runtime - - - io.opencensus - opencensus-exporter-stats-stackdriver - 0.30.0 - -``` -If you are using Gradle, add this to your dependencies -```Groovy -compile 'io.opencensus:opencensus-impl:0.30.0' -compile 'io.opencensus:opencensus-exporter-stats-stackdriver:0.30.0' -``` - -#### Configure the OpenCensus Exporter - -At the start of your application configure the exporter: - -```java -import io.opencensus.exporter.stats.stackdriver.StackdriverStatsExporter; -// Enable OpenCensus exporters to export metrics to Stackdriver Monitoring. -// Exporters use Application Default Credentials to authenticate. -// See https://developers.google.com/identity/protocols/application-default-credentials -// for more details. -// The minimum reporting period for Stackdriver is 1 minute. -StackdriverStatsExporter.createAndRegister(); -``` -#### Enable RPC Views - -By default, all session metrics are enabled. To enable RPC views, use either of the following method: - -```java -// Register views for GFE metrics, including gfe_latency and gfe_header_missing_count. -SpannerRpcViews.registerGfeLatencyAndHeaderMissingCountViews(); - -// Register GFE Latency view. -SpannerRpcViews.registerGfeLatencyView(); - -// Register GFE Header Missing Count view. -SpannerRpcViews.registerGfeHeaderMissingCountView(); -``` +> Note: Client-side metrics needs `monitoring.timeSeries.create` IAM permission to export metrics data. Ask your administrator to grant your service account the [Monitoring Metric Writer](https://cloud.google.com/iam/docs/roles-permissions/monitoring#monitoring.metricWriter) (roles/monitoring.metricWriter) IAM role on the project. ## Traces Cloud Spanner client supports OpenTelemetry Traces, which gives insight into the client internals and aids in debugging/troubleshooting production issues. By default, the functionality is disabled. You need to add OpenTelemetry dependencies, enable OpenTelemetry traces and must configure the OpenTelemetry with appropriate exporters at the startup of your application. +See [Configure client-side tracing](https://cloud.google.com/spanner/docs/set-up-tracing#configure-client-side-tracing) for more details on configuring traces. + #### OpenTelemetry Dependencies If you are using Maven, add this to your pom.xml file @@ -447,9 +262,32 @@ This option can also be enabled by setting the environment variable > Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release. +#### End-to-end Tracing + +In addition to client-side tracing, you can opt in for [end-to-end tracing](https://cloud.google.com/spanner/docs/tracing-overview#end-to-end-side-tracing). End-to-end tracing helps you understand and debug latency issues that are specific to Spanner such as the following: +* Identify whether the latency is due to network latency between your application and Spanner, or if the latency is occurring within Spanner. +* Identify the Google Cloud regions that your application requests are being routed through and if there is a cross-region request. A cross-region request usually means higher latencies between your application and Spanner. + +``` +SpannerOptions options = SpannerOptions.newBuilder() +.setOpenTelemetry(openTelemetry) +.setEnableEndToEndTracing(true) +.build(); +``` + +Refer to [Configure end-to-end tracing](https://cloud.google.com/spanner/docs/set-up-tracing#configure-end-to-end-tracing) to configure end-to-end tracing and to understand its attributes. + +> Note: End-to-end traces can only be exported to [Cloud Trace](https://cloud.google.com/trace/docs). + + +## Instrument with OpenCensus + +> Note: OpenCensus project is deprecated. See [Sunsetting OpenCensus](https://opentelemetry.io/blog/2023/sunsetting-opencensus/). +We recommend migrating to OpenTelemetry, the successor project. + ## Migrate from OpenCensus to OpenTelemetry -> Using the [OpenTelemetry OpenCensus Bridge](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-opencensus-shim), you can immediately begin exporting your metrics and traces with OpenTelemetry +> Using the [OpenTelemetry OpenCensus Bridge](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-opencensus-shim), you can immediately begin exporting your metrics and traces with OpenTelemetry. #### Disable OpenCensus metrics Disable OpenCensus metrics for Spanner by including the following code if you still possess OpenCensus dependencies and exporter. @@ -538,6 +376,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-spanner/tree/ | Get Database Ddl Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/GetDatabaseDdlSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/GetDatabaseDdlSample.java) | | Get Instance Config Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/GetInstanceConfigSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/GetInstanceConfigSample.java) | | Insert Using Dml Returning Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/InsertUsingDmlReturningSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/InsertUsingDmlReturningSample.java) | +| Isolation Level And Read Lock Mode Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/IsolationLevelAndReadLockModeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/IsolationLevelAndReadLockModeSample.java) | | Last Statement Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/LastStatementSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/LastStatementSample.java) | | List Backup Schedules Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/ListBackupSchedulesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ListBackupSchedulesSample.java) | | List Database Roles | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/ListDatabaseRoles.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ListDatabaseRoles.java) | @@ -706,32 +545,13 @@ information. Apache 2.0 - See [LICENSE][license] for more information. -## CI Status - -Java Version | Status ------------- | ------ -Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] -Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] -Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] -Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] - Java is a registered trademark of Oracle and/or its affiliates. [product-docs]: https://cloud.google.com/spanner/docs/ [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-spanner/latest/history -[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java7.svg -[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java7.html -[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8.svg -[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8.html -[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8-osx.svg -[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8-osx.html -[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8-win.svg -[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8-win.html -[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.svg -[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.102.1 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.113.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 4edd4b09337..c72767328de 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -24,7 +24,7 @@ com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT @@ -34,7 +34,8 @@ UTF-8 UTF-8 2.10.1 - 1.54.1 + 1.59.0 + 3.85.0 @@ -59,7 +60,7 @@ com.google.cloud google-cloud-monitoring - 3.77.0 + ${google.cloud.monitoring.version} @@ -90,12 +91,12 @@ com.google.cloud google-cloud-spanner - 6.102.0 + 6.112.0 com.google.auto.value auto-value-annotations - 1.11.0 + 1.11.1 com.kohlschutter.junixsocket @@ -111,7 +112,7 @@ commons-cli commons-cli - 1.10.0 + 1.11.0 @@ -126,7 +127,7 @@ org.codehaus.mojo exec-maven-plugin - 3.6.1 + 3.6.3 com.google.cloud.spanner.benchmark.LatencyBenchmark false diff --git a/generation_config.yaml b/generation_config.yaml index e449bb76bd3..5975d727df5 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ -gapic_generator_version: 2.63.0 -googleapis_commitish: b61fb21bbac838de7f55cf2c60d371a47fc2799e -libraries_bom_version: 26.70.0 +gapic_generator_version: 2.68.0 +googleapis_commitish: 59d5f2b46924714af627ac29ea6de78641a00835 +libraries_bom_version: 26.78.0 libraries: - api_shortname: spanner name_pretty: Cloud Spanner @@ -17,7 +17,7 @@ libraries: api_id: spanner.googleapis.com transport: grpc requires_billing: true - codeowner_team: '@googleapis/spanner-client-libraries-java' + codeowner_team: '@googleapis/spanner-team' library_type: GAPIC_COMBO excluded_poms: google-cloud-spanner-bom recommended_package: com.google.cloud.spanner diff --git a/google-cloud-spanner-bom/pom.xml b/google-cloud-spanner-bom/pom.xml index 65ad528b46b..1341af5fc1f 100644 --- a/google-cloud-spanner-bom/pom.xml +++ b/google-cloud-spanner-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-spanner-bom - 6.102.1 + 6.113.1-SNAPSHOT pom com.google.cloud sdk-platform-java-config - 3.53.0 + 3.58.0 Google Cloud Spanner BOM @@ -53,43 +53,43 @@ com.google.cloud google-cloud-spanner - 6.102.1 + 6.113.1-SNAPSHOT com.google.cloud google-cloud-spanner test-jar - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-admin-instance-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.102.1 + 6.113.1-SNAPSHOT @@ -100,7 +100,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.1 + 3.15.0 1.8 1.8 diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml index 74949dbde80..e3817e02302 100644 --- a/google-cloud-spanner-executor/pom.xml +++ b/google-cloud-spanner-executor/pom.xml @@ -5,20 +5,21 @@ 4.0.0 com.google.cloud google-cloud-spanner-executor - 6.102.1 + 6.113.1-SNAPSHOT jar Google Cloud Spanner Executor com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT 1.8 1.8 UTF-8 + 0.36.0 @@ -41,11 +42,16 @@ io.opentelemetry opentelemetry-sdk-trace - + + + com.google.cloud.opentelemetry + shared-resourcemapping + ${google.cloud.opentelemetry.version} + com.google.cloud.opentelemetry exporter-trace - 0.33.0 + ${google.cloud.opentelemetry.version} io.opentelemetry.semconv @@ -53,6 +59,10 @@ + + com.google.cloud + grpc-gcp + io.opentelemetry.semconv opentelemetry-semconv @@ -64,7 +74,7 @@ com.google.cloud google-cloud-trace - 2.76.0 + 2.84.0 @@ -144,7 +154,7 @@ com.google.api.grpc proto-google-cloud-trace-v1 - 2.76.0 + 2.84.0 @@ -184,12 +194,12 @@ commons-cli commons-cli - 1.10.0 + 1.11.0 commons-io commons-io - 2.20.0 + 2.21.0 @@ -216,7 +226,7 @@ org.apache.maven.surefire surefire-junit4 - 3.5.4 + 3.5.5 test @@ -281,7 +291,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.4 + 3.5.5 @@ -290,7 +300,7 @@ org.apache.maven.plugins maven-dependency-plugin - com.google.api:gax,org.apache.maven.surefire:surefire-junit4,io.opentelemetry.semconv:opentelemetry-semconv + com.google.api:gax,org.apache.maven.surefire:surefire-junit4,io.opentelemetry.semconv:opentelemetry-semconv,com.google.cloud.opentelemetry:shared-resourcemapping,com.google.cloud:grpc-gcp 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 index e693695205f..fd83e680e9c 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/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 index 7595773f082..ed4b3c70d65 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,8 +82,8 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") public class SpannerExecutorProxySettings extends ClientSettings { 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 index 2ffa7a9aece..f3f9883a079 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/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 index 81c34d4db2e..2bdb9765036 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/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 index 13b9a388b2b..56a1d3ff55a 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/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 index b1ce5c53111..8c932e57f95 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/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 index 102ed93e685..a71beccbf93 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ 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.LibraryMetadata; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StreamingCallSettings; import com.google.api.gax.rpc.StubSettings; @@ -91,10 +92,11 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") public class SpannerExecutorProxyStubSettings extends StubSettings { /** The default scopes of the service. */ @@ -194,6 +196,14 @@ protected SpannerExecutorProxyStubSettings(Builder settingsBuilder) throws IOExc executeActionAsyncSettings = settingsBuilder.executeActionAsyncSettings().build(); } + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-spanner") + .setRepository("googleapis/java-spanner") + .build(); + } + /** Builder for SpannerExecutorProxyStubSettings. */ public static class Builder extends StubSettings.Builder { 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 index 7c9d39e9d11..02102d0112e 100644 --- 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 @@ -1034,6 +1034,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", "queryAllDeclaredConstructors": true, @@ -1088,6 +1097,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", "queryAllDeclaredConstructors": true, @@ -1205,6 +1241,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", "queryAllDeclaredConstructors": true, @@ -1511,6 +1565,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", "queryAllDeclaredConstructors": true, @@ -3752,6 +3815,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.executor.v1.AdaptMessageAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.AdaptMessageAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.AddSplitPointsAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.AddSplitPointsAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.executor.v1.AdminAction", "queryAllDeclaredConstructors": true, @@ -5318,6 +5417,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.CacheUpdate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CacheUpdate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.CommitRequest", "queryAllDeclaredConstructors": true, @@ -5606,6 +5723,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Group", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Group$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.KeyRange", "queryAllDeclaredConstructors": true, @@ -5624,6 +5759,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.KeyRecipe", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Part", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Part$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Part$NullOrder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Part$Order", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.KeySet", "queryAllDeclaredConstructors": true, @@ -5705,6 +5894,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Mutation$Ack", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation$Ack$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.Mutation$Builder", "queryAllDeclaredConstructors": true, @@ -5732,6 +5939,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Mutation$Send", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation$Send$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.Mutation$Write", "queryAllDeclaredConstructors": true, @@ -5921,6 +6146,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.QueryAdvisorResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.QueryAdvisorResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.QueryAdvisorResult$IndexAdvice", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.QueryAdvisorResult$IndexAdvice$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.QueryPlan", "queryAllDeclaredConstructors": true, @@ -5939,6 +6200,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Range", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Range$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.ReadRequest", "queryAllDeclaredConstructors": true, @@ -5975,6 +6254,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.RecipeList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RecipeList$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.RequestOptions", "queryAllDeclaredConstructors": true, @@ -5993,6 +6290,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.RequestOptions$ClientContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RequestOptions$ClientContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.RequestOptions$Priority", "queryAllDeclaredConstructors": true, @@ -6074,6 +6389,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.RoutingHint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RoutingHint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RoutingHint$SkippedTablet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RoutingHint$SkippedTablet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.Session", "queryAllDeclaredConstructors": true, @@ -6128,6 +6479,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Tablet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Tablet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Tablet$Role", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.Transaction", "queryAllDeclaredConstructors": true, 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 index 601a6015c9d..95aaa8fea22 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/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 index 98019812d20..9e5c02c6ba5 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/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 index 7d8a670e289..8b74f5ad936 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/clirr-ignored-differences.xml b/google-cloud-spanner/clirr-ignored-differences.xml index d0763c8918e..a57bf40d1ba 100644 --- a/google-cloud-spanner/clirr-ignored-differences.xml +++ b/google-cloud-spanner/clirr-ignored-differences.xml @@ -1057,4 +1057,86 @@ 8001 com/google/cloud/spanner/LatencyTest + + 7012 + com/google/cloud/spanner/connection/Connection + java.lang.Object getConnectionPropertyValue(com.google.cloud.spanner.connection.ConnectionProperty) + + + + 7002 + com/google/cloud/spanner/CompositeTracer + void recordAFELatency(java.lang.Long) + + + 7002 + com/google/cloud/spanner/CompositeTracer + void recordAFELatency(java.lang.Float) + + + 7002 + com/google/cloud/spanner/CompositeTracer + void recordAfeHeaderMissingCount(java.lang.Long) + + + 7002 + com/google/cloud/spanner/CompositeTracer + void recordGFELatency(java.lang.Long) + + + 7002 + com/google/cloud/spanner/CompositeTracer + void recordGFELatency(java.lang.Float) + + + 7002 + com/google/cloud/spanner/CompositeTracer + void recordGfeHeaderMissingCount(java.lang.Long) + + + + 7002 + com/google/cloud/spanner/SpannerException + void setRequestId(com.google.cloud.spanner.XGoogSpannerRequestId) + + + 7002 + com/google/cloud/spanner/SpannerExceptionFactory + com.google.cloud.spanner.SpannerBatchUpdateException newSpannerBatchUpdateException(com.google.cloud.spanner.ErrorCode, java.lang.String, long[], com.google.cloud.spanner.XGoogSpannerRequestId) + + + 7002 + com/google/cloud/spanner/SpannerExceptionFactory + com.google.cloud.spanner.SpannerException newSpannerException(com.google.cloud.spanner.ErrorCode, java.lang.String, java.lang.Throwable, com.google.cloud.spanner.XGoogSpannerRequestId) + + + 7002 + com/google/cloud/spanner/SpannerExceptionFactory + com.google.cloud.spanner.SpannerException newSpannerException(com.google.cloud.spanner.ErrorCode, java.lang.String, com.google.cloud.spanner.XGoogSpannerRequestId) + + + 7002 + com/google/cloud/spanner/SpannerExceptionFactory + com.google.cloud.spanner.SpannerException newSpannerException(java.lang.Throwable, com.google.cloud.spanner.XGoogSpannerRequestId) + + + 7002 + com/google/cloud/spanner/SpannerExceptionFactory + com.google.cloud.spanner.SpannerException newSpannerException(io.grpc.Context, java.lang.Throwable, com.google.cloud.spanner.XGoogSpannerRequestId) + + + 7002 + com/google/cloud/spanner/SpannerExceptionFactory + com.google.cloud.spanner.SpannerException propagateInterrupt(java.lang.InterruptedException, com.google.cloud.spanner.XGoogSpannerRequestId) + + + 6001 + com/google/cloud/spanner/XGoogSpannerRequestId + REQUEST_HEADER_KEY + + + 6001 + com/google/cloud/spanner/XGoogSpannerRequestId + REQUEST_ID + diff --git a/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml index 4dbd2591473..0d70d6718b2 100644 --- a/google-cloud-spanner/pom.xml +++ b/google-cloud-spanner/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-spanner - 6.102.1 + 6.113.1-SNAPSHOT jar Google Cloud Spanner https://github.com/googleapis/java-spanner @@ -11,11 +11,12 @@ com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT google-cloud-spanner 0.31.1 + 3.85.0 com.google.cloud.spanner.GceTestEnvConfig projects/gcloud-devel/instances/spanner-testing-east1 gcloud-devel @@ -24,11 +25,18 @@ + + + kr.motd.maven + os-maven-plugin + 1.7.1 + + org.jacoco jacoco-maven-plugin - 0.8.13 + 0.8.14 @@ -146,6 +154,25 @@ com/google/cloud/spanner/spi/v1/** + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 + + com.google.protobuf:protoc:4.33.2:exe:${os.detected.classifier} + + ${project.basedir}/../proto-google-cloud-spanner-v1/src/main/proto + + + + + test-compile + + test-compile + + + + @@ -165,6 +192,12 @@ com.google.cloud grpc-gcp + + + io.opentelemetry + opentelemetry-api + + io.grpc @@ -197,6 +230,12 @@ io.grpc grpc-opentelemetry + + + io.opentelemetry + opentelemetry-api + + com.google.api @@ -272,7 +311,7 @@ com.google.cloud google-cloud-monitoring - 3.77.0 + ${google.cloud.monitoring.version} @@ -284,7 +323,7 @@ com.google.api.grpc proto-google-cloud-monitoring-v3 - 3.77.0 + ${google.cloud.monitoring.version} @@ -296,7 +335,7 @@ com.google.api.grpc grpc-google-cloud-monitoring-v3 - 3.77.0 + ${google.cloud.monitoring.version} test @@ -388,7 +427,7 @@ org.graalvm.sdk nativeimage - ${graal-sdk.version} + ${graal-sdk-nativeimage.version} provided @@ -399,20 +438,6 @@ test - - - net.bytebuddy - byte-buddy - 1.17.8 - test - - - net.bytebuddy - byte-buddy-agent - 1.17.8 - test - - com.google.api.grpc @@ -499,19 +524,19 @@ com.google.cloud.opentelemetry exporter-trace - 0.33.0 + 0.36.0 test com.google.cloud google-cloud-trace - 2.76.0 + 2.84.0 test com.google.api.grpc proto-google-cloud-trace-v1 - 2.76.0 + 2.84.0 test diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbortedException.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbortedException.java index 74e45062113..28b5f1fa257 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbortedException.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbortedException.java @@ -38,7 +38,7 @@ public class AbortedException extends SpannerException { /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ AbortedException( DoNotConstructDirectly token, @Nullable String message, @Nullable Throwable cause) { - this(token, message, cause, null, null); + this(token, message, cause, null); } /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ @@ -46,9 +46,8 @@ public class AbortedException extends SpannerException { DoNotConstructDirectly token, @Nullable String message, @Nullable Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId reqId) { - super(token, ErrorCode.ABORTED, IS_RETRYABLE, message, cause, apiException, reqId); + @Nullable ApiException apiException) { + super(token, ErrorCode.ABORTED, IS_RETRYABLE, message, cause, apiException); if (cause instanceof AbortedException) { this.transactionID = ((AbortedException) cause).getTransactionID(); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractMultiplexedSessionDatabaseClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractMultiplexedSessionDatabaseClient.java index f9b04136ecb..7d083db211a 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractMultiplexedSessionDatabaseClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractMultiplexedSessionDatabaseClient.java @@ -26,11 +26,6 @@ */ abstract class AbstractMultiplexedSessionDatabaseClient implements DatabaseClient { - @Override - public String getDatabaseRole() { - throw new UnsupportedOperationException(); - } - @Override public Timestamp writeAtLeastOnce(Iterable mutations) throws SpannerException { return writeAtLeastOnceWithOptions(mutations).getCommitTimestamp(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java index 6816001a9fa..619ea42441a 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java @@ -404,6 +404,15 @@ ByteString getTransactionId() { } } + @Override + public void close() { + ByteString id = getTransactionId(); + if (id != null && !id.isEmpty()) { + rpc.clearTransactionAffinity(id); + } + super.close(); + } + /** * Initializes the transaction with the timestamp specified within MultiUseReadOnlyTransaction. * This is used only for fallback of PartitionQueryRequest and PartitionReadRequest with @@ -457,30 +466,22 @@ void initTransaction() { } private void initTransactionInternal(BeginTransactionRequest request) { - XGoogSpannerRequestId reqId = - session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); try { Transaction transaction = - rpc.beginTransaction( - request, reqId.withOptions(getTransactionChannelHint()), isRouteToLeader()); + rpc.beginTransaction(request, getTransactionChannelHint(), isRouteToLeader()); if (!transaction.hasReadTimestamp()) { throw SpannerExceptionFactory.newSpannerException( - ErrorCode.INTERNAL, - "Missing expected transaction.read_timestamp metadata field", - reqId); + ErrorCode.INTERNAL, "Missing expected transaction.read_timestamp metadata field"); } if (transaction.getId().isEmpty()) { throw SpannerExceptionFactory.newSpannerException( - ErrorCode.INTERNAL, "Missing expected transaction.id metadata field", reqId); + ErrorCode.INTERNAL, "Missing expected transaction.id metadata field"); } try { timestamp = Timestamp.fromProto(transaction.getReadTimestamp()); } catch (IllegalArgumentException e) { throw SpannerExceptionFactory.newSpannerException( - ErrorCode.INTERNAL, - "Bad value in transaction.read_timestamp metadata field", - e, - reqId); + ErrorCode.INTERNAL, "Bad value in transaction.read_timestamp metadata field", e); } transactionId = transaction.getId(); span.addAnnotation( @@ -692,17 +693,15 @@ QueryOptions buildQueryOptions(QueryOptions requestOptions) { } RequestOptions buildRequestOptions(Options options) { - // Shortcut for the most common return value. - if (!(options.hasPriority() || options.hasTag() || getTransactionTag() != null)) { - return RequestOptions.getDefaultInstance(); - } - - RequestOptions.Builder builder = RequestOptions.newBuilder(); - if (options.hasPriority()) { - builder.setPriority(options.priority()); - } - if (options.hasTag()) { - builder.setRequestTag(options.tag()); + RequestOptions.Builder builder = options.toRequestOptionsProto(false).toBuilder(); + RequestOptions.ClientContext defaultClientContext = + session.getSpanner().getOptions().getClientContext(); + if (defaultClientContext != null) { + RequestOptions.ClientContext.Builder clientContextBuilder = defaultClientContext.toBuilder(); + if (builder.hasClientContext()) { + clientContextBuilder.mergeFrom(builder.getClientContext()); + } + builder.setClientContext(clientContextBuilder.build()); } if (getTransactionTag() != null) { builder.setTransactionTag(getTransactionTag()); @@ -816,9 +815,14 @@ ResultSet executeQueryInternalWithOptions( @Override CloseableIterator startStream( @Nullable ByteString resumeToken, - AsyncResultSet.StreamMessageListener streamListener) { + AsyncResultSet.StreamMessageListener streamListener, + XGoogSpannerRequestId requestId) { GrpcStreamIterator stream = - new GrpcStreamIterator(statement, prefetchChunks, cancelQueryWhenClientIsClosed); + new GrpcStreamIterator( + statement, + request.getLastStatement(), + prefetchChunks, + cancelQueryWhenClientIsClosed); if (streamListener != null) { stream.registerListener(streamListener); } @@ -835,12 +839,12 @@ CloseableIterator startStream( if (selector != null) { request.setTransaction(selector); } - this.ensureNonNullXGoogRequestId(); SpannerRpc.StreamingCall call = rpc.executeQuery( request.build(), stream.consumer(), - this.xGoogRequestId.withOptions(getTransactionChannelHint()), + getTransactionChannelHint(), + requestId, isRouteToLeader()); session.markUsed(clock.instant()); stream.setCall(call, request.getTransaction().hasBegin()); @@ -856,7 +860,7 @@ boolean prepareIteratorForRetryOnDifferentGrpcChannel() { stream, this, options.hasDecodeMode() ? options.decodeMode() : defaultDecodeMode); } - Map getChannelHintOptions( + static Map getChannelHintOptions( Map channelHintForSession, Long channelHintForTransaction) { if (channelHintForSession != null) { return channelHintForSession; @@ -935,7 +939,8 @@ String getTransactionTag() { public void onTransactionMetadata(Transaction transaction, boolean shouldIncludeId) {} @Override - public SpannerException onError(SpannerException e, boolean withBeginTransaction) { + public SpannerException onError( + SpannerException e, boolean withBeginTransaction, boolean lastStatement) { this.session.onError(e); return e; } @@ -1009,6 +1014,8 @@ ResultSet readInternalWithOptions( } final int prefetchChunks = readOptions.hasPrefetchChunks() ? readOptions.prefetchChunks() : defaultPrefetchChunks; + final boolean lastStatement = + readOptions.hasLastStatement() ? readOptions.isLastStatement() : false; ResumableStreamIterator stream = new ResumableStreamIterator( MAX_BUFFERED_CHUNKS, @@ -1023,9 +1030,11 @@ ResultSet readInternalWithOptions( @Override CloseableIterator startStream( @Nullable ByteString resumeToken, - AsyncResultSet.StreamMessageListener streamListener) { + AsyncResultSet.StreamMessageListener streamListener, + XGoogSpannerRequestId requestId) { GrpcStreamIterator stream = - new GrpcStreamIterator(prefetchChunks, cancelQueryWhenClientIsClosed); + new GrpcStreamIterator( + lastStatement, prefetchChunks, cancelQueryWhenClientIsClosed); if (streamListener != null) { stream.registerListener(streamListener); } @@ -1040,13 +1049,12 @@ CloseableIterator startStream( builder.setTransaction(selector); } builder.setRequestOptions(buildRequestOptions(readOptions)); - this.incrementXGoogRequestIdAttempt(); - this.xGoogRequestId.setChannelId(session.getChannel()); SpannerRpc.StreamingCall call = rpc.read( builder.build(), stream.consumer(), - this.xGoogRequestId.withOptions(getTransactionChannelHint()), + getTransactionChannelHint(), + requestId, isRouteToLeader()); session.markUsed(clock.instant()); stream.setCall(call, /* withBeginTransaction= */ builder.getTransaction().hasBegin()); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractResultSet.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractResultSet.java index fc3a5609bb1..0717cae74f2 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractResultSet.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractResultSet.java @@ -56,7 +56,8 @@ void onTransactionMetadata(Transaction transaction, boolean shouldIncludeId) throws SpannerException; /** Called when the read finishes with an error. Returns the error that should be thrown. */ - SpannerException onError(SpannerException e, boolean withBeginTransaction); + SpannerException onError( + SpannerException e, boolean withBeginTransaction, boolean lastStatement); /** Called when the read finishes normally. */ void onDone(boolean withBeginTransaction); @@ -153,6 +154,8 @@ interface CloseableIterator extends Iterator { boolean isWithBeginTransaction(); + boolean isLastStatement(); + /** * @param streamMessageListener A class object which implements StreamMessageListener * @return true if streaming is supported by the iterator, otherwise false diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AdminRequestsPerMinuteExceededException.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AdminRequestsPerMinuteExceededException.java index b7d76ab9e82..72d8b0ab15d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AdminRequestsPerMinuteExceededException.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AdminRequestsPerMinuteExceededException.java @@ -32,7 +32,7 @@ public class AdminRequestsPerMinuteExceededException extends SpannerException { /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ AdminRequestsPerMinuteExceededException( DoNotConstructDirectly token, @Nullable String message, @Nullable Throwable cause) { - this(token, message, cause, null, null); + this(token, message, cause, null); } /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ @@ -40,8 +40,7 @@ public class AdminRequestsPerMinuteExceededException extends SpannerException { DoNotConstructDirectly token, @Nullable String message, @Nullable Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId reqId) { - super(token, ErrorCode.RESOURCE_EXHAUSTED, true, message, cause, apiException, reqId); + @Nullable ApiException apiException) { + super(token, ErrorCode.RESOURCE_EXHAUSTED, true, message, cause, apiException); } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncRunnerImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncRunnerImpl.java index 1ea58b2bc66..afe2fdb2461 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncRunnerImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncRunnerImpl.java @@ -59,7 +59,7 @@ private R runTransaction(final AsyncWork work) { try { return work.doWorkAsync(transaction).get(); } catch (ExecutionException e) { - throw SpannerExceptionFactory.newSpannerException(e.getCause()); + throw SpannerExceptionFactory.asSpannerException(e.getCause()); } catch (InterruptedException e) { throw SpannerExceptionFactory.propagateInterrupt(e); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManagerImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManagerImpl.java index 14089afb82a..c394ad09fe2 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManagerImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManagerImpl.java @@ -123,7 +123,7 @@ private ApiFuture internalBeginAsync( @Override public void onFailure(Throwable t) { onError(t); - res.setException(SpannerExceptionFactory.newSpannerException(t)); + res.setException(SpannerExceptionFactory.asSpannerException(t)); } @Override diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClientImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClientImpl.java index 6e8340784bd..5cbe01aa711 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClientImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BatchClientImpl.java @@ -22,7 +22,6 @@ import com.google.cloud.spanner.Options.QueryOption; import com.google.cloud.spanner.Options.ReadOption; import com.google.cloud.spanner.spi.v1.SpannerRpc; -import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.protobuf.Struct; @@ -36,7 +35,6 @@ import java.time.Instant; import java.util.List; import java.util.Map; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.ReentrantLock; import javax.annotation.Nullable; @@ -46,8 +44,6 @@ public class BatchClientImpl implements BatchClient { private final SessionClient sessionClient; - private final boolean isMultiplexedSessionEnabled; - /** Lock to protect the multiplexed session. */ private final ReentrantLock multiplexedSessionLock = new ReentrantLock(); @@ -61,16 +57,8 @@ public class BatchClientImpl implements BatchClient { @GuardedBy("multiplexedSessionLock") private final AtomicReference multiplexedSessionReference; - /** - * This flag is set to true if the server return UNIMPLEMENTED when partitioned transaction is - * executed on a multiplexed session. TODO: Remove once this is guaranteed to be available. - */ - @VisibleForTesting - static final AtomicBoolean unimplementedForPartitionedOps = new AtomicBoolean(false); - - BatchClientImpl(SessionClient sessionClient, boolean isMultiplexedSessionEnabled) { + BatchClientImpl(SessionClient sessionClient) { this.sessionClient = checkNotNull(sessionClient); - this.isMultiplexedSessionEnabled = isMultiplexedSessionEnabled; this.sessionExpirationDuration = Duration.ofMillis( sessionClient @@ -93,12 +81,7 @@ public String getDatabaseRole() { @Override public BatchReadOnlyTransaction batchReadOnlyTransaction(TimestampBound bound) { - SessionImpl session; - if (canUseMultiplexedSession()) { - session = getMultiplexedSession(); - } else { - session = sessionClient.createSession(); - } + SessionImpl session = getMultiplexedSession(); return new BatchReadOnlyTransactionImpl( MultiUseReadOnlyTransaction.newBuilder() .setSession(session) @@ -114,8 +97,7 @@ public BatchReadOnlyTransaction batchReadOnlyTransaction(TimestampBound bound) { sessionClient.getSpanner().getOptions().getDirectedReadOptions()) .setSpan(sessionClient.getSpanner().getTracer().getCurrentSpan()) .setTracer(sessionClient.getSpanner().getTracer()), - checkNotNull(bound), - sessionClient); + checkNotNull(bound)); } @Override @@ -138,12 +120,7 @@ public BatchReadOnlyTransaction batchReadOnlyTransaction(BatchTransactionId batc sessionClient.getSpanner().getOptions().getDirectedReadOptions()) .setSpan(sessionClient.getSpanner().getTracer().getCurrentSpan()) .setTracer(sessionClient.getSpanner().getTracer()), - batchTransactionId, - sessionClient); - } - - private boolean canUseMultiplexedSession() { - return isMultiplexedSessionEnabled && !unimplementedForPartitionedOps.get(); + batchTransactionId); } private SessionImpl getMultiplexedSession() { @@ -162,28 +139,20 @@ private SessionImpl getMultiplexedSession() { private static class BatchReadOnlyTransactionImpl extends MultiUseReadOnlyTransaction implements BatchReadOnlyTransaction { - private String sessionName; + private final String sessionName; private final Map options; - private final SessionClient sessionClient; - private final AtomicBoolean fallbackInitiated = new AtomicBoolean(false); BatchReadOnlyTransactionImpl( - MultiUseReadOnlyTransaction.Builder builder, - TimestampBound bound, - SessionClient sessionClient) { + MultiUseReadOnlyTransaction.Builder builder, TimestampBound bound) { super(builder.setTimestampBound(bound)); - this.sessionClient = sessionClient; this.sessionName = session.getName(); this.options = session.getOptions(); initTransaction(); } BatchReadOnlyTransactionImpl( - MultiUseReadOnlyTransaction.Builder builder, - BatchTransactionId batchTransactionId, - SessionClient sessionClient) { + MultiUseReadOnlyTransaction.Builder builder, BatchTransactionId batchTransactionId) { super(builder.setTransactionId(batchTransactionId.getTransactionId())); - this.sessionClient = sessionClient; this.sessionName = session.getName(); this.options = session.getOptions(); } @@ -214,18 +183,6 @@ public List partitionReadUsingIndex( Iterable columns, ReadOption... option) throws SpannerException { - return partitionReadUsingIndex(partitionOptions, table, index, keys, columns, false, option); - } - - private List partitionReadUsingIndex( - PartitionOptions partitionOptions, - String table, - String index, - KeySet keys, - Iterable columns, - boolean isFallback, - ReadOption... option) - throws SpannerException { Options readOptions = Options.fromReadOptions(option); Preconditions.checkArgument( !readOptions.hasLimit(), @@ -250,33 +207,16 @@ private List partitionReadUsingIndex( } builder.setPartitionOptions(pbuilder.build()); - XGoogSpannerRequestId reqId = - session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); final PartitionReadRequest request = builder.build(); - try { - PartitionResponse response = rpc.partitionRead(request, reqId.withOptions(options)); - ImmutableList.Builder partitions = ImmutableList.builder(); - for (com.google.spanner.v1.Partition p : response.getPartitionsList()) { - Partition partition = - Partition.createReadPartition( - p.getPartitionToken(), - partitionOptions, - table, - index, - keys, - columns, - readOptions); - partitions.add(partition); - } - return partitions.build(); - } catch (SpannerException e) { - if (!isFallback && maybeMarkUnimplementedForPartitionedOps(e)) { - return partitionReadUsingIndex( - partitionOptions, table, index, keys, columns, true, option); - } - e.setRequestId(reqId); - throw e; + PartitionResponse response = rpc.partitionRead(request, options); + ImmutableList.Builder partitions = ImmutableList.builder(); + for (com.google.spanner.v1.Partition p : response.getPartitionsList()) { + Partition partition = + Partition.createReadPartition( + p.getPartitionToken(), partitionOptions, table, index, keys, columns, readOptions); + partitions.add(partition); } + return partitions.build(); } @Override @@ -316,44 +256,16 @@ private List partitionQuery( } builder.setPartitionOptions(pbuilder.build()); - XGoogSpannerRequestId reqId = - session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); final PartitionQueryRequest request = builder.build(); - try { - PartitionResponse response = rpc.partitionQuery(request, reqId.withOptions(options)); - ImmutableList.Builder partitions = ImmutableList.builder(); - for (com.google.spanner.v1.Partition p : response.getPartitionsList()) { - Partition partition = - Partition.createQueryPartition( - p.getPartitionToken(), partitionOptions, statement, queryOptions); - partitions.add(partition); - } - return partitions.build(); - } catch (SpannerException e) { - if (!isFallback && maybeMarkUnimplementedForPartitionedOps(e)) { - return partitionQuery(partitionOptions, statement, true, option); - } - e.setRequestId(reqId); - throw e; - } - } - - boolean maybeMarkUnimplementedForPartitionedOps(SpannerException spannerException) { - if (MultiplexedSessionDatabaseClient.verifyErrorMessage( - spannerException, "Partitioned operations are not supported with multiplexed sessions")) { - synchronized (fallbackInitiated) { - if (!fallbackInitiated.get()) { - session.setFallbackSessionReference( - sessionClient.createSession().getSessionReference()); - sessionName = session.getName(); - initFallbackTransaction(); - unimplementedForPartitionedOps.set(true); - fallbackInitiated.set(true); - } - return true; - } + PartitionResponse response = rpc.partitionQuery(request, options); + ImmutableList.Builder partitions = ImmutableList.builder(); + for (com.google.spanner.v1.Partition p : response.getPartitionsList()) { + Partition partition = + Partition.createQueryPartition( + p.getPartitionToken(), partitionOptions, statement, queryOptions); + partitions.add(partition); } - return false; + return partitions.build(); } @Override diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsConstant.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsConstant.java index 8d4abba533d..dff490832c8 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsConstant.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsConstant.java @@ -16,7 +16,7 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.XGoogSpannerRequestId.REQUEST_ID; +import static com.google.cloud.spanner.XGoogSpannerRequestId.REQUEST_ID_HEADER_NAME; import com.google.api.core.InternalApi; import com.google.api.gax.tracing.OpenTelemetryMetricsRecorder; @@ -41,6 +41,7 @@ public class BuiltInMetricsConstant { public static final String METER_NAME = "spanner.googleapis.com/internal/client"; public static final String GAX_METER_NAME = OpenTelemetryMetricsRecorder.GAX_METER_NAME; + public static final String GRPC_GCP_METER_NAME = "grpc-gcp"; static final String SPANNER_METER_NAME = "spanner-java"; static final String GRPC_METER_NAME = "grpc-java"; static final String GFE_LATENCIES_NAME = "gfe_latencies"; @@ -53,6 +54,8 @@ public class BuiltInMetricsConstant { static final String ATTEMPT_LATENCY_NAME = "attempt_latency"; static final String OPERATION_COUNT_NAME = "operation_count"; static final String ATTEMPT_COUNT_NAME = "attempt_count"; + static final String EEF_FALLBACK_COUNT_NAME = "eef.fallback_count"; + static final String EEF_CALL_STATUS_NAME = "eef.call_status"; public static final Set SPANNER_METRICS = ImmutableSet.of( @@ -68,14 +71,78 @@ public class BuiltInMetricsConstant { .map(m -> METER_NAME + '/' + m) .collect(Collectors.toSet()); + // The following attributes are optional and need to be enabled explicitly. + public static final String GRPC_LB_BACKEND_SERVICE_ATTRIBUTE = "grpc.lb.backend_service"; + public static final String GRPC_LB_LOCALITY_ATTRIBUTE = "grpc.lb.locality"; + public static final String GRPC_DISCONNECT_ERROR_ATTRIBUTE = "grpc.disconnect_error"; + + static final Set GRPC_LB_RLS_ATTRIBUTES = + ImmutableSet.of("grpc.lb.rls.data_plane_target", "grpc.lb.pick_result"); + static final Set GRPC_CLIENT_ATTEMPT_STARTED_ATTRIBUTES = + ImmutableSet.of("grpc.method", "grpc.target"); + static final Set GRPC_SUBCHANNEL_DEFAULT_ATTRIBUTES = + ImmutableSet.of("grpc.target", GRPC_LB_BACKEND_SERVICE_ATTRIBUTE, GRPC_LB_LOCALITY_ATTRIBUTE); + static final Set GRPC_SUBCHANNEL_DISCONNECTION_ATTRIBUTES = + ImmutableSet.of( + "grpc.target", + GRPC_LB_BACKEND_SERVICE_ATTRIBUTE, + GRPC_LB_LOCALITY_ATTRIBUTE, + GRPC_DISCONNECT_ERROR_ATTRIBUTE); + static final Set GRPC_XDS_CLIENT_RESOURCE_UPDATE_ATTRIBUTES = + ImmutableSet.of("grpc.xds.resource_type"); + + // Additional gRPC attributes to enable. + static final Map> GRPC_METRIC_ADDITIONAL_ATTRIBUTES = + ImmutableMap.>builder() + .put("grpc.client.attempt.started", GRPC_CLIENT_ATTEMPT_STARTED_ATTRIBUTES) + .put("grpc.subchannel.open_connections", GRPC_SUBCHANNEL_DEFAULT_ATTRIBUTES) + .put("grpc.subchannel.disconnections", GRPC_SUBCHANNEL_DISCONNECTION_ATTRIBUTES) + .put("grpc.subchannel.connection_attempts_succeeded", GRPC_SUBCHANNEL_DEFAULT_ATTRIBUTES) + .put("grpc.subchannel.connection_attempts_failed", GRPC_SUBCHANNEL_DEFAULT_ATTRIBUTES) + .put("grpc.lb.rls.default_target_picks", GRPC_LB_RLS_ATTRIBUTES) + .put("grpc.lb.rls.target_picks", GRPC_LB_RLS_ATTRIBUTES) + .put( + "grpc.xds_client.resource_updates_invalid", + GRPC_XDS_CLIENT_RESOURCE_UPDATE_ATTRIBUTES) + .put("grpc.xds_client.resource_updates_valid", GRPC_XDS_CLIENT_RESOURCE_UPDATE_ATTRIBUTES) + .build(); + static final Collection GRPC_METRICS_TO_ENABLE = ImmutableList.of( + "grpc.client.attempt.started", + "grpc.subchannel.open_connections", + "grpc.subchannel.disconnections", + "grpc.subchannel.connection_attempts_succeeded", + "grpc.subchannel.connection_attempts_failed", "grpc.lb.rls.default_target_picks", "grpc.lb.rls.target_picks", "grpc.xds_client.server_failure", "grpc.xds_client.resource_updates_invalid", "grpc.xds_client.resource_updates_valid"); + public static final AttributeKey CHANNEL_NAME_KEY = + AttributeKey.stringKey("channel_name"); + public static final AttributeKey FROM_CHANNEL_NAME_KEY = + AttributeKey.stringKey("from_channel_name"); + public static final AttributeKey TO_CHANNEL_NAME_KEY = + AttributeKey.stringKey("to_channel_name"); + public static final AttributeKey STATUS_CODE_KEY = AttributeKey.stringKey("status_code"); + + static final Set GRPC_GCP_EEF_FALLBACK_COUNT_ATTRIBUTES = + ImmutableSet.of(FROM_CHANNEL_NAME_KEY.getKey(), TO_CHANNEL_NAME_KEY.getKey()); + + static final Set GRPC_GCP_EEF_CALL_STATUS_ATTRIBUTES = + ImmutableSet.of(CHANNEL_NAME_KEY.getKey(), STATUS_CODE_KEY.getKey()); + + static final Map> GRPC_GCP_METRIC_ADDITIONAL_ATTRIBUTES = + ImmutableMap.>builder() + .put(EEF_FALLBACK_COUNT_NAME, GRPC_GCP_EEF_FALLBACK_COUNT_ATTRIBUTES) + .put(EEF_CALL_STATUS_NAME, GRPC_GCP_EEF_CALL_STATUS_ATTRIBUTES) + .build(); + + static final Collection GRPC_GCP_METRICS_TO_ENABLE = + ImmutableList.of(EEF_FALLBACK_COUNT_NAME, EEF_CALL_STATUS_NAME); + public static final String SPANNER_RESOURCE_TYPE = "spanner_instance_client"; public static final AttributeKey PROJECT_ID_KEY = AttributeKey.stringKey("project_id"); @@ -98,8 +165,10 @@ public class BuiltInMetricsConstant { AttributeKey.stringKey("directpath_enabled"); public static final AttributeKey DIRECT_PATH_USED_KEY = AttributeKey.stringKey("directpath_used"); - public static final AttributeKey REQUEST_ID_KEY = AttributeKey.stringKey(REQUEST_ID); - public static Set ALLOWED_EXEMPLARS_ATTRIBUTES = new HashSet<>(Arrays.asList(REQUEST_ID)); + public static final AttributeKey REQUEST_ID_KEY = + AttributeKey.stringKey(REQUEST_ID_HEADER_NAME); + public static Set ALLOWED_EXEMPLARS_ATTRIBUTES = + new HashSet<>(Arrays.asList(REQUEST_ID_HEADER_NAME)); // IP address prefixes allocated for DirectPath backends. public static final String DP_IPV6_PREFIX = "2001:4860:8040"; @@ -120,9 +189,6 @@ public class BuiltInMetricsConstant { DIRECT_PATH_ENABLED_KEY, DIRECT_PATH_USED_KEY); - static final Set GRPC_LB_RLS_ATTRIBUTES = - ImmutableSet.of("grpc.lb.rls.data_plane_target", "grpc.lb.pick_result"); - static List BUCKET_BOUNDARIES = ImmutableList.of( 0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, @@ -136,7 +202,6 @@ public class BuiltInMetricsConstant { ImmutableList.of( "grpc.client.attempt.sent_total_compressed_message_size", "grpc.client.attempt.rcvd_total_compressed_message_size", - "grpc.client.attempt.started", "grpc.client.attempt.duration", "grpc.client.call.duration"); @@ -176,6 +241,7 @@ static Map getAllViews() { "1"); defineSpannerView(views); defineGRPCView(views); + defineGrpcGcpView(views); return views.build(); } @@ -231,7 +297,8 @@ private static void defineGRPCView(ImmutableMap.Builder viewMap) { + for (String metric : GRPC_GCP_METRICS_TO_ENABLE) { + InstrumentSelector selector = + InstrumentSelector.builder() + .setName(metric) + .setMeterName(BuiltInMetricsConstant.GRPC_GCP_METER_NAME) + .build(); + + Set attributesFilter = + BuiltInMetricsConstant.COMMON_ATTRIBUTES.stream() + .map(AttributeKey::getKey) + .collect(Collectors.toSet()); + + attributesFilter.addAll( + GRPC_GCP_METRIC_ADDITIONAL_ATTRIBUTES.getOrDefault(metric, ImmutableSet.of())); + + View view = + View.builder() + .setName(BuiltInMetricsConstant.METER_NAME + '/' + metric.replace(".", "/")) + .setAggregation(Aggregation.sum()) + .setAttributeFilter(attributesFilter) + .build(); + + viewMap.put(selector, view); + } + } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsProvider.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsProvider.java index f1c520e10fa..0a51ebfae26 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsProvider.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsProvider.java @@ -150,6 +150,9 @@ void enableGrpcMetrics( .enableMetrics(BuiltInMetricsConstant.GRPC_METRICS_TO_ENABLE) // Disable gRPCs default metrics as they are not needed for Spanner. .disableMetrics(BuiltInMetricsConstant.GRPC_METRICS_ENABLED_BY_DEFAULT) + .addOptionalLabel(BuiltInMetricsConstant.GRPC_LB_BACKEND_SERVICE_ATTRIBUTE) + .addOptionalLabel(BuiltInMetricsConstant.GRPC_LB_LOCALITY_ATTRIBUTE) + .addOptionalLabel(BuiltInMetricsConstant.GRPC_DISCONNECT_ERROR_ATTRIBUTE) .build(); ApiFunction channelConfigurator = channelProviderBuilder.getChannelConfigurator(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsRecorder.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsRecorder.java index 2eb7c8d2971..67e75a1d383 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsRecorder.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsRecorder.java @@ -99,21 +99,23 @@ class BuiltInMetricsRecorder extends OpenTelemetryMetricsRecorder { void recordServerTimingHeaderMetrics( Float gfeLatency, Float afeLatency, - Long gfeHeaderMissingCount, - Long afeHeaderMissingCount, - Map attributes) { + Map attributes, + boolean isDirectPathUsed, + boolean isAfeEnabled) { io.opentelemetry.api.common.Attributes otelAttributes = toOtelAttributes(attributes); - if (gfeLatency != null) { - gfeLatencyRecorder.record(gfeLatency, otelAttributes); + if (!isDirectPathUsed) { + if (gfeLatency != null) { + gfeLatencyRecorder.record(gfeLatency, otelAttributes); + } else { + gfeHeaderMissingCountRecorder.add(1, otelAttributes); + } } - if (gfeHeaderMissingCount > 0) { - gfeHeaderMissingCountRecorder.add(gfeHeaderMissingCount, otelAttributes); - } - if (afeLatency != null) { - afeLatencyRecorder.record(afeLatency, otelAttributes); - } - if (afeHeaderMissingCount > 0) { - afeHeaderMissingCountRecorder.add(afeHeaderMissingCount, otelAttributes); + if (isAfeEnabled) { + if (afeLatency != null) { + afeLatencyRecorder.record(afeLatency, otelAttributes); + } else { + afeHeaderMissingCountRecorder.add(1, otelAttributes); + } } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsTracer.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsTracer.java index cdf7dda2e6f..a982a3f11ab 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsTracer.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsTracer.java @@ -39,10 +39,10 @@ class BuiltInMetricsTracer extends MetricsTracer implements ApiTracer { private final Map attributes = new HashMap<>(); private Float gfeLatency = null; private Float afeLatency = null; - private TraceWrapper traceWrapper; - private long gfeHeaderMissingCount = 0; - private long afeHeaderMissingCount = 0; + private final TraceWrapper traceWrapper; private final ISpan currentSpan; + private boolean isDirectPathUsed; + private boolean isAfeEnabled; BuiltInMetricsTracer( MethodName methodName, @@ -66,7 +66,7 @@ public void attemptSucceeded() { super.attemptSucceeded(); attributes.put(STATUS_ATTRIBUTE, StatusCode.Code.OK.toString()); builtInOpenTelemetryMetricsRecorder.recordServerTimingHeaderMetrics( - gfeLatency, afeLatency, gfeHeaderMissingCount, afeHeaderMissingCount, attributes); + gfeLatency, afeLatency, attributes, isDirectPathUsed, isAfeEnabled); } } @@ -80,7 +80,7 @@ public void attemptCancelled() { super.attemptCancelled(); attributes.put(STATUS_ATTRIBUTE, StatusCode.Code.CANCELLED.toString()); builtInOpenTelemetryMetricsRecorder.recordServerTimingHeaderMetrics( - gfeLatency, afeLatency, gfeHeaderMissingCount, afeHeaderMissingCount, attributes); + gfeLatency, afeLatency, attributes, isDirectPathUsed, isAfeEnabled); } } @@ -98,7 +98,7 @@ public void attemptFailedDuration(Throwable error, java.time.Duration delay) { super.attemptFailedDuration(error, delay); attributes.put(STATUS_ATTRIBUTE, extractStatus(error)); builtInOpenTelemetryMetricsRecorder.recordServerTimingHeaderMetrics( - gfeLatency, afeLatency, gfeHeaderMissingCount, afeHeaderMissingCount, attributes); + gfeLatency, afeLatency, attributes, isDirectPathUsed, isAfeEnabled); } } @@ -115,7 +115,7 @@ public void attemptFailedRetriesExhausted(Throwable error) { super.attemptFailedRetriesExhausted(error); attributes.put(STATUS_ATTRIBUTE, extractStatus(error)); builtInOpenTelemetryMetricsRecorder.recordServerTimingHeaderMetrics( - gfeLatency, afeLatency, gfeHeaderMissingCount, afeHeaderMissingCount, attributes); + gfeLatency, afeLatency, attributes, isDirectPathUsed, isAfeEnabled); } } @@ -132,24 +132,16 @@ public void attemptPermanentFailure(Throwable error) { super.attemptPermanentFailure(error); attributes.put(STATUS_ATTRIBUTE, extractStatus(error)); builtInOpenTelemetryMetricsRecorder.recordServerTimingHeaderMetrics( - gfeLatency, afeLatency, gfeHeaderMissingCount, afeHeaderMissingCount, attributes); + gfeLatency, afeLatency, attributes, isDirectPathUsed, isAfeEnabled); } } - void recordGFELatency(Float gfeLatency) { + public void recordServerTimingHeaderMetrics( + Float gfeLatency, Float afeLatency, boolean isDirectPathUsed, boolean isAfeEnabled) { this.gfeLatency = gfeLatency; - } - - void recordAFELatency(Float afeLatency) { + this.isDirectPathUsed = isDirectPathUsed; this.afeLatency = afeLatency; - } - - void recordGfeHeaderMissingCount(Long value) { - this.gfeHeaderMissingCount = value; - } - - void recordAfeHeaderMissingCount(Long value) { - this.afeHeaderMissingCount = value; + this.isAfeEnabled = isAfeEnabled; } @Override diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/CompositeTracer.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/CompositeTracer.java index 5d3b416788f..105dbd0a512 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/CompositeTracer.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/CompositeTracer.java @@ -191,50 +191,13 @@ public void addAttributes(Map attributes) { } } - public void recordGFELatency(Long gfeLatency) { + public void recordServerTimingHeaderMetrics( + Float gfeLatency, Float afeLatency, boolean isDirectPathUsed, boolean isAfeEnabled) { for (ApiTracer child : children) { if (child instanceof BuiltInMetricsTracer) { - ((BuiltInMetricsTracer) child).recordGFELatency(Float.valueOf(gfeLatency)); - } - } - } - - public void recordGfeHeaderMissingCount(Long value) { - for (ApiTracer child : children) { - if (child instanceof BuiltInMetricsTracer) { - ((BuiltInMetricsTracer) child).recordGfeHeaderMissingCount(value); - } - } - } - - public void recordAFELatency(Long afeLatency) { - for (ApiTracer child : children) { - if (child instanceof BuiltInMetricsTracer) { - ((BuiltInMetricsTracer) child).recordAFELatency(Float.valueOf(afeLatency)); - } - } - } - - public void recordAfeHeaderMissingCount(Long value) { - for (ApiTracer child : children) { - if (child instanceof BuiltInMetricsTracer) { - ((BuiltInMetricsTracer) child).recordAfeHeaderMissingCount(value); - } - } - } - - public void recordGFELatency(Float gfeLatency) { - for (ApiTracer child : children) { - if (child instanceof BuiltInMetricsTracer) { - ((BuiltInMetricsTracer) child).recordGFELatency(gfeLatency); - } - } - } - - public void recordAFELatency(Float afeLatency) { - for (ApiTracer child : children) { - if (child instanceof BuiltInMetricsTracer) { - ((BuiltInMetricsTracer) child).recordAFELatency(afeLatency); + ((BuiltInMetricsTracer) child) + .recordServerTimingHeaderMetrics( + gfeLatency, afeLatency, isDirectPathUsed, isAfeEnabled); } } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java index 40dbd710bd5..bae8067e33d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java @@ -20,10 +20,10 @@ import com.google.cloud.Timestamp; import com.google.cloud.spanner.Options.TransactionOption; import com.google.cloud.spanner.Options.UpdateOption; -import com.google.cloud.spanner.SessionPool.PooledSessionFuture; import com.google.cloud.spanner.SpannerImpl.ClosedException; import com.google.cloud.spanner.Statement.StatementFactory; import com.google.common.annotations.VisibleForTesting; +import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.spanner.v1.BatchWriteResponse; import io.opentelemetry.api.common.Attributes; @@ -34,7 +34,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.BiFunction; import javax.annotation.Nullable; class DatabaseClientImpl implements DatabaseClient { @@ -42,61 +41,22 @@ class DatabaseClientImpl implements DatabaseClient { private static final String READ_ONLY_TRANSACTION = "CloudSpanner.ReadOnlyTransaction"; private static final String PARTITION_DML_TRANSACTION = "CloudSpanner.PartitionDMLTransaction"; private final TraceWrapper tracer; - private Attributes commonAttributes; + private final Attributes databaseAttributes; @VisibleForTesting final String clientId; - @VisibleForTesting final SessionPool pool; @VisibleForTesting final MultiplexedSessionDatabaseClient multiplexedSessionDatabaseClient; - @VisibleForTesting final boolean useMultiplexedSessionPartitionedOps; - @VisibleForTesting final boolean useMultiplexedSessionForRW; @VisibleForTesting final int dbId; private final AtomicInteger nthRequest; private final Map clientIdToOrdinalMap; - final boolean useMultiplexedSessionBlindWrite; - - @VisibleForTesting - DatabaseClientImpl(SessionPool pool, TraceWrapper tracer) { - this( - "", - pool, - /* useMultiplexedSessionBlindWrite= */ false, - /* multiplexedSessionDatabaseClient= */ null, - /* useMultiplexedSessionPartitionedOps= */ false, - tracer, - /* useMultiplexedSessionForRW= */ false, - Attributes.empty()); - } - - @VisibleForTesting - DatabaseClientImpl(String clientId, SessionPool pool, TraceWrapper tracer) { - this( - clientId, - pool, - /* useMultiplexedSessionBlindWrite= */ false, - /* multiplexedSessionDatabaseClient= */ null, - /* useMultiplexedSessionPartitionedOps= */ false, - tracer, - /* useMultiplexedSessionForRW= */ false, - Attributes.empty()); - } - DatabaseClientImpl( String clientId, - SessionPool pool, - boolean useMultiplexedSessionBlindWrite, - @Nullable MultiplexedSessionDatabaseClient multiplexedSessionDatabaseClient, - boolean useMultiplexedSessionPartitionedOps, + MultiplexedSessionDatabaseClient multiplexedSessionDatabaseClient, TraceWrapper tracer, - boolean useMultiplexedSessionForRW, - Attributes commonAttributes) { + Attributes databaseAttributes) { this.clientId = clientId; - this.pool = pool; - this.useMultiplexedSessionBlindWrite = useMultiplexedSessionBlindWrite; this.multiplexedSessionDatabaseClient = multiplexedSessionDatabaseClient; - this.useMultiplexedSessionPartitionedOps = useMultiplexedSessionPartitionedOps; this.tracer = tracer; - this.useMultiplexedSessionForRW = useMultiplexedSessionForRW; - this.commonAttributes = commonAttributes; + this.databaseAttributes = databaseAttributes; this.clientIdToOrdinalMap = new HashMap(); this.dbId = this.dbIdFromClientId(this.clientId); @@ -113,55 +73,14 @@ synchronized int dbIdFromClientId(String clientId) { return id; } - @VisibleForTesting - PooledSessionFuture getSession() { - return pool.getSession(); - } - @VisibleForTesting DatabaseClient getMultiplexedSession() { - if (canUseMultiplexedSessions()) { - return this.multiplexedSessionDatabaseClient; - } - return pool.getMultiplexedSessionWithFallback(); - } - - @VisibleForTesting - DatabaseClient getMultiplexedSessionForRW() { - if (canUseMultiplexedSessionsForRW()) { - return getMultiplexedSession(); - } - return getSession(); - } - - private MultiplexedSessionDatabaseClient getMultiplexedSessionDatabaseClient() { - return canUseMultiplexedSessions() ? this.multiplexedSessionDatabaseClient : null; - } - - private boolean canUseMultiplexedSessions() { - return this.multiplexedSessionDatabaseClient != null - && this.multiplexedSessionDatabaseClient.isMultiplexedSessionsSupported(); - } - - private boolean canUseMultiplexedSessionsForRW() { - return this.useMultiplexedSessionForRW - && this.multiplexedSessionDatabaseClient != null - && this.multiplexedSessionDatabaseClient.isMultiplexedSessionsForRWSupported(); - } - - private boolean canUseMultiplexedSessionsForPartitionedOps() { - return this.useMultiplexedSessionPartitionedOps - && this.multiplexedSessionDatabaseClient != null - && this.multiplexedSessionDatabaseClient.isMultiplexedSessionsForPartitionedOpsSupported(); + return this.multiplexedSessionDatabaseClient; } @Override public Dialect getDialect() { - MultiplexedSessionDatabaseClient client = getMultiplexedSessionDatabaseClient(); - if (client != null) { - return client.getDialect(); - } - return pool.getDialect(); + return this.multiplexedSessionDatabaseClient.getDialect(); } private final AbstractLazyInitializer statementFactorySupplier = @@ -191,7 +110,7 @@ public StatementFactory getStatementFactory() { @Override @Nullable public String getDatabaseRole() { - return pool.getDatabaseRole(); + return multiplexedSessionDatabaseClient.getDatabaseRole(); } @Override @@ -203,16 +122,9 @@ public Timestamp write(final Iterable mutations) throws SpannerExcepti public CommitResponse writeWithOptions( final Iterable mutations, final TransactionOption... options) throws SpannerException { - ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, commonAttributes, options); + ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, databaseAttributes, options); try (IScope s = tracer.withSpan(span)) { - if (canUseMultiplexedSessionsForRW() && getMultiplexedSessionDatabaseClient() != null) { - return getMultiplexedSessionDatabaseClient().writeWithOptions(mutations, options); - } - - return runWithSessionRetry( - (session, reqId) -> { - return session.writeWithOptions(mutations, withReqId(reqId, options)); - }); + return multiplexedSessionDatabaseClient.writeWithOptions(mutations, options); } catch (RuntimeException e) { span.setStatus(e); throw e; @@ -230,15 +142,9 @@ public Timestamp writeAtLeastOnce(final Iterable mutations) throws Spa public CommitResponse writeAtLeastOnceWithOptions( final Iterable mutations, final TransactionOption... options) throws SpannerException { - ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, commonAttributes, options); + ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, databaseAttributes, options); try (IScope s = tracer.withSpan(span)) { - if (useMultiplexedSessionBlindWrite && getMultiplexedSessionDatabaseClient() != null) { - return getMultiplexedSessionDatabaseClient() - .writeAtLeastOnceWithOptions(mutations, options); - } - return runWithSessionRetry( - (session, reqId) -> - session.writeAtLeastOnceWithOptions(mutations, withReqId(reqId, options))); + return multiplexedSessionDatabaseClient.writeAtLeastOnceWithOptions(mutations, options); } catch (RuntimeException e) { span.setStatus(e); throw e; @@ -247,27 +153,13 @@ public CommitResponse writeAtLeastOnceWithOptions( } } - private int nextNthRequest() { - return this.nthRequest.incrementAndGet(); - } - - @VisibleForTesting - int getNthRequest() { - return this.nthRequest.get(); - } - @Override public ServerStream batchWriteAtLeastOnce( final Iterable mutationGroups, final TransactionOption... options) throws SpannerException { - ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, commonAttributes, options); + ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, databaseAttributes, options); try (IScope s = tracer.withSpan(span)) { - if (canUseMultiplexedSessionsForRW() && getMultiplexedSessionDatabaseClient() != null) { - return getMultiplexedSessionDatabaseClient().batchWriteAtLeastOnce(mutationGroups, options); - } - return runWithSessionRetry( - (session, reqId) -> - session.batchWriteAtLeastOnce(mutationGroups, withReqId(reqId, options))); + return multiplexedSessionDatabaseClient.batchWriteAtLeastOnce(mutationGroups, options); } catch (RuntimeException e) { span.setStatus(e); throw e; @@ -278,7 +170,7 @@ public ServerStream batchWriteAtLeastOnce( @Override public ReadContext singleUse() { - ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, commonAttributes); + ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, databaseAttributes); try (IScope s = tracer.withSpan(span)) { return getMultiplexedSession().singleUse(); } catch (RuntimeException e) { @@ -290,7 +182,7 @@ public ReadContext singleUse() { @Override public ReadContext singleUse(TimestampBound bound) { - ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, commonAttributes); + ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, databaseAttributes); try (IScope s = tracer.withSpan(span)) { return getMultiplexedSession().singleUse(bound); } catch (RuntimeException e) { @@ -302,7 +194,7 @@ public ReadContext singleUse(TimestampBound bound) { @Override public ReadOnlyTransaction singleUseReadOnlyTransaction() { - ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, commonAttributes); + ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, databaseAttributes); try (IScope s = tracer.withSpan(span)) { return getMultiplexedSession().singleUseReadOnlyTransaction(); } catch (RuntimeException e) { @@ -314,7 +206,7 @@ public ReadOnlyTransaction singleUseReadOnlyTransaction() { @Override public ReadOnlyTransaction singleUseReadOnlyTransaction(TimestampBound bound) { - ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, commonAttributes); + ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, databaseAttributes); try (IScope s = tracer.withSpan(span)) { return getMultiplexedSession().singleUseReadOnlyTransaction(bound); } catch (RuntimeException e) { @@ -326,7 +218,7 @@ public ReadOnlyTransaction singleUseReadOnlyTransaction(TimestampBound bound) { @Override public ReadOnlyTransaction readOnlyTransaction() { - ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, commonAttributes); + ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, databaseAttributes); try (IScope s = tracer.withSpan(span)) { return getMultiplexedSession().readOnlyTransaction(); } catch (RuntimeException e) { @@ -338,7 +230,7 @@ public ReadOnlyTransaction readOnlyTransaction() { @Override public ReadOnlyTransaction readOnlyTransaction(TimestampBound bound) { - ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, commonAttributes); + ISpan span = tracer.spanBuilder(READ_ONLY_TRANSACTION, databaseAttributes); try (IScope s = tracer.withSpan(span)) { return getMultiplexedSession().readOnlyTransaction(bound); } catch (RuntimeException e) { @@ -350,9 +242,9 @@ public ReadOnlyTransaction readOnlyTransaction(TimestampBound bound) { @Override public TransactionRunner readWriteTransaction(TransactionOption... options) { - ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, commonAttributes, options); + ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, databaseAttributes, options); try (IScope s = tracer.withSpan(span)) { - return getMultiplexedSessionForRW().readWriteTransaction(options); + return multiplexedSessionDatabaseClient.readWriteTransaction(options); } catch (RuntimeException e) { span.setStatus(e); span.end(); @@ -362,9 +254,9 @@ public TransactionRunner readWriteTransaction(TransactionOption... options) { @Override public TransactionManager transactionManager(TransactionOption... options) { - ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, commonAttributes, options); + ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, databaseAttributes, options); try (IScope s = tracer.withSpan(span)) { - return getMultiplexedSessionForRW().transactionManager(options); + return multiplexedSessionDatabaseClient.transactionManager(options); } catch (RuntimeException e) { span.setStatus(e); span.end(); @@ -374,9 +266,9 @@ public TransactionManager transactionManager(TransactionOption... options) { @Override public AsyncRunner runAsync(TransactionOption... options) { - ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, commonAttributes, options); + ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, databaseAttributes, options); try (IScope s = tracer.withSpan(span)) { - return getMultiplexedSessionForRW().runAsync(options); + return multiplexedSessionDatabaseClient.runAsync(options); } catch (RuntimeException e) { span.setStatus(e); span.end(); @@ -386,9 +278,9 @@ public AsyncRunner runAsync(TransactionOption... options) { @Override public AsyncTransactionManager transactionManagerAsync(TransactionOption... options) { - ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, commonAttributes, options); + ISpan span = tracer.spanBuilder(READ_WRITE_TRANSACTION, databaseAttributes, options); try (IScope s = tracer.withSpan(span)) { - return getMultiplexedSessionForRW().transactionManagerAsync(options); + return multiplexedSessionDatabaseClient.transactionManagerAsync(options); } catch (RuntimeException e) { span.setStatus(e); span.end(); @@ -398,102 +290,20 @@ public AsyncTransactionManager transactionManagerAsync(TransactionOption... opti @Override public long executePartitionedUpdate(final Statement stmt, final UpdateOption... options) { - - if (canUseMultiplexedSessionsForPartitionedOps()) { - try { - return getMultiplexedSession().executePartitionedUpdate(stmt, options); - } catch (SpannerException e) { - if (!multiplexedSessionDatabaseClient.maybeMarkUnimplementedForPartitionedOps(e)) { - throw e; - } - } - } - return executePartitionedUpdateWithPooledSession(stmt, options); + return multiplexedSessionDatabaseClient.executePartitionedUpdate(stmt, options); } private Future getDialectAsync() { - MultiplexedSessionDatabaseClient client = getMultiplexedSessionDatabaseClient(); - if (client != null) { - return client.getDialectAsync(); - } - return pool.getDialectAsync(); - } - - private UpdateOption[] withReqId( - final XGoogSpannerRequestId reqId, final UpdateOption... options) { - if (reqId == null) { - return options; - } - if (options == null || options.length == 0) { - return new UpdateOption[] {new Options.RequestIdOption(reqId)}; - } - UpdateOption[] allOptions = new UpdateOption[options.length + 1]; - System.arraycopy(options, 0, allOptions, 0, options.length); - allOptions[options.length] = new Options.RequestIdOption(reqId); - return allOptions; - } - - private TransactionOption[] withReqId( - final XGoogSpannerRequestId reqId, final TransactionOption... options) { - if (reqId == null) { - return options; - } - if (options == null || options.length == 0) { - return new TransactionOption[] {new Options.RequestIdOption(reqId)}; - } - TransactionOption[] allOptions = new TransactionOption[options.length + 1]; - System.arraycopy(options, 0, allOptions, 0, options.length); - allOptions[options.length] = new Options.RequestIdOption(reqId); - return allOptions; - } - - private long executePartitionedUpdateWithPooledSession( - final Statement stmt, final UpdateOption... options) { - ISpan span = tracer.spanBuilder(PARTITION_DML_TRANSACTION, commonAttributes); - try (IScope s = tracer.withSpan(span)) { - return runWithSessionRetry( - (session, reqId) -> { - return session.executePartitionedUpdate(stmt, withReqId(reqId, options)); - }); - } catch (RuntimeException e) { - span.setStatus(e); - span.end(); - throw e; - } - } - - @VisibleForTesting - T runWithSessionRetry(BiFunction callable) { - PooledSessionFuture session = getSession(); - XGoogSpannerRequestId reqId = - XGoogSpannerRequestId.of( - this.dbId, Long.valueOf(session.getChannel()), this.nextNthRequest(), 1); - while (true) { - try { - return callable.apply(session, reqId); - } catch (SessionNotFoundException e) { - session = - (PooledSessionFuture) - pool.getPooledSessionReplacementHandler().replaceSession(e, session); - reqId = - XGoogSpannerRequestId.of( - this.dbId, Long.valueOf(session.getChannel()), this.nextNthRequest(), 1); - } - } + return multiplexedSessionDatabaseClient.getDialectAsync(); } boolean isValid() { - return pool.isValid() - && (multiplexedSessionDatabaseClient == null - || multiplexedSessionDatabaseClient.isValid() - || !multiplexedSessionDatabaseClient.isMultiplexedSessionsSupported()); + return multiplexedSessionDatabaseClient.isValid(); } ListenableFuture closeAsync(ClosedException closedException) { - if (this.multiplexedSessionDatabaseClient != null) { - // This method is non-blocking. - this.multiplexedSessionDatabaseClient.close(); - } - return pool.closeAsync(closedException); + // This method is non-blocking. + this.multiplexedSessionDatabaseClient.close(); + return Futures.immediateVoidFuture(); } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseNotFoundException.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseNotFoundException.java index 474acb04890..cc4a2e32f0b 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseNotFoundException.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseNotFoundException.java @@ -35,7 +35,7 @@ public class DatabaseNotFoundException extends ResourceNotFoundException { @Nullable String message, ResourceInfo resourceInfo, @Nullable Throwable cause) { - this(token, message, resourceInfo, cause, null, null); + this(token, message, resourceInfo, cause, null); } /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ @@ -44,8 +44,7 @@ public class DatabaseNotFoundException extends ResourceNotFoundException { @Nullable String message, ResourceInfo resourceInfo, @Nullable Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId reqId) { - super(token, message, resourceInfo, cause, apiException, reqId); + @Nullable ApiException apiException) { + super(token, message, resourceInfo, cause, apiException); } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java index debb07d7af4..81e29cfda48 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DelayedMultiplexedSessionTransaction.java @@ -44,17 +44,19 @@ class DelayedMultiplexedSessionTransaction extends AbstractMultiplexedSessionDat private final ISpan span; private final ApiFuture sessionFuture; - private final SessionPool sessionPool; DelayedMultiplexedSessionTransaction( MultiplexedSessionDatabaseClient client, ISpan span, - ApiFuture sessionFuture, - SessionPool sessionPool) { + ApiFuture sessionFuture) { this.client = client; this.span = span; this.sessionFuture = sessionFuture; - this.sessionPool = sessionPool; + } + + @Override + public String getDatabaseRole() { + return this.client.getDatabaseRole(); } @Override @@ -192,12 +194,7 @@ public TransactionRunner readWriteTransaction(TransactionOption... options) { this.sessionFuture, sessionReference -> new MultiplexedSessionTransaction( - client, - span, - sessionReference, - NO_CHANNEL_HINT, - /* singleUse= */ false, - this.sessionPool) + client, span, sessionReference, NO_CHANNEL_HINT, /* singleUse= */ false) .readWriteTransaction(options), MoreExecutors.directExecutor())); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcResultSet.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcResultSet.java index c2a4ee5a585..80a9dfcf533 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcResultSet.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcResultSet.java @@ -16,7 +16,7 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException; +import static com.google.cloud.spanner.SpannerExceptionFactory.asSpannerException; import static com.google.common.base.Preconditions.checkState; import com.google.api.core.InternalApi; @@ -76,7 +76,7 @@ protected GrpcStruct currRow() { @Override public boolean next() throws SpannerException { if (error != null) { - throw newSpannerException(error); + throw asSpannerException(error); } try { if (currRow == null) { @@ -108,8 +108,9 @@ public boolean next() throws SpannerException { return hasNext; } catch (Throwable t) { throw yieldError( - SpannerExceptionFactory.asSpannerException(t), - iterator.isWithBeginTransaction() && currRow == null); + asSpannerException(t), + iterator.isWithBeginTransaction() && currRow == null, + iterator.isLastStatement()); } } @@ -149,8 +150,9 @@ public Type getType() { return currRow.getType(); } - private SpannerException yieldError(SpannerException e, boolean beginTransaction) { - SpannerException toThrow = listener.onError(e, beginTransaction); + private SpannerException yieldError( + SpannerException e, boolean beginTransaction, boolean lastStatement) { + SpannerException toThrow = listener.onError(e, beginTransaction, lastStatement); close(); throw toThrow; } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcStreamIterator.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcStreamIterator.java index 46107de897a..e0df4c422e3 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcStreamIterator.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcStreamIterator.java @@ -49,20 +49,26 @@ class GrpcStreamIterator extends AbstractIterator private SpannerRpc.StreamingCall call; private volatile boolean withBeginTransaction; + private final boolean lastStatement; private TimeUnit streamWaitTimeoutUnit; private long streamWaitTimeoutValue; private SpannerException error; private boolean done; @VisibleForTesting - GrpcStreamIterator(int prefetchChunks, boolean cancelQueryWhenClientIsClosed) { - this(null, prefetchChunks, cancelQueryWhenClientIsClosed); + GrpcStreamIterator( + boolean lastStatement, int prefetchChunks, boolean cancelQueryWhenClientIsClosed) { + this(null, lastStatement, prefetchChunks, cancelQueryWhenClientIsClosed); } @VisibleForTesting GrpcStreamIterator( - Statement statement, int prefetchChunks, boolean cancelQueryWhenClientIsClosed) { + Statement statement, + boolean lastStatement, + int prefetchChunks, + boolean cancelQueryWhenClientIsClosed) { this.statement = statement; + this.lastStatement = lastStatement; this.prefetchChunks = prefetchChunks; this.consumer = new ConsumerImpl(cancelQueryWhenClientIsClosed); // One extra to allow for END_OF_STREAM message. @@ -118,6 +124,11 @@ public boolean isWithBeginTransaction() { return withBeginTransaction; } + @Override + public boolean isLastStatement() { + return lastStatement; + } + @Override protected final PartialResultSet computeNext() { PartialResultSet next; @@ -144,7 +155,7 @@ protected final PartialResultSet computeNext() { call = null; if (error != null) { - throw SpannerExceptionFactory.newSpannerException(error); + throw SpannerExceptionFactory.asSpannerException(error); } endOfData(); @@ -181,25 +192,17 @@ public void onCompleted() { } @Override - public void onError(SpannerException e) { + public void onError(SpannerException exception) { if (statement != null) { if (logger.isLoggable(Level.FINEST)) { // Include parameter values if logging level is set to FINEST or higher. - e = - SpannerExceptionFactory.newSpannerExceptionPreformatted( - e.getErrorCode(), - String.format("%s - Statement: '%s'", e.getMessage(), statement.toString()), - e); - logger.log(Level.FINEST, "Error executing statement", e); + exception.setStatement(statement.toString()); + logger.log(Level.FINEST, "Error executing statement", exception); } else { - e = - SpannerExceptionFactory.newSpannerExceptionPreformatted( - e.getErrorCode(), - String.format("%s - Statement: '%s'", e.getMessage(), statement.getSql()), - e); + exception.setStatement(statement.getSql()); } } - error = e; + error = exception; addToStream(END_OF_STREAM); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcValueIterator.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcValueIterator.java index 5d1a884a9de..09b850c93f3 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcValueIterator.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/GrpcValueIterator.java @@ -183,6 +183,10 @@ boolean isWithBeginTransaction() { return stream.isWithBeginTransaction(); } + boolean isLastStatement() { + return stream.isLastStatement(); + } + /** * @param a is a mutable list and b will be concatenated into a. */ diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/InstanceNotFoundException.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/InstanceNotFoundException.java index 5139cd3894e..dc4192e109f 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/InstanceNotFoundException.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/InstanceNotFoundException.java @@ -35,7 +35,7 @@ public class InstanceNotFoundException extends ResourceNotFoundException { @Nullable String message, ResourceInfo resourceInfo, @Nullable Throwable cause) { - this(token, message, resourceInfo, cause, null, null); + this(token, message, resourceInfo, cause, null); } /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ @@ -44,8 +44,7 @@ public class InstanceNotFoundException extends ResourceNotFoundException { @Nullable String message, ResourceInfo resourceInfo, @Nullable Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId reqId) { - super(token, message, resourceInfo, cause, apiException, reqId); + @Nullable ApiException apiException) { + super(token, message, resourceInfo, cause, apiException); } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MissingDefaultSequenceKindException.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MissingDefaultSequenceKindException.java index 80e0ac7efaa..d29a9489c3e 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MissingDefaultSequenceKindException.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MissingDefaultSequenceKindException.java @@ -38,9 +38,8 @@ public class MissingDefaultSequenceKindException extends SpannerException { ErrorCode errorCode, String message, Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId reqId) { - super(token, errorCode, /* retryable= */ false, message, cause, apiException, reqId); + @Nullable ApiException apiException) { + super(token, errorCode, /* retryable= */ false, message, cause, apiException); } static boolean isMissingDefaultSequenceKindException(Throwable cause) { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java index ef1f4a88945..1021e1c469d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClient.java @@ -17,7 +17,6 @@ package com.google.cloud.spanner; import static com.google.cloud.spanner.SessionImpl.NO_CHANNEL_HINT; -import static com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; @@ -27,19 +26,15 @@ import com.google.cloud.spanner.Options.TransactionOption; import com.google.cloud.spanner.Options.UpdateOption; import com.google.cloud.spanner.SessionClient.SessionConsumer; -import com.google.cloud.spanner.SessionPool.SessionPoolTransactionRunner; import com.google.cloud.spanner.SpannerException.ResourceNotFoundException; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; -import com.google.common.util.concurrent.MoreExecutors; import com.google.spanner.v1.BatchWriteResponse; -import com.google.spanner.v1.BeginTransactionRequest; -import com.google.spanner.v1.RequestOptions; -import com.google.spanner.v1.Transaction; import java.time.Clock; import java.time.Duration; import java.time.Instant; import java.util.BitSet; +import java.util.EnumSet; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ExecutionException; @@ -49,99 +44,31 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; -/** - * {@link TransactionRunner} that automatically handles "UNIMPLEMENTED" errors with the message - * "Transaction type read_write not supported with multiplexed sessions" by switching from a - * multiplexed session to a regular session and then restarts the transaction. - */ -class MultiplexedSessionTransactionRunner implements TransactionRunner { - private final SessionPool sessionPool; - private final TransactionRunnerImpl transactionRunnerForMultiplexedSession; - private SessionPoolTransactionRunner transactionRunnerForRegularSession; - private final TransactionOption[] options; - private boolean isUsingMultiplexedSession = true; - - public MultiplexedSessionTransactionRunner( - SessionImpl multiplexedSession, SessionPool sessionPool, TransactionOption... options) { - this.sessionPool = sessionPool; - this.transactionRunnerForMultiplexedSession = - new TransactionRunnerImpl( - multiplexedSession, options); // Uses multiplexed session initially - multiplexedSession.setActive(this.transactionRunnerForMultiplexedSession); - this.options = options; - } - - private TransactionRunner getRunner() { - if (this.isUsingMultiplexedSession) { - return this.transactionRunnerForMultiplexedSession; - } else { - if (this.transactionRunnerForRegularSession == null) { - this.transactionRunnerForRegularSession = - new SessionPoolTransactionRunner<>( - sessionPool.getSession(), - sessionPool.getPooledSessionReplacementHandler(), - options); - } - return this.transactionRunnerForRegularSession; - } - } - - @Override - public T run(TransactionCallable callable) { - while (true) { - try { - return getRunner().run(callable); - } catch (SpannerException e) { - if (e.getErrorCode() == ErrorCode.UNIMPLEMENTED - && verifyUnimplementedErrorMessageForRWMux(e)) { - this.isUsingMultiplexedSession = false; // Fallback to regular session - } else { - throw e; // Other errors propagate - } - } - } - } - - @Override - public Timestamp getCommitTimestamp() { - return getRunner().getCommitTimestamp(); - } - - @Override - public CommitResponse getCommitResponse() { - return getRunner().getCommitResponse(); - } - - @Override - public TransactionRunner allowNestedTransaction() { - getRunner().allowNestedTransaction(); - return this; - } - - private boolean verifyUnimplementedErrorMessageForRWMux(SpannerException spannerException) { - if (spannerException.getCause() == null) { - return false; - } - if (spannerException.getCause().getMessage() == null) { - return false; - } - return spannerException - .getCause() - .getMessage() - .contains("Transaction type read_write not supported with multiplexed sessions"); - } -} - /** * {@link DatabaseClient} implementation that uses a single multiplexed session to execute * transactions. */ final class MultiplexedSessionDatabaseClient extends AbstractMultiplexedSessionDatabaseClient { + /** + * The maximum number of attempts that the client will try to execute CreateSession for the + * initial multiplexed session. This value is only used for the very first multiplexed session + * that is created, and it is only used if the application has not set a waitForMinSessions value. + * If waitForMinSessions has been set, then the client will retry until the duration in + * waitForMinSessions has been reached. + */ + private static final int MAX_INITIAL_CREATE_SESSION_ATTEMPTS = 10; + + @VisibleForTesting + static final Statement DETERMINE_DIALECT_STATEMENT = + Statement.newBuilder( + "select option_value " + + "from information_schema.database_options " + + "where option_name='database_dialect'") + .build(); /** * Represents a single transaction on a multiplexed session. This can be both a single-use or @@ -160,7 +87,6 @@ static class MultiplexedSessionTransaction extends SessionImpl { private final int singleUseChannelHint; private boolean done; - private final SessionPool pool; MultiplexedSessionTransaction( MultiplexedSessionDatabaseClient client, @@ -168,22 +94,11 @@ static class MultiplexedSessionTransaction extends SessionImpl { SessionReference sessionReference, int singleUseChannelHint, boolean singleUse) { - this(client, span, sessionReference, singleUseChannelHint, singleUse, null); - } - - MultiplexedSessionTransaction( - MultiplexedSessionDatabaseClient client, - ISpan span, - SessionReference sessionReference, - int singleUseChannelHint, - boolean singleUse, - SessionPool pool) { super(client.sessionClient.getSpanner(), sessionReference, singleUseChannelHint); this.client = client; this.singleUse = singleUse; this.singleUseChannelHint = singleUseChannelHint; this.client.numSessionsAcquired.incrementAndGet(); - this.pool = pool; setCurrentSpan(span); } @@ -197,15 +112,6 @@ void onError(SpannerException spannerException) { // synchronizing, as it does not really matter exactly which error is set. this.client.resourceNotFoundException.set((ResourceNotFoundException) spannerException); } - // Mark multiplexed sessions for RW as unimplemented and fall back to regular sessions if - // UNIMPLEMENTED with error message "Transaction type read_write not supported with - // multiplexed sessions" is returned. - this.client.maybeMarkUnimplementedForRW(spannerException); - // Mark multiplexed sessions for Partitioned Ops as unimplemented and fall back to regular - // sessions if - // UNIMPLEMENTED with error message "Partitioned operations are not supported with multiplexed - // sessions". - this.client.maybeMarkUnimplementedForPartitionedOps(spannerException); } @Override @@ -231,11 +137,6 @@ public CommitResponse writeAtLeastOnceWithOptions( return response; } - @Override - public TransactionRunner readWriteTransaction(TransactionOption... options) { - return new MultiplexedSessionTransactionRunner(this, pool, options); - } - @Override void onTransactionDone() { boolean markedDone = false; @@ -262,6 +163,9 @@ public void close() { */ private static final Map CHANNEL_USAGE = new HashMap<>(); + private static final EnumSet RETRYABLE_ERROR_CODES = + EnumSet.of(ErrorCode.DEADLINE_EXCEEDED, ErrorCode.RESOURCE_EXHAUSTED, ErrorCode.UNAVAILABLE); + private final BitSet channelUsage; private final int numChannels; @@ -283,12 +187,6 @@ public void close() { /** The current multiplexed session that is used by this client. */ private final AtomicReference> multiplexedSessionReference; - /** - * The Transaction response returned by the BeginTransaction request with read-write when a - * multiplexed session is created during client initialization. - */ - private final SettableApiFuture readWriteBeginTransactionReferenceFuture; - /** The expiration date/time of the current multiplexed session. */ private final AtomicReference expirationDate; @@ -309,26 +207,6 @@ public void close() { private final AtomicLong numSessionsReleased = new AtomicLong(); - /** - * This flag is set to true if the server return UNIMPLEMENTED when we try to create a multiplexed - * session. TODO: Remove once this is guaranteed to be available. - */ - private final AtomicBoolean unimplemented = new AtomicBoolean(false); - - /** - * This flag is set to true if the server return UNIMPLEMENTED when a read-write transaction is - * executed on a multiplexed session. TODO: Remove once this is guaranteed to be available. - */ - @VisibleForTesting final AtomicBoolean unimplementedForRW = new AtomicBoolean(false); - - /** - * This flag is set to true if the server return UNIMPLEMENTED when partitioned transaction is - * executed on a multiplexed session. TODO: Remove once this is guaranteed to be available. - */ - @VisibleForTesting final AtomicBoolean unimplementedForPartitionedOps = new AtomicBoolean(false); - - private SessionPool pool; - MultiplexedSessionDatabaseClient(SessionClient sessionClient) { this(sessionClient, Clock.systemUTC()); } @@ -356,31 +234,28 @@ public void close() { this.tracer = sessionClient.getSpanner().getTracer(); final SettableApiFuture initialSessionReferenceFuture = SettableApiFuture.create(); - this.readWriteBeginTransactionReferenceFuture = SettableApiFuture.create(); this.multiplexedSessionReference = new AtomicReference<>(initialSessionReferenceFuture); + + Duration waitDuration = + sessionClient.getSpanner().getOptions().getSessionPoolOptions().getWaitForMinSessions(); + int initialAttempts = + waitDuration == null || waitDuration.isZero() ? MAX_INITIAL_CREATE_SESSION_ATTEMPTS : 1; + asyncCreateMultiplexedSession(initialSessionReferenceFuture, initialAttempts); + maybeWaitForSessionCreation( + sessionClient.getSpanner().getOptions().getSessionPoolOptions(), + initialSessionReferenceFuture); + } + + private void asyncCreateMultiplexedSession( + SettableApiFuture sessionReferenceFuture, int remainingAttempts) { this.sessionClient.asyncCreateMultiplexedSession( new SessionConsumer() { @Override public void onSessionReady(SessionImpl session) { - initialSessionReferenceFuture.set(session.getSessionReference()); + sessionReferenceFuture.set(session.getSessionReference()); // only start the maintainer if we actually managed to create a session in the first // place. maintainer.start(); - - // initiate a begin transaction request to verify if read-write transactions are - // supported using multiplexed sessions. - if (sessionClient - .getSpanner() - .getOptions() - .getSessionPoolOptions() - .getUseMultiplexedSessionForRW() - && !sessionClient - .getSpanner() - .getOptions() - .getSessionPoolOptions() - .getSkipVerifyBeginTransactionForMuxRW()) { - verifyBeginTransactionWithRWOnMultiplexedSessionAsync(session.getName()); - } if (sessionClient .getSpanner() .getOptions() @@ -392,120 +267,78 @@ public void onSessionReady(SessionImpl session) { @Override public void onSessionCreateFailure(Throwable t, int createFailureForSessionCount) { - // Mark multiplexes sessions as unimplemented and fall back to regular sessions if - // UNIMPLEMENTED is returned. - maybeMarkUnimplemented(t); - initialSessionReferenceFuture.setException(t); + SpannerException spannerException = SpannerExceptionFactory.asSpannerException(t); + if (MultiplexedSessionDatabaseClient.this.resourceNotFoundException.get() == null + && (spannerException instanceof DatabaseNotFoundException + || spannerException instanceof InstanceNotFoundException + || spannerException instanceof SessionNotFoundException)) { + // This could in theory set this field more than once, but we don't want to bother + // with synchronizing, as it does not really matter exactly which error is set. + MultiplexedSessionDatabaseClient.this.resourceNotFoundException.set( + (ResourceNotFoundException) spannerException); + } + // Set the exception to trigger an error for all waiters. + // Then retry the session creation if the error is (potentially) transient. + sessionReferenceFuture.setException(t); + if (remainingAttempts > 1 + && RETRYABLE_ERROR_CODES.contains(spannerException.getErrorCode())) { + final SettableApiFuture future = SettableApiFuture.create(); + MultiplexedSessionDatabaseClient.this.multiplexedSessionReference.set(future); + asyncCreateMultiplexedSession(future, remainingAttempts - 1); + } } }); - maybeWaitForSessionCreation( - sessionClient.getSpanner().getOptions().getSessionPoolOptions(), - initialSessionReferenceFuture); - } - - void setPool(SessionPool pool) { - this.pool = pool; } - private static void maybeWaitForSessionCreation( - SessionPoolOptions sessionPoolOptions, ApiFuture future) { + private void maybeWaitForSessionCreation( + SessionPoolOptions sessionPoolOptions, + SettableApiFuture initialSessionReferenceFuture) { Duration waitDuration = sessionPoolOptions.getWaitForMinSessions(); if (waitDuration != null && !waitDuration.isZero()) { - long timeoutMillis = waitDuration.toMillis(); - try { - future.get(timeoutMillis, TimeUnit.MILLISECONDS); - } catch (ExecutionException executionException) { - throw SpannerExceptionFactory.asSpannerException(executionException.getCause()); - } catch (InterruptedException interruptedException) { - throw SpannerExceptionFactory.propagateInterrupt(interruptedException); - } catch (TimeoutException timeoutException) { - throw SpannerExceptionFactory.newSpannerException( - ErrorCode.DEADLINE_EXCEEDED, - "Timed out after waiting " + timeoutMillis + "ms for multiplexed session creation"); - } - } - } - - private void maybeMarkUnimplemented(Throwable t) { - SpannerException spannerException = SpannerExceptionFactory.asSpannerException(t); - if (spannerException.getErrorCode() == ErrorCode.UNIMPLEMENTED) { - unimplemented.set(true); - } - } - private void maybeMarkUnimplementedForRW(SpannerException spannerException) { - if (spannerException.getErrorCode() == ErrorCode.UNIMPLEMENTED - && verifyErrorMessage( - spannerException, - "Transaction type read_write not supported with multiplexed sessions")) { - unimplementedForRW.set(true); - } - } - - boolean maybeMarkUnimplementedForPartitionedOps(SpannerException spannerException) { - if (spannerException.getErrorCode() == ErrorCode.UNIMPLEMENTED - && verifyErrorMessage( - spannerException, - "Transaction type partitioned_dml not supported with multiplexed sessions")) { - unimplementedForPartitionedOps.set(true); - return true; - } - return false; - } - - static boolean verifyErrorMessage(SpannerException spannerException, String message) { - if (spannerException.getCause() == null) { - return false; - } - if (spannerException.getCause().getMessage() == null) { - return false; + SpannerException lastException = null; + SettableApiFuture sessionReferenceFuture = initialSessionReferenceFuture; + Duration remainingTime; + + Instant endTime = Instant.now().plus(waitDuration); + while ((remainingTime = Duration.between(Instant.now(), endTime)).toMillis() > 0) { + // If any exception is thrown, then retry the multiplexed session creation + if (sessionReferenceFuture == null) { + sessionReferenceFuture = SettableApiFuture.create(); + asyncCreateMultiplexedSession(sessionReferenceFuture, 1); + this.multiplexedSessionReference.set(sessionReferenceFuture); + } + try { + sessionReferenceFuture.get(remainingTime.toMillis(), TimeUnit.MILLISECONDS); + lastException = null; + break; + } catch (ExecutionException executionException) { + lastException = SpannerExceptionFactory.asSpannerException(executionException.getCause()); + } catch (InterruptedException interruptedException) { + lastException = SpannerExceptionFactory.propagateInterrupt(interruptedException); + } catch (TimeoutException timeoutException) { + lastException = + SpannerExceptionFactory.newSpannerException( + ErrorCode.DEADLINE_EXCEEDED, + "Timed out after waiting " + + waitDuration.toMillis() + + "ms for multiplexed session creation"); + } + // if any exception is thrown, then set the session reference to null to retry the + // multiplexed session creation only if the error code is DEADLINE EXCEEDED, UNAVAILABLE or + // RESOURCE_EXHAUSTED + if (RETRYABLE_ERROR_CODES.contains(lastException.getErrorCode())) { + sessionReferenceFuture = null; + } else { + break; + } + } + // if the wait time elapsed and multiplexed session fetch failed then throw the last exception + // that we have received + if (lastException != null) { + throw lastException; + } } - return spannerException.getCause().getMessage().contains(message); - } - - private void verifyBeginTransactionWithRWOnMultiplexedSessionAsync(String sessionName) { - // TODO: Remove once this is guaranteed to be available. - // annotate the explict BeginTransactionRequest with a transaction tag - // "multiplexed-rw-background-begin-txn" to avoid storing this request on mock spanner. - // this is to safeguard other mock spanner tests whose BeginTransaction request count will - // otherwise increase by 1. Modifying the unit tests do not seem valid since this code is - // temporary and will be removed once the read-write on multiplexed session looks stable at - // backend. - BeginTransactionRequest.Builder requestBuilder = - BeginTransactionRequest.newBuilder() - .setSession(sessionName) - .setOptions( - SessionImpl.createReadWriteTransactionOptions( - Options.fromTransactionOptions(), /* previousTransactionId= */ null)) - .setRequestOptions( - RequestOptions.newBuilder() - .setTransactionTag("multiplexed-rw-background-begin-txn") - .build()); - final BeginTransactionRequest request = requestBuilder.build(); - final ApiFuture requestFuture; - requestFuture = - sessionClient - .getSpanner() - .getRpc() - .beginTransactionAsync(request, /* options= */ null, /* routeToLeader= */ true); - requestFuture.addListener( - () -> { - try { - Transaction txn = requestFuture.get(); - if (txn.getId().isEmpty()) { - throw newSpannerException( - ErrorCode.INTERNAL, "Missing id in transaction\n" + sessionName); - } - readWriteBeginTransactionReferenceFuture.set(txn); - } catch (Exception e) { - SpannerException spannerException = SpannerExceptionFactory.newSpannerException(e); - // Mark multiplexed sessions for RW as unimplemented and fall back to regular sessions - // if UNIMPLEMENTED is returned. - maybeMarkUnimplementedForRW(spannerException); - readWriteBeginTransactionReferenceFuture.setException(e); - } - }, - MoreExecutors.directExecutor()); } boolean isValid() { @@ -520,18 +353,6 @@ AtomicLong getNumSessionsReleased() { return this.numSessionsReleased; } - boolean isMultiplexedSessionsSupported() { - return !this.unimplemented.get(); - } - - boolean isMultiplexedSessionsForRWSupported() { - return !this.unimplementedForRW.get(); - } - - boolean isMultiplexedSessionsForPartitionedOpsSupported() { - return !this.unimplementedForPartitionedOps.get(); - } - void close() { synchronized (this) { if (!this.isClosed) { @@ -557,17 +378,6 @@ SessionReference getCurrentSessionReference() { } } - @VisibleForTesting - Transaction getReadWriteBeginTransactionReference() { - try { - return this.readWriteBeginTransactionReferenceFuture.get(); - } catch (ExecutionException executionException) { - throw SpannerExceptionFactory.asSpannerException(executionException.getCause()); - } catch (InterruptedException interruptedException) { - throw SpannerExceptionFactory.propagateInterrupt(interruptedException); - } - } - /** * Returns true if the multiplexed session has been created. This client can be used before the * session has been created, and will in that case use a delayed transaction that contains a @@ -597,8 +407,7 @@ private MultiplexedSessionTransaction createDirectMultiplexedSessionTransaction( // any special handling of such errors. multiplexedSessionReference.get().get(), singleUse ? getSingleUseChannelHint() : NO_CHANNEL_HINT, - singleUse, - this.pool); + singleUse); } catch (ExecutionException executionException) { throw SpannerExceptionFactory.asSpannerException(executionException.getCause()); } catch (InterruptedException interruptedException) { @@ -608,7 +417,7 @@ private MultiplexedSessionTransaction createDirectMultiplexedSessionTransaction( private DelayedMultiplexedSessionTransaction createDelayedMultiplexSessionTransaction() { return new DelayedMultiplexedSessionTransaction( - this, tracer.getCurrentSpan(), multiplexedSessionReference.get(), this.pool); + this, tracer.getCurrentSpan(), multiplexedSessionReference.get()); } private int getSingleUseChannelHint() { @@ -633,8 +442,7 @@ private int getSingleUseChannelHint() { new AbstractLazyInitializer() { @Override protected Dialect initialize() { - try (ResultSet dialectResultSet = - singleUse().executeQuery(SessionPool.DETERMINE_DIALECT_STATEMENT)) { + try (ResultSet dialectResultSet = singleUse().executeQuery(DETERMINE_DIALECT_STATEMENT)) { if (dialectResultSet.next()) { return Dialect.fromName(dialectResultSet.getString(0)); } @@ -661,6 +469,11 @@ Future getDialectAsync() { } } + @Override + public String getDatabaseRole() { + return this.sessionClient.getSpanner().getOptions().getDatabaseRole(); + } + @Override public Timestamp write(Iterable mutations) throws SpannerException { return createMultiplexedSessionTransaction(/* singleUse= */ false).write(mutations); @@ -745,7 +558,7 @@ public AsyncTransactionManager transactionManagerAsync(TransactionOption... opti @Override public long executePartitionedUpdate(Statement stmt, UpdateOption... options) { - return createMultiplexedSessionTransaction(/* singleUse= */ true) + return createMultiplexedSessionTransaction(/* singleUse= */ false) .executePartitionedUpdate(stmt, options); } @@ -771,7 +584,7 @@ final class MultiplexedSessionMaintainer { this.clock = clock; } - void start() { + private synchronized void start() { // Schedule the maintainer to run once every ten minutes (by default). long loopFrequencyMillis = MultiplexedSessionDatabaseClient.this @@ -786,7 +599,7 @@ void start() { this::maintain, loopFrequencyMillis, loopFrequencyMillis, TimeUnit.MILLISECONDS); } - void stop() { + private synchronized void stop() { if (this.scheduledFuture != null) { this.scheduledFuture.cancel(false); } @@ -811,9 +624,6 @@ public void onSessionCreateFailure(Throwable t, int createFailureForSessionCount // ignore any errors during re-creation of the multiplexed session. This means that // we continue to use the session that has passed its expiration date for now, and // that a new attempt at creating a new session will be done in 10 minutes from now. - // The only exception to this rule is if the server returns UNIMPLEMENTED. In that - // case we invalidate the client and fall back to regular sessions. - maybeMarkUnimplemented(t); } }); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MutableCredentials.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MutableCredentials.java new file mode 100644 index 00000000000..9d09b9fe268 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/MutableCredentials.java @@ -0,0 +1,119 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.spanner; + +import com.google.auth.CredentialTypeForMetrics; +import com.google.auth.Credentials; +import com.google.auth.RequestMetadataCallback; +import com.google.auth.oauth2.ServiceAccountCredentials; +import java.io.IOException; +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.Executor; +import javax.annotation.Nonnull; + +/** + * A mutable {@link Credentials} implementation that delegates authentication behavior to a scoped + * {@link ServiceAccountCredentials} instance. + * + *

This class is intended for scenarios where an application needs to replace the underlying + * service account credentials for a long-running Spanner Client. + * + *

All operations inherited from {@link Credentials} are forwarded to the current delegate, + * including request metadata retrieval and token refresh. Calling {@link + * #updateCredentials(ServiceAccountCredentials)} replaces the delegate with a newly scoped + * credentials instance created from the same scopes that were provided when this object was + * constructed. + */ +public class MutableCredentials extends Credentials { + private volatile ServiceAccountCredentials delegate; + private final Set scopes; + + /** Creates a MutableCredentials instance with default spanner scopes. */ + public MutableCredentials(ServiceAccountCredentials credentials) { + this(credentials, SpannerOptions.SCOPES); + } + + public MutableCredentials( + @Nonnull ServiceAccountCredentials credentials, @Nonnull Set scopes) { + Objects.requireNonNull(credentials, "credentials must not be null"); + Objects.requireNonNull(scopes, "scopes must not be null"); + if (scopes.isEmpty()) { + throw new IllegalArgumentException("Scopes must not be empty"); + } + this.scopes = new java.util.HashSet<>(scopes); + delegate = (ServiceAccountCredentials) credentials.createScoped(this.scopes); + } + + /** + * Replaces the current delegate with a newly scoped credentials instance. + * + *

Note any in-flight RPC may continue to use the old credentials. + * + *

The provided {@link ServiceAccountCredentials} is scoped using the same scopes that were + * supplied when this {@link MutableCredentials} instance was created. + * + * @param credentials the new base service account credentials to scope and use for client + * authorization. + */ + public void updateCredentials(@Nonnull ServiceAccountCredentials credentials) { + Objects.requireNonNull(credentials, "credentials must not be null"); + delegate = (ServiceAccountCredentials) credentials.createScoped(scopes); + } + + @Override + public String getAuthenticationType() { + return delegate.getAuthenticationType(); + } + + @Override + public Map> getRequestMetadata(URI uri) throws IOException { + return delegate.getRequestMetadata(uri); + } + + @Override + public boolean hasRequestMetadata() { + return delegate.hasRequestMetadata(); + } + + @Override + public boolean hasRequestMetadataOnly() { + return delegate.hasRequestMetadataOnly(); + } + + @Override + public void refresh() throws IOException { + delegate.refresh(); + } + + @Override + public void getRequestMetadata(URI uri, Executor executor, RequestMetadataCallback callback) { + delegate.getRequestMetadata(uri, executor, callback); + } + + @Override + public String getUniverseDomain() throws IOException { + return delegate.getUniverseDomain(); + } + + @Override + public CredentialTypeForMetrics getMetricsCredentialType() { + return delegate.getMetricsCredentialType(); + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Mutation.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Mutation.java index c5a09bc3eea..0545221804c 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Mutation.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Mutation.java @@ -21,7 +21,9 @@ import com.google.common.collect.ImmutableList; import com.google.protobuf.ListValue; +import com.google.protobuf.Timestamp; import java.io.Serializable; +import java.time.Instant; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; @@ -87,6 +89,12 @@ public enum Op { /** Deletes rows from a table. Succeeds whether or not the named rows were present. */ DELETE, + + /** Send a message to a queue, optionally with specified delivery time. */ + SEND, + + /** Acknowledge a message in a queue. Ack only succeeds if the message still exists. */ + ACK, } private final String table; @@ -94,6 +102,12 @@ public enum Op { private final ImmutableList columns; private final ImmutableList values; private final KeySet keySet; + // Queue related fields + private final String queue; + private final Key key; + private final Value payload; + private final Instant deliveryTime; + private final boolean ignoreNotFound; private Mutation( String table, @@ -101,11 +115,30 @@ private Mutation( @Nullable ImmutableList columns, @Nullable ImmutableList values, @Nullable KeySet keySet) { + this(table, operation, columns, values, keySet, null, null, null, null, false); + } + + private Mutation( + @Nullable String table, + Op operation, + @Nullable ImmutableList columns, + @Nullable ImmutableList values, + @Nullable KeySet keySet, + @Nullable String queue, + @Nullable Key key, + @Nullable Value payload, + @Nullable Instant deliveryTime, + boolean ignoreNotFound) { this.table = table; this.operation = operation; this.columns = columns; this.values = values; this.keySet = keySet; + this.queue = queue; + this.key = key; + this.payload = payload; + this.deliveryTime = deliveryTime; + this.ignoreNotFound = ignoreNotFound; } /** @@ -153,6 +186,22 @@ public static Mutation delete(String table, KeySet keySet) { return new Mutation(table, Op.DELETE, null, null, checkNotNull(keySet)); } + /** + * Returns a builder that can be used to construct an {@link Op#SEND} mutation against {@code + * queue}; see the {@code SEND} documentation for mutation semantics. + */ + public static SendBuilder newSendBuilder(String queue) { + return new SendBuilder(queue); + } + + /** + * Returns a builder that can be used to construct an {@link Op#ACK} mutation against {@code + * queue}; see the {@code ACK} documentation for mutation semantics. + */ + public static AckBuilder newAckBuilder(String queue) { + return new AckBuilder(queue); + } + /** * Builder for {@link Op#INSERT}, {@link Op#INSERT_OR_UPDATE}, {@link Op#UPDATE}, and {@link * Op#REPLACE} mutations. @@ -227,6 +276,66 @@ private void checkDuplicateColumns(ImmutableList columnNames) { } } + /** Builder for {@link Op#SEND} mutation. */ + public static class SendBuilder { + private final String queue; + private Key key; + private Value payload; + private Instant deliveryTime; + + private SendBuilder(String queue) { + this.queue = checkNotNull(queue); + } + + public SendBuilder setKey(Key key) { + this.key = checkNotNull(key); + return this; + } + + public SendBuilder setPayload(Value payload) { + this.payload = checkNotNull(payload); + return this; + } + + public SendBuilder setDeliveryTime(Instant deliveryTime) { + this.deliveryTime = deliveryTime; + return this; + } + + public Mutation build() { + checkState(key != null, "Key must be set for Send mutation"); + checkState(payload != null, "Payload must be set for Send mutation"); + return new Mutation( + null, Op.SEND, null, null, null, queue, key, payload, deliveryTime, false); + } + } + + /** Builder for {@link Op#ACK} mutation. */ + public static class AckBuilder { + private final String queue; + private Key key; + private boolean ignoreNotFound = false; + + private AckBuilder(String queue) { + this.queue = checkNotNull(queue); + } + + public AckBuilder setKey(Key key) { + this.key = checkNotNull(key); + return this; + } + + public AckBuilder setIgnoreNotFound(boolean ignoreNotFound) { + this.ignoreNotFound = ignoreNotFound; + return this; + } + + public Mutation build() { + checkState(key != null, "Key must be set for Ack mutation"); + return new Mutation(null, Op.ACK, null, null, null, queue, key, null, null, ignoreNotFound); + } + } + /** Returns the name of the table that this mutation will affect. */ public String getTable() { return table; @@ -248,27 +357,72 @@ public Iterable getColumns() { } /** - * For all types except {@link Op#DELETE}, returns the values that this mutation will write. The - * number of elements returned is always the same as the number returned by {@link #getColumns()}, - * and the {@code i}th value corresponds to the {@code i}th column. + * For all types except {@link Op#DELETE}, {@link Op#SEND}, and {@link Op#ACK}, returns the values + * that this mutation will write. The number of elements returned is always the same as the number + * returned by {@link #getColumns()}, and the {@code i}th value corresponds to the {@code i}th + * column. * - * @throws IllegalStateException if {@code operation() == Op.DELETE} + * @throws IllegalStateException if {@code operation() == Op.DELETE or operation() == Op.SEND or + * operation() == Op.ACK} */ public Iterable getValues() { - checkState(operation != Op.DELETE, "values() cannot be called for a DELETE mutation"); + checkState( + operation != Op.DELETE && operation != Op.SEND && operation != Op.ACK, + "values() cannot be called for a DELETE/SEND/ACK mutation"); return values; } + /** Returns the name of the queue that this mutation will affect. */ + public String getQueue() { + checkState( + operation == Op.SEND || operation == Op.ACK, + "getQueue() can only be called " + "for SEND or ACK mutations"); + return queue; + } + + /** Returns the key of the message to the queue that this mutation will affect. */ + public Key getKey() { + checkState( + operation == Op.SEND || operation == Op.ACK, + "getKey() can only be called for " + "SEND or ACK mutations"); + return key; + } + + /** Returns the payload of the message to the queue that this mutation will affect. */ + public Value getPayload() { + checkState(operation == Op.SEND, "getPayload() can only be called for a SEND mutation"); + return payload; + } + + /** Returns the delivery timestamp of the message to the queue that this mutation will affect. */ + @Nullable + public Instant getDeliveryTime() { + checkState(operation == Op.SEND, "getDeliverTime() can only be called for a SEND mutation"); + return deliveryTime; + } + + /** + * Returns whether an error will be ignored for an ACK mutation that affects a message that does + * not exist + */ + public boolean getIgnoreNotFound() { + checkState(operation == Op.ACK, "getIgnoreNotFound() can only be called for an ACK mutation"); + return ignoreNotFound; + } + /** - * For all types except {@link Op#DELETE}, constructs a map from column name to value. This is - * mainly intended as a convenience for testing; direct access via {@link #getColumns()} and - * {@link #getValues()} is more efficient. + * For all types except {@link Op#DELETE}, {@link Op#SEND}, and {@link Op#ACK}, constructs a map + * from column name to value. This is mainly intended as a convenience for testing; direct access + * via {@link #getColumns()} and {@link #getValues()} is more efficient. * - * @throws IllegalStateException if {@code operation() == Op.DELETE}, or if any duplicate columns - * are present. Detection of duplicates does not consider case. + * @throws IllegalStateException if {@code operation() == Op.DELETE or operation() == Op.SEND or + * operation() == Op.ACK}, or if any duplicate columns are present. Detection of duplicates + * does not consider case. */ public Map asMap() { - checkState(operation != Op.DELETE, "asMap() cannot be called for a DELETE mutation"); + checkState( + operation != Op.DELETE && operation != Op.SEND && operation != Op.ACK, + "asMap() cannot be called for a DELETE/SEND/ACK mutation"); LinkedHashMap map = new LinkedHashMap<>(); for (int i = 0; i < columns.size(); ++i) { Value existing = map.put(columns.get(i), values.get(i)); @@ -310,6 +464,25 @@ void toString(StringBuilder b) { opName = "delete"; isWrite = false; break; + case SEND: + // return directly for SEND + b.append("send(").append(queue).append('{'); + b.append("key=").append(key); + b.append(", payload=").append(payload); + if (deliveryTime != null) { + b.append(", deliveryTime=").append(deliveryTime); + } + b.append("})"); + return; + case ACK: + // return directly for ACK + b.append("ack(").append(queue).append('{'); + b.append("key=").append(key); + if (ignoreNotFound) { + b.append(", ignoreNotFound=true"); + } + b.append("})"); + return; default: throw new AssertionError("Unhandled Op: " + operation); } @@ -348,8 +521,24 @@ public boolean equals(Object o) { } Mutation that = (Mutation) o; - return operation == that.operation - && Objects.equals(table, that.table) + if (operation != that.operation) { + return false; + } + + if (operation == Op.SEND) { + return Objects.equals(queue, that.queue) + && Objects.equals(key, that.key) + && Objects.equals(payload, that.payload) + && Objects.equals(deliveryTime, that.deliveryTime); + } + + if (operation == Op.ACK) { + return Objects.equals(queue, that.queue) + && Objects.equals(key, that.key) + && Objects.equals(ignoreNotFound, that.ignoreNotFound); + } + + return Objects.equals(table, that.table) && Objects.equals(columns, that.columns) && areValuesEqual(values, that.values) && Objects.equals(keySet, that.keySet); @@ -357,7 +546,8 @@ && areValuesEqual(values, that.values) @Override public int hashCode() { - return Objects.hash(operation, table, columns, values, keySet); + return Objects.hash( + operation, table, columns, values, keySet, key, payload, deliveryTime, ignoreNotFound); } /** @@ -435,16 +625,8 @@ static com.google.spanner.v1.Mutation toProtoAndReturnRandomMutation( if (last != null && last.operation == Op.DELETE && mutation.table.equals(last.table)) { mutation.keySet.appendToProto(keySet); } else { - if (proto != null) { - com.google.spanner.v1.Mutation builtMutation = proto.build(); - out.add(builtMutation); - // Skip tracking the largest insert mutation if there are mutations other than INSERT. - if (allMutationsExcludingInsert.isEmpty() - && checkIfInsertMutationWithLargeValue(builtMutation, largestInsertMutation)) { - largestInsertMutation = builtMutation; - } - maybeAddMutationToListExcludingInserts(builtMutation, allMutationsExcludingInsert); - } + largestInsertMutation = + flushMutation(out, proto, allMutationsExcludingInsert, largestInsertMutation); proto = com.google.spanner.v1.Mutation.newBuilder(); com.google.spanner.v1.Mutation.Delete.Builder delete = proto.getDeleteBuilder().setTable(mutation.table); @@ -452,6 +634,33 @@ && checkIfInsertMutationWithLargeValue(builtMutation, largestInsertMutation)) { mutation.keySet.appendToProto(keySet); } write = null; + } else if (mutation.operation == Op.SEND) { + largestInsertMutation = + flushMutation(out, proto, allMutationsExcludingInsert, largestInsertMutation); + proto = com.google.spanner.v1.Mutation.newBuilder(); + com.google.spanner.v1.Mutation.Send.Builder send = + proto + .getSendBuilder() + .setQueue(mutation.queue) + .setKey(mutation.key.toProto()) + .setPayload(mutation.payload.toProto()); + if (mutation.getDeliveryTime() != null) { + Instant deliveryTime = mutation.getDeliveryTime(); + Timestamp.Builder timeBuilder = + send.getDeliverTimeBuilder() + .setSeconds(deliveryTime.getEpochSecond()) + .setNanos(deliveryTime.getNano()); + send.setDeliverTime(timeBuilder); + } + } else if (mutation.operation == Op.ACK) { + largestInsertMutation = + flushMutation(out, proto, allMutationsExcludingInsert, largestInsertMutation); + proto = com.google.spanner.v1.Mutation.newBuilder(); + proto + .getAckBuilder() + .setQueue(mutation.queue) + .setKey(mutation.getKey().toProto()) + .setIgnoreNotFound(mutation.ignoreNotFound); } else { ListValue.Builder values = ListValue.newBuilder(); for (Value value : mutation.getValues()) { @@ -464,16 +673,8 @@ && checkIfInsertMutationWithLargeValue(builtMutation, largestInsertMutation)) { // Same as previous mutation: coalesce values to reduce request size. write.addValues(values); } else { - if (proto != null) { - com.google.spanner.v1.Mutation builtMutation = proto.build(); - out.add(builtMutation); - // Skip tracking the largest insert mutation if there are mutations other than INSERT. - if (allMutationsExcludingInsert.isEmpty() - && checkIfInsertMutationWithLargeValue(builtMutation, largestInsertMutation)) { - largestInsertMutation = builtMutation; - } - maybeAddMutationToListExcludingInserts(builtMutation, allMutationsExcludingInsert); - } + largestInsertMutation = + flushMutation(out, proto, allMutationsExcludingInsert, largestInsertMutation); proto = com.google.spanner.v1.Mutation.newBuilder(); switch (mutation.operation) { case INSERT: @@ -498,9 +699,26 @@ && checkIfInsertMutationWithLargeValue(builtMutation, largestInsertMutation)) { last = mutation; } // Flush last item. + largestInsertMutation = + flushMutation(out, proto, allMutationsExcludingInsert, largestInsertMutation); + + // Select a random mutation based on the heuristic. + if (!allMutationsExcludingInsert.isEmpty()) { + return allMutationsExcludingInsert.get( + ThreadLocalRandom.current().nextInt(allMutationsExcludingInsert.size())); + } else { + return largestInsertMutation; + } + } + + private static com.google.spanner.v1.Mutation flushMutation( + List out, + com.google.spanner.v1.Mutation.Builder proto, + List allMutationsExcludingInsert, + com.google.spanner.v1.Mutation largestInsertMutation) { if (proto != null) { com.google.spanner.v1.Mutation builtMutation = proto.build(); - out.add(proto.build()); + out.add(builtMutation); // Skip tracking the largest insert mutation if there are mutations other than INSERT. if (allMutationsExcludingInsert.isEmpty() && checkIfInsertMutationWithLargeValue(builtMutation, largestInsertMutation)) { @@ -508,14 +726,7 @@ && checkIfInsertMutationWithLargeValue(builtMutation, largestInsertMutation)) { } maybeAddMutationToListExcludingInserts(builtMutation, allMutationsExcludingInsert); } - - // Select a random mutation based on the heuristic. - if (!allMutationsExcludingInsert.isEmpty()) { - return allMutationsExcludingInsert.get( - ThreadLocalRandom.current().nextInt(allMutationsExcludingInsert.size())); - } else { - return largestInsertMutation; - } + return largestInsertMutation; } // Returns true if the input mutation is of type INSERT and has more values than the current diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java index 1e6ce34d672..116e1aa4fc5 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java @@ -20,6 +20,7 @@ import com.google.spanner.v1.DirectedReadOptions; import com.google.spanner.v1.ReadRequest.LockHint; import com.google.spanner.v1.ReadRequest.OrderBy; +import com.google.spanner.v1.RequestOptions; import com.google.spanner.v1.RequestOptions.Priority; import com.google.spanner.v1.TransactionOptions.IsolationLevel; import com.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode; @@ -265,6 +266,37 @@ public static ReadQueryUpdateTransactionOption priority(RpcPriority priority) { return new PriorityOption(priority); } + /** + * Specifying this will add the given client context to the request. The client context is used to + * pass side-channel or configuration information to the backend, such as a user ID for a + * parameterized secure view. + */ + public static ReadQueryUpdateTransactionOption clientContext( + RequestOptions.ClientContext clientContext) { + return new ClientContextOption(clientContext); + } + + RequestOptions toRequestOptionsProto(boolean isTransactionOption) { + if (!hasPriority() && !hasTag() && !hasClientContext()) { + return RequestOptions.getDefaultInstance(); + } + RequestOptions.Builder builder = RequestOptions.newBuilder(); + if (hasPriority()) { + builder.setPriority(priority()); + } + if (hasTag()) { + if (isTransactionOption) { + builder.setTransactionTag(tag()); + } else { + builder.setRequestTag(tag()); + } + } + if (hasClientContext()) { + builder.setClientContext(clientContext()); + } + return builder.build(); + } + public static TransactionOption maxCommitDelay(Duration maxCommitDelay) { Preconditions.checkArgument(!maxCommitDelay.isNegative(), "maxCommitDelay should be positive"); return new MaxCommitDelayOption(maxCommitDelay); @@ -462,6 +494,20 @@ void appendToOptions(Options options) { } } + static final class ClientContextOption extends InternalOption + implements ReadQueryUpdateTransactionOption { + private final RequestOptions.ClientContext clientContext; + + ClientContextOption(RequestOptions.ClientContext clientContext) { + this.clientContext = clientContext; + } + + @Override + void appendToOptions(Options options) { + options.clientContext = clientContext; + } + } + static final class TagOption extends InternalOption implements ReadQueryUpdateTransactionOption { private final String tag; @@ -574,6 +620,7 @@ void appendToOptions(Options options) { private String filter; private RpcPriority priority; private String tag; + private RequestOptions.ClientContext clientContext; private String etag; private Boolean validateOnly; private Boolean withExcludeTxnFromChangeStreams; @@ -666,6 +713,14 @@ Priority priority() { return priority == null ? null : priority.proto; } + boolean hasClientContext() { + return clientContext != null; + } + + RequestOptions.ClientContext clientContext() { + return clientContext; + } + boolean hasTag() { return tag != null; } @@ -777,6 +832,9 @@ public String toString() { if (priority != null) { b.append("priority: ").append(priority).append(' '); } + if (clientContext != null) { + b.append("clientContext: ").append(clientContext).append(' '); + } if (tag != null) { b.append("tag: ").append(tag).append(' '); } @@ -850,6 +908,7 @@ public boolean equals(Object o) { && Objects.equals(pageToken(), that.pageToken()) && Objects.equals(filter(), that.filter()) && Objects.equals(priority(), that.priority()) + && Objects.equals(clientContext(), that.clientContext()) && Objects.equals(tag(), that.tag()) && Objects.equals(etag(), that.etag()) && Objects.equals(validateOnly(), that.validateOnly()) @@ -894,6 +953,9 @@ public int hashCode() { if (priority != null) { result = 31 * result + priority.hashCode(); } + if (clientContext != null) { + result = 31 * result + clientContext.hashCode(); + } if (tag != null) { result = 31 * result + tag.hashCode(); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/PartitionedDmlTransaction.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/PartitionedDmlTransaction.java index 5f0d497c74c..394b8bfbd9e 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/PartitionedDmlTransaction.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/PartitionedDmlTransaction.java @@ -16,6 +16,7 @@ package com.google.cloud.spanner; +import static com.google.cloud.spanner.AbstractReadContext.getChannelHintOptions; import static com.google.common.base.Preconditions.checkState; import com.google.api.core.InternalApi; @@ -42,6 +43,7 @@ import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.Map; +import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; @@ -56,12 +58,16 @@ public class PartitionedDmlTransaction implements SessionImpl.SessionTransaction private final Ticker ticker; private final IsRetryableInternalError isRetryableInternalErrorPredicate; private volatile boolean isValid = true; + private final Map channelHintOptions; PartitionedDmlTransaction(SessionImpl session, SpannerRpc rpc, Ticker ticker) { this.session = session; this.rpc = rpc; this.ticker = ticker; this.isRetryableInternalErrorPredicate = new IsRetryableInternalError(); + this.channelHintOptions = + getChannelHintOptions( + session.getOptions(), ThreadLocalRandom.current().nextLong(Long.MAX_VALUE)); } /** @@ -79,15 +85,13 @@ long executeStreamingPartitionedUpdate( boolean foundStats = false; long updateCount = 0L; Stopwatch stopwatch = Stopwatch.createStarted(ticker); - XGoogSpannerRequestId reqId = - session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); - UpdateOption[] allOptions = new UpdateOption[updateOptions.length + 1]; - System.arraycopy(updateOptions, 0, allOptions, 0, updateOptions.length); - allOptions[allOptions.length - 1] = new Options.RequestIdOption(reqId); - Options options = Options.fromUpdateOptions(allOptions); + Options options = Options.fromUpdateOptions(updateOptions); try { ExecuteSqlRequest request = newTransactionRequestFrom(statement, options); + // The channel ID is set to zero here. It will be filled in later by SpannerRpc when it reads + // the channel hint from the options that are passed in. + XGoogSpannerRequestId requestId = this.session.getRequestIdCreator().nextRequestId(0); while (true) { final Duration remainingTimeout = tryUpdateTimeout(timeout, stopwatch); @@ -95,7 +99,7 @@ long executeStreamingPartitionedUpdate( try { ServerStream stream = rpc.executeStreamingPartitionedDml( - request, reqId.withOptions(session.getOptions()), remainingTimeout); + request, channelHintOptions, requestId, remainingTimeout); for (PartialResultSet rs : stream) { if (rs.getResumeToken() != null && !rs.getResumeToken().isEmpty()) { @@ -110,8 +114,12 @@ long executeStreamingPartitionedUpdate( } catch (UnavailableException e) { LOGGER.log( Level.FINER, "Retrying PartitionedDml transaction after UnavailableException", e); - reqId.incrementAttempt(); request = resumeOrRestartRequest(resumeToken, statement, request, options); + if (resumeToken.isEmpty()) { + // Create a new xGoogSpannerRequestId if there is no resume token, as that means that + // the entire transaction will be retried. + requestId = session.getRequestIdCreator().nextRequestId(session.getChannel()); + } } catch (InternalException e) { if (!isRetryableInternalErrorPredicate.apply(e)) { throw e; @@ -119,8 +127,12 @@ long executeStreamingPartitionedUpdate( LOGGER.log( Level.FINER, "Retrying PartitionedDml transaction after InternalException - EOS", e); - reqId.incrementAttempt(); request = resumeOrRestartRequest(resumeToken, statement, request, options); + if (resumeToken.isEmpty()) { + // Create a new xGoogSpannerRequestId if there is no resume token, as that means that + // the entire transaction will be retried. + requestId = session.getRequestIdCreator().nextRequestId(session.getChannel()); + } } catch (AbortedException e) { LOGGER.log(Level.FINER, "Retrying PartitionedDml transaction after AbortedException", e); resumeToken = ByteString.EMPTY; @@ -128,22 +140,18 @@ long executeStreamingPartitionedUpdate( updateCount = 0L; request = newTransactionRequestFrom(statement, options); // Create a new xGoogSpannerRequestId. - reqId = session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); - } catch (SpannerException e) { - e.setRequestId(reqId); - throw e; + requestId = session.getRequestIdCreator().nextRequestId(session.getChannel()); } } if (!foundStats) { throw SpannerExceptionFactory.newSpannerException( ErrorCode.INVALID_ARGUMENT, - "Partitioned DML response missing stats possibly due to non-DML statement as input", - reqId); + "Partitioned DML response missing stats possibly due to non-DML statement as input"); } LOGGER.log(Level.FINER, "Finished PartitionedUpdate statement"); return updateCount; } catch (Exception e) { - throw SpannerExceptionFactory.newSpannerException(e, reqId); + throw SpannerExceptionFactory.asSpannerException(e); } } @@ -223,14 +231,11 @@ private ByteString initTransaction(final Options options) { .setExcludeTxnFromChangeStreams( options.withExcludeTxnFromChangeStreams() == Boolean.TRUE)) .build(); - XGoogSpannerRequestId reqId = - session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); - Transaction tx = rpc.beginTransaction(request, reqId.withOptions(session.getOptions()), true); + Transaction tx = rpc.beginTransaction(request, channelHintOptions, true); if (tx.getId().isEmpty()) { throw SpannerExceptionFactory.newSpannerException( ErrorCode.INTERNAL, - "Failed to init transaction, missing transaction id\n" + session.getName(), - reqId); + "Failed to init transaction, missing transaction id\n" + session.getName()); } return tx.getId(); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/ResumableStreamIterator.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/ResumableStreamIterator.java index 1240dd631ac..aac7f63c861 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/ResumableStreamIterator.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/ResumableStreamIterator.java @@ -69,10 +69,10 @@ abstract class ResumableStreamIterator extends AbstractIterator stream; + private int attempts; private ByteString resumeToken; private boolean finished; - public XGoogSpannerRequestId xGoogRequestId; - private XGoogSpannerRequestId.RequestIdCreator xGoogRequestIdCreator; + private final XGoogSpannerRequestId requestId; /** * Indicates whether it is currently safe to retry RPCs. This will be {@code false} if we have @@ -119,7 +119,8 @@ protected ResumableStreamIterator( this.errorHandler = errorHandler; this.streamingRetrySettings = Preconditions.checkNotNull(streamingRetrySettings); this.retryableCodes = Preconditions.checkNotNull(retryableCodes); - this.xGoogRequestIdCreator = xGoogRequestIdCreator; + // The channel is automatically updated by the gRPC client when the request is actually sent. + this.requestId = xGoogRequestIdCreator.nextRequestId(0); } private ExponentialBackOff newBackOff() { @@ -187,27 +188,15 @@ private void backoffSleep(Context context, long backoffMillis) throws SpannerExc } if (latch.await(backoffMillis, TimeUnit.MILLISECONDS)) { // Woken by context cancellation. - throw newSpannerExceptionForCancellation(context, null, this.xGoogRequestId); + throw newSpannerExceptionForCancellation(context, null); } } catch (InterruptedException interruptExcept) { - throw newSpannerExceptionForCancellation(context, interruptExcept, this.xGoogRequestId); + throw newSpannerExceptionForCancellation(context, interruptExcept); } finally { context.removeListener(listener); } } - public void ensureNonNullXGoogRequestId() { - if (this.xGoogRequestId == null) { - this.xGoogRequestId = - this.xGoogRequestIdCreator.nextRequestId(1 /*TODO: infer channelId*/, 1 /*attempt*/); - } - } - - public void incrementXGoogRequestIdAttempt() { - this.ensureNonNullXGoogRequestId(); - this.xGoogRequestId.incrementAttempt(); - } - private enum DirectExecutor implements Executor { INSTANCE; @@ -218,7 +207,9 @@ public void execute(Runnable command) { } abstract CloseableIterator startStream( - @Nullable ByteString resumeToken, AsyncResultSet.StreamMessageListener streamMessageListener); + @Nullable ByteString resumeToken, + AsyncResultSet.StreamMessageListener streamMessageListener, + XGoogSpannerRequestId requestId); /** * Prepares the iterator for a retry on a different gRPC channel. Returns true if that is @@ -242,6 +233,11 @@ public boolean isWithBeginTransaction() { return stream != null && stream.isWithBeginTransaction(); } + @Override + public boolean isLastStatement() { + return stream != null && stream.isLastStatement(); + } + @Override @InternalApi public boolean initiateStreaming(AsyncResultSet.StreamMessageListener streamMessageListener) { @@ -299,7 +295,6 @@ protected PartialResultSet computeNext() { } assert buffer.isEmpty() || buffer.getLast().getResumeToken().equals(resumeToken); stream = null; - incrementXGoogRequestIdAttempt(); try (IScope s = tracer.withSpan(span)) { long delay = spannerException.getRetryDelayInMillis(); if (delay != -1) { @@ -321,14 +316,12 @@ protected PartialResultSet computeNext() { if (++numAttemptsOnOtherChannel < errorHandler.getMaxAttempts() && prepareIteratorForRetryOnDifferentGrpcChannel()) { stream = null; - xGoogRequestId = null; continue; } } } span.addAnnotation("Stream broken. Not safe to retry", spannerException); span.setStatus(spannerException); - spannerException.setRequestId(this.xGoogRequestId); throw spannerException; } catch (RuntimeException e) { span.addAnnotation("Stream broken. Not safe to retry", e); @@ -347,13 +340,8 @@ private void startGrpcStreaming() { try (IScope scope = tracer.withSpan(span)) { // When start a new stream set the Span as current to make the gRPC Span a child of // this Span. - stream = checkNotNull(startStream(resumeToken, streamMessageListener)); + stream = checkNotNull(startStream(resumeToken, streamMessageListener, requestId)); stream.requestPrefetchChunks(); - if (this.xGoogRequestId == null) { - this.xGoogRequestId = - this.xGoogRequestIdCreator.nextRequestId( - 1 /* channelId shall be replaced by the instantiated class. */, 0); - } } } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionClient.java index 20c86bdf25b..1fb49f2ced3 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionClient.java @@ -36,7 +36,7 @@ import javax.annotation.concurrent.GuardedBy; /** Client for creating single sessions and batches of sessions. */ -class SessionClient implements AutoCloseable, XGoogSpannerRequestId.RequestIdCreator { +class SessionClient implements AutoCloseable { static class SessionId { private static final PathTemplate NAME_TEMPLATE = PathTemplate.create( @@ -110,15 +110,8 @@ Object value() { return ImmutableMap.copyOf(tmp); } - static Map createRequestOptions( - long channelId, XGoogSpannerRequestId requestId) { - return ImmutableMap.of( - Option.CHANNEL_HINT, channelId, - Option.REQUEST_ID, requestId); - } - - static Map createRequestOptions(XGoogSpannerRequestId requestId) { - return ImmutableMap.of(Option.REQUEST_ID, requestId); + static Map createRequestOptions(long channelId) { + return ImmutableMap.of(Option.CHANNEL_HINT, channelId); } private final class BatchCreateSessionsRunnable implements Runnable { @@ -140,7 +133,7 @@ public void run() { List sessions; int remainingSessionsToCreate = sessionCount; ISpan span = - spanner.getTracer().spanBuilder(SpannerImpl.BATCH_CREATE_SESSIONS, commonAttributes); + spanner.getTracer().spanBuilder(SpannerImpl.BATCH_CREATE_SESSIONS, databaseAttributes); try (IScope s = spanner.getTracer().withSpan(span)) { spanner .getTracer() @@ -185,7 +178,7 @@ interface SessionConsumer { private final ExecutorFactory executorFactory; private final ScheduledExecutorService executor; private final DatabaseId db; - private final Attributes commonAttributes; + private final Attributes databaseAttributes; // SessionClient is created long before a DatabaseClientImpl is created, // as batch sessions are firstly created then later attached to each Client. @@ -204,7 +197,7 @@ interface SessionConsumer { this.db = db; this.executorFactory = executorFactory; this.executor = executorFactory.get(); - this.commonAttributes = spanner.getTracer().createCommonAttributes(db); + this.databaseAttributes = spanner.getTracer().createDatabaseAttributes(db); } @Override @@ -220,12 +213,6 @@ DatabaseId getDatabaseId() { return db; } - @Override - public XGoogSpannerRequestId nextRequestId(long channelId, int attempt) { - return XGoogSpannerRequestId.of( - this.nthId, channelId, this.nthRequest.incrementAndGet(), attempt); - } - /** Create a single session. */ SessionImpl createSession() { // The sessionChannelCounter could overflow, but that will just flip it to Integer.MIN_VALUE, @@ -235,8 +222,8 @@ SessionImpl createSession() { channelId = sessionChannelCounter; sessionChannelCounter++; } - XGoogSpannerRequestId reqId = nextRequestId(channelId, 1); - ISpan span = spanner.getTracer().spanBuilder(SpannerImpl.CREATE_SESSION, this.commonAttributes); + ISpan span = + spanner.getTracer().spanBuilder(SpannerImpl.CREATE_SESSION, this.databaseAttributes); try (IScope s = spanner.getTracer().withSpan(span)) { com.google.spanner.v1.Session session = spanner @@ -245,16 +232,15 @@ SessionImpl createSession() { db.getName(), spanner.getOptions().getDatabaseRole(), spanner.getOptions().getSessionLabels(), - createRequestOptions(channelId, reqId)); + createRequestOptions(channelId)); SessionReference sessionReference = new SessionReference( session.getName(), + spanner.getOptions().getDatabaseRole(), session.getCreateTime(), session.getMultiplexed(), optionMap(SessionOption.channelHint(channelId))); - SessionImpl sessionImpl = new SessionImpl(spanner, sessionReference); - sessionImpl.setRequestIdCreator(this); - return sessionImpl; + return new SessionImpl(spanner, sessionReference); } catch (RuntimeException e) { span.setStatus(e); throw e; @@ -289,10 +275,7 @@ SessionImpl createMultiplexedSession() { ISpan span = spanner .getTracer() - .spanBuilder(SpannerImpl.CREATE_MULTIPLEXED_SESSION, this.commonAttributes); - // MultiplexedSession doesn't use a channelId hence this hard-coded value. - int channelId = 0; - XGoogSpannerRequestId reqId = nextRequestId(channelId, 1); + .spanBuilder(SpannerImpl.CREATE_MULTIPLEXED_SESSION, this.databaseAttributes); try (IScope s = spanner.getTracer().withSpan(span)) { com.google.spanner.v1.Session session = spanner @@ -301,14 +284,17 @@ SessionImpl createMultiplexedSession() { db.getName(), spanner.getOptions().getDatabaseRole(), spanner.getOptions().getSessionLabels(), - createRequestOptions(reqId), + null, true); SessionImpl sessionImpl = new SessionImpl( spanner, new SessionReference( - session.getName(), session.getCreateTime(), session.getMultiplexed(), null)); - sessionImpl.setRequestIdCreator(this); + session.getName(), + spanner.getOptions().getDatabaseRole(), + session.getCreateTime(), + session.getMultiplexed(), + null)); span.addAnnotation( String.format("Request for %d multiplexed session returned %d session", 1, 1)); return sessionImpl; @@ -422,8 +408,6 @@ private List internalBatchCreateSessions( .spanBuilderWithExplicitParent(SpannerImpl.BATCH_CREATE_SESSIONS_REQUEST, parent); span.addAnnotation(String.format("Requesting %d sessions", sessionCount)); try (IScope s = spanner.getTracer().withSpan(span)) { - XGoogSpannerRequestId reqId = - XGoogSpannerRequestId.of(this.nthId, channelHint, this.nthRequest.incrementAndGet(), 1); List sessions = spanner .getRpc() @@ -432,7 +416,7 @@ private List internalBatchCreateSessions( sessionCount, spanner.getOptions().getDatabaseRole(), spanner.getOptions().getSessionLabels(), - createRequestOptions(channelHint, reqId)); + createRequestOptions(channelHint)); span.addAnnotation( String.format( "Request for %d sessions returned %d sessions", sessionCount, sessions.size())); @@ -444,10 +428,10 @@ private List internalBatchCreateSessions( spanner, new SessionReference( session.getName(), + spanner.getOptions().getDatabaseRole(), session.getCreateTime(), session.getMultiplexed(), optionMap(SessionOption.channelHint(channelHint)))); - sessionImpl.setRequestIdCreator(this); res.add(sessionImpl); } return res; @@ -464,8 +448,6 @@ SessionImpl sessionWithId(String name) { synchronized (this) { options = optionMap(SessionOption.channelHint(sessionChannelCounter++)); } - SessionImpl sessionImpl = new SessionImpl(spanner, new SessionReference(name, options)); - sessionImpl.setRequestIdCreator(this); - return sessionImpl; + return new SessionImpl(spanner, new SessionReference(name, /* databaseRole= */ null, options)); } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java index 68c37561c9d..e70ee390df1 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java @@ -126,31 +126,18 @@ interface SessionTransaction { private final Clock clock; private final Map options; private final ErrorHandler errorHandler; - private XGoogSpannerRequestId.RequestIdCreator requestIdCreator; SessionImpl(SpannerImpl spanner, SessionReference sessionReference) { this(spanner, sessionReference, NO_CHANNEL_HINT); } SessionImpl(SpannerImpl spanner, SessionReference sessionReference, int channelHint) { - this(spanner, sessionReference, channelHint, new XGoogSpannerRequestId.NoopRequestIdCreator()); - } - - SessionImpl( - SpannerImpl spanner, - SessionReference sessionReference, - int channelHint, - XGoogSpannerRequestId.RequestIdCreator requestIdCreator) { this.spanner = spanner; this.tracer = spanner.getTracer(); this.sessionReference = sessionReference; this.clock = spanner.getOptions().getSessionPoolOptions().getPoolMaintainerClock(); this.options = createOptions(sessionReference, channelHint); this.errorHandler = createErrorHandler(spanner.getOptions()); - this.requestIdCreator = requestIdCreator; - if (this.requestIdCreator == null) { - throw new IllegalStateException("requestIdCreator must be non-null"); - } } static Map createOptions( @@ -173,6 +160,11 @@ public String getName() { return sessionReference.getName(); } + @Override + public String getDatabaseRole() { + return sessionReference.getDatabaseRole(); + } + /** * Updates the session reference with the fallback session. This should only be used for updating * session reference with regular session in case of unimplemented error in multiplexed session. @@ -189,6 +181,10 @@ ErrorHandler getErrorHandler() { return this.errorHandler; } + SpannerImpl getSpanner() { + return spanner; + } + void setCurrentSpan(ISpan span) { currentSpan = span; } @@ -306,12 +302,7 @@ public CommitResponse writeAtLeastOnceWithOptions( try (IScope s = tracer.withSpan(span)) { return SpannerRetryHelper.runTxWithRetriesOnAborted( - () -> { - // On Aborted, we have to start a fresh request id. - final XGoogSpannerRequestId reqId = reqIdOrFresh(options); - return new CommitResponse( - spanner.getRpc().commit(request, reqId.withOptions(getOptions()))); - }); + () -> new CommitResponse(spanner.getRpc().commit(request, getOptions()))); } catch (RuntimeException e) { span.setStatus(e); throw e; @@ -320,14 +311,6 @@ public CommitResponse writeAtLeastOnceWithOptions( } } - private XGoogSpannerRequestId reqIdOrFresh(Options options) { - XGoogSpannerRequestId reqId = options.reqId(); - if (reqId == null) { - reqId = this.getRequestIdCreator().nextRequestId(this.getChannel(), 1); - } - return reqId; - } - private RequestOptions getRequestOptions(TransactionOption... transactionOptions) { Options requestOptions = Options.fromTransactionOptions(transactionOptions); if (requestOptions.hasPriority() || requestOptions.hasTag()) { @@ -356,7 +339,6 @@ public ServerStream batchWriteAtLeastOnce( .addAllMutationGroups(mutationGroupsProto); RequestOptions batchWriteRequestOptions = getRequestOptions(transactionOptions); Options allOptions = Options.fromTransactionOptions(transactionOptions); - final XGoogSpannerRequestId reqId = reqIdOrFresh(allOptions); if (batchWriteRequestOptions != null) { requestBuilder.setRequestOptions(batchWriteRequestOptions); } @@ -365,9 +347,7 @@ public ServerStream batchWriteAtLeastOnce( } ISpan span = tracer.spanBuilder(SpannerImpl.BATCH_WRITE); try (IScope s = tracer.withSpan(span)) { - return spanner - .getRpc() - .batchWriteAtLeastOnce(requestBuilder.build(), reqId.withOptions(getOptions())); + return spanner.getRpc().batchWriteAtLeastOnce(requestBuilder.build(), getOptions()); } catch (Throwable e) { span.setStatus(e); throw SpannerExceptionFactory.newSpannerException(e); @@ -471,8 +451,7 @@ public ApiFuture asyncClose() { if (getIsMultiplexed()) { return com.google.api.core.ApiFutures.immediateFuture(Empty.getDefaultInstance()); } - XGoogSpannerRequestId reqId = this.getRequestIdCreator().nextRequestId(this.getChannel(), 1); - return spanner.getRpc().asyncDeleteSession(getName(), reqId.withOptions(getOptions())); + return spanner.getRpc().asyncDeleteSession(getName(), getOptions()); } @Override @@ -482,8 +461,7 @@ public void close() { } ISpan span = tracer.spanBuilder(SpannerImpl.DELETE_SESSION); try (IScope s = tracer.withSpan(span)) { - XGoogSpannerRequestId reqId = this.getRequestIdCreator().nextRequestId(this.getChannel(), 1); - spanner.getRpc().deleteSession(getName(), reqId.withOptions(getOptions())); + spanner.getRpc().deleteSession(getName(), getOptions()); } catch (RuntimeException e) { span.setStatus(e); throw e; @@ -511,14 +489,27 @@ ApiFuture beginTransactionAsync( if (sessionReference.getIsMultiplexed() && mutation != null) { requestBuilder.setMutationKey(mutation); } + RequestOptions.Builder optionsBuilder = + transactionOptions.toRequestOptionsProto(true).toBuilder(); + RequestOptions.ClientContext defaultClientContext = spanner.getOptions().getClientContext(); + if (defaultClientContext != null) { + RequestOptions.ClientContext.Builder builder = defaultClientContext.toBuilder(); + if (optionsBuilder.hasClientContext()) { + builder.mergeFrom(optionsBuilder.getClientContext()); + } + optionsBuilder.setClientContext(builder.build()); + } + if (!sessionReference.getIsMultiplexed()) { + optionsBuilder.clearTransactionTag(); + } + RequestOptions requestOptions = optionsBuilder.build(); + if (!requestOptions.equals(RequestOptions.getDefaultInstance())) { + requestBuilder.setRequestOptions(requestOptions); + } final BeginTransactionRequest request = requestBuilder.build(); final ApiFuture requestFuture; - XGoogSpannerRequestId reqId = this.getRequestIdCreator().nextRequestId(this.getChannel(), 1); try (IScope ignore = tracer.withSpan(span)) { - requestFuture = - spanner - .getRpc() - .beginTransactionAsync(request, reqId.withOptions(channelHint), routeToLeader); + requestFuture = spanner.getRpc().beginTransactionAsync(request, channelHint, routeToLeader); } requestFuture.addListener( () -> { @@ -526,7 +517,7 @@ ApiFuture beginTransactionAsync( Transaction txn = requestFuture.get(); if (txn.getId().isEmpty()) { throw newSpannerException( - ErrorCode.INTERNAL, "Missing id in transaction\n" + getName(), reqId); + ErrorCode.INTERNAL, "Missing id in transaction\n" + getName()); } span.end(); res.set(txn); @@ -535,7 +526,7 @@ ApiFuture beginTransactionAsync( span.end(); res.setException( SpannerExceptionFactory.newSpannerException( - e.getCause() == null ? e : e.getCause(), reqId)); + e.getCause() == null ? e : e.getCause())); } catch (InterruptedException e) { span.setStatus(e); span.end(); @@ -597,12 +588,8 @@ TraceWrapper getTracer() { return tracer; } - public void setRequestIdCreator(XGoogSpannerRequestId.RequestIdCreator creator) { - this.requestIdCreator = creator; - } - public XGoogSpannerRequestId.RequestIdCreator getRequestIdCreator() { - return this.requestIdCreator; + return this.spanner.getRpc().getRequestIdCreator(); } int getChannel() { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionNotFoundException.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionNotFoundException.java index c17384db3ec..f4a62b1954a 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionNotFoundException.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionNotFoundException.java @@ -35,7 +35,7 @@ public class SessionNotFoundException extends ResourceNotFoundException { @Nullable String message, ResourceInfo resourceInfo, @Nullable Throwable cause) { - this(token, message, resourceInfo, cause, null, null); + this(token, message, resourceInfo, cause, null); } /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ @@ -44,8 +44,7 @@ public class SessionNotFoundException extends ResourceNotFoundException { @Nullable String message, ResourceInfo resourceInfo, @Nullable Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId reqId) { - super(token, message, resourceInfo, cause, apiException, reqId); + @Nullable ApiException apiException) { + super(token, message, resourceInfo, cause, apiException); } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java deleted file mode 100644 index 42a67a66296..00000000000 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java +++ /dev/null @@ -1,3516 +0,0 @@ -/* - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.cloud.spanner.MetricRegistryConstants.COUNT; -import static com.google.cloud.spanner.MetricRegistryConstants.GET_SESSION_TIMEOUTS; -import static com.google.cloud.spanner.MetricRegistryConstants.IS_MULTIPLEXED; -import static com.google.cloud.spanner.MetricRegistryConstants.MAX_ALLOWED_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.MAX_ALLOWED_SESSIONS_DESCRIPTION; -import static com.google.cloud.spanner.MetricRegistryConstants.MAX_IN_USE_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.MAX_IN_USE_SESSIONS_DESCRIPTION; -import static com.google.cloud.spanner.MetricRegistryConstants.METRIC_PREFIX; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_ACQUIRED_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_ACQUIRED_SESSIONS_DESCRIPTION; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_IN_USE_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_READ_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_RELEASED_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_RELEASED_SESSIONS_DESCRIPTION; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_SESSIONS_AVAILABLE; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_SESSIONS_BEING_PREPARED; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_SESSIONS_IN_POOL; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_SESSIONS_IN_POOL_DESCRIPTION; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_SESSIONS_IN_USE; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_WRITE_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.SESSIONS_TIMEOUTS_DESCRIPTION; -import static com.google.cloud.spanner.MetricRegistryConstants.SESSIONS_TYPE; -import static com.google.cloud.spanner.MetricRegistryConstants.SPANNER_DEFAULT_LABEL_VALUES; -import static com.google.cloud.spanner.MetricRegistryConstants.SPANNER_LABEL_KEYS; -import static com.google.cloud.spanner.MetricRegistryConstants.SPANNER_LABEL_KEYS_WITH_MULTIPLEXED_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.SPANNER_LABEL_KEYS_WITH_TYPE; -import static com.google.cloud.spanner.SpannerExceptionFactory.asSpannerException; -import static com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException; -import static com.google.common.base.Preconditions.checkState; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.SettableApiFuture; -import com.google.api.gax.core.ExecutorProvider; -import com.google.api.gax.rpc.ServerStream; -import com.google.cloud.Timestamp; -import com.google.cloud.Tuple; -import com.google.cloud.grpc.GrpcTransportOptions; -import com.google.cloud.grpc.GrpcTransportOptions.ExecutorFactory; -import com.google.cloud.spanner.Options.QueryOption; -import com.google.cloud.spanner.Options.ReadOption; -import com.google.cloud.spanner.Options.TransactionOption; -import com.google.cloud.spanner.Options.UpdateOption; -import com.google.cloud.spanner.SessionClient.SessionConsumer; -import com.google.cloud.spanner.SessionPoolOptions.InactiveTransactionRemovalOptions; -import com.google.cloud.spanner.SpannerException.ResourceNotFoundException; -import com.google.cloud.spanner.SpannerImpl.ClosedException; -import com.google.cloud.spanner.spi.v1.SpannerRpc; -import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.MoreObjects; -import com.google.common.base.Preconditions; -import com.google.common.base.Ticker; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import com.google.common.collect.ImmutableList; -import com.google.common.util.concurrent.ForwardingListenableFuture; -import com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture; -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.common.util.concurrent.SettableFuture; -import com.google.protobuf.Empty; -import com.google.spanner.v1.BatchWriteResponse; -import com.google.spanner.v1.ResultSetStats; -import io.opencensus.metrics.DerivedLongCumulative; -import io.opencensus.metrics.DerivedLongGauge; -import io.opencensus.metrics.LabelValue; -import io.opencensus.metrics.MetricOptions; -import io.opencensus.metrics.MetricRegistry; -import io.opencensus.metrics.Metrics; -import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.api.common.Attributes; -import io.opentelemetry.api.common.AttributesBuilder; -import io.opentelemetry.api.metrics.Meter; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.time.Duration; -import java.time.Instant; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import java.util.Random; -import java.util.Set; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Executor; -import java.util.concurrent.Future; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; -import java.util.function.Function; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import javax.annotation.concurrent.GuardedBy; - -/** - * Maintains a pool of sessions. This class itself is thread safe and is meant to be used - * concurrently across multiple threads. - */ -class SessionPool { - - private static final Logger logger = Logger.getLogger(SessionPool.class.getName()); - private final TraceWrapper tracer; - static final String WAIT_FOR_SESSION = "SessionPool.WaitForSession"; - - /** - * If the {@link SessionPoolOptions#getWaitForMinSessions()} duration is greater than zero, waits - * for the creation of at least {@link SessionPoolOptions#getMinSessions()} in the pool using the - * given duration. If the waiting times out, a {@link SpannerException} with the {@link - * ErrorCode#DEADLINE_EXCEEDED} is thrown. - */ - void maybeWaitOnMinSessions() { - final long timeoutNanos = options.getWaitForMinSessions().toNanos(); - if (timeoutNanos <= 0) { - return; - } - - try { - if (!waitOnMinSessionsLatch.await(timeoutNanos, TimeUnit.NANOSECONDS)) { - final long timeoutMillis = options.getWaitForMinSessions().toMillis(); - throw SpannerExceptionFactory.newSpannerException( - ErrorCode.DEADLINE_EXCEEDED, - "Timed out after waiting " + timeoutMillis + "ms for session pool creation"); - } - } catch (InterruptedException e) { - throw SpannerExceptionFactory.propagateInterrupt(e); - } - } - - private abstract static class CachedResultSetSupplier - implements com.google.common.base.Supplier { - - private ResultSet cached; - - abstract ResultSet load(); - - ResultSet reload() { - return cached = load(); - } - - @Override - public ResultSet get() { - if (cached == null) { - cached = load(); - } - return cached; - } - } - - /** - * Wrapper around {@code ReadContext} that releases the session to the pool once the call is - * finished, if it is a single use context. - */ - private static class AutoClosingReadContext - implements ReadContext { - /** - * {@link AsyncResultSet} implementation that keeps track of the async operations that are still - * running for this {@link ReadContext} and that should finish before the {@link ReadContext} - * releases its session back into the pool. - */ - private class AutoClosingReadContextAsyncResultSetImpl extends AsyncResultSetImpl { - private AutoClosingReadContextAsyncResultSetImpl( - ExecutorProvider executorProvider, ResultSet delegate, int bufferRows) { - super(executorProvider, delegate, bufferRows); - } - - @Override - public ApiFuture setCallback(Executor exec, ReadyCallback cb) { - Runnable listener = - () -> { - synchronized (lock) { - if (asyncOperationsCount.decrementAndGet() == 0 && closed) { - // All async operations for this read context have finished. - AutoClosingReadContext.this.close(); - } - } - }; - try { - asyncOperationsCount.incrementAndGet(); - addListener(listener); - return super.setCallback(exec, cb); - } catch (Throwable t) { - removeListener(listener); - asyncOperationsCount.decrementAndGet(); - throw t; - } - } - } - - private final Function readContextDelegateSupplier; - private T readContextDelegate; - private final SessionPool sessionPool; - private final SessionReplacementHandler sessionReplacementHandler; - private final boolean isSingleUse; - private final AtomicInteger asyncOperationsCount = new AtomicInteger(); - - private final Object lock = new Object(); - - @GuardedBy("lock") - private boolean sessionUsedForQuery = false; - - @GuardedBy("lock") - private I session; - - @GuardedBy("lock") - private boolean closed; - - @GuardedBy("lock") - private boolean delegateClosed; - - private AutoClosingReadContext( - Function delegateSupplier, - SessionPool sessionPool, - SessionReplacementHandler sessionReplacementHandler, - I session, - boolean isSingleUse) { - this.readContextDelegateSupplier = delegateSupplier; - this.sessionPool = sessionPool; - this.sessionReplacementHandler = sessionReplacementHandler; - this.session = session; - this.isSingleUse = isSingleUse; - } - - T getReadContextDelegate() { - synchronized (lock) { - if (readContextDelegate == null) { - while (true) { - try { - this.readContextDelegate = readContextDelegateSupplier.apply(this.session); - break; - } catch (SessionNotFoundException e) { - replaceSessionIfPossible(e); - } - } - } - } - return readContextDelegate; - } - - private ResultSet wrap(final CachedResultSetSupplier resultSetSupplier) { - return new ForwardingResultSet(resultSetSupplier) { - private boolean beforeFirst = true; - - @Override - public boolean next() throws SpannerException { - while (true) { - try { - return internalNext(); - } catch (SessionNotFoundException e) { - while (true) { - // Keep the replace-if-possible outside the try-block to let the exception bubble up - // if it's too late to replace the session. - replaceSessionIfPossible(e); - try { - replaceDelegate(resultSetSupplier.reload()); - break; - } catch (SessionNotFoundException snfe) { - e = snfe; - // retry on yet another session. - } - } - } - } - } - - private boolean internalNext() { - try { - boolean ret = super.next(); - if (beforeFirst) { - synchronized (lock) { - session.get().markUsed(); - beforeFirst = false; - sessionUsedForQuery = true; - } - } - if (!ret && isSingleUse) { - close(); - } - return ret; - } catch (SessionNotFoundException e) { - throw e; - } catch (SpannerException e) { - synchronized (lock) { - if (!closed && isSingleUse) { - session.get().setLastException(e); - AutoClosingReadContext.this.close(); - } - } - throw e; - } - } - - @Override - public void close() { - try { - super.close(); - } finally { - if (isSingleUse) { - AutoClosingReadContext.this.close(); - } - } - } - }; - } - - private void replaceSessionIfPossible(SessionNotFoundException notFound) { - synchronized (lock) { - if (isSingleUse || !sessionUsedForQuery) { - // This class is only used by read-only transactions, so we know that we only need a - // read-only session. - session = sessionReplacementHandler.replaceSession(notFound, session); - readContextDelegate = readContextDelegateSupplier.apply(session); - } else { - throw notFound; - } - } - } - - @Override - public ResultSet read( - final String table, - final KeySet keys, - final Iterable columns, - final ReadOption... options) { - return wrap( - new CachedResultSetSupplier() { - @Override - ResultSet load() { - return getReadContextDelegate().read(table, keys, columns, options); - } - }); - } - - @Override - public AsyncResultSet readAsync( - final String table, - final KeySet keys, - final Iterable columns, - final ReadOption... options) { - Options readOptions = Options.fromReadOptions(options); - final int bufferRows = - readOptions.hasBufferRows() - ? readOptions.bufferRows() - : AsyncResultSetImpl.DEFAULT_BUFFER_SIZE; - return new AutoClosingReadContextAsyncResultSetImpl( - sessionPool.sessionClient.getSpanner().getAsyncExecutorProvider(), - wrap( - new CachedResultSetSupplier() { - @Override - ResultSet load() { - return getReadContextDelegate().read(table, keys, columns, options); - } - }), - bufferRows); - } - - @Override - public ResultSet readUsingIndex( - final String table, - final String index, - final KeySet keys, - final Iterable columns, - final ReadOption... options) { - return wrap( - new CachedResultSetSupplier() { - @Override - ResultSet load() { - return getReadContextDelegate().readUsingIndex(table, index, keys, columns, options); - } - }); - } - - @Override - public AsyncResultSet readUsingIndexAsync( - final String table, - final String index, - final KeySet keys, - final Iterable columns, - final ReadOption... options) { - Options readOptions = Options.fromReadOptions(options); - final int bufferRows = - readOptions.hasBufferRows() - ? readOptions.bufferRows() - : AsyncResultSetImpl.DEFAULT_BUFFER_SIZE; - return new AutoClosingReadContextAsyncResultSetImpl( - sessionPool.sessionClient.getSpanner().getAsyncExecutorProvider(), - wrap( - new CachedResultSetSupplier() { - @Override - ResultSet load() { - return getReadContextDelegate() - .readUsingIndex(table, index, keys, columns, options); - } - }), - bufferRows); - } - - @Override - @Nullable - public Struct readRow(String table, Key key, Iterable columns) { - try { - while (true) { - try { - synchronized (lock) { - session.get().markUsed(); - } - return getReadContextDelegate().readRow(table, key, columns); - } catch (SessionNotFoundException e) { - replaceSessionIfPossible(e); - } - } - } finally { - synchronized (lock) { - sessionUsedForQuery = true; - } - if (isSingleUse) { - close(); - } - } - } - - @Override - public ApiFuture readRowAsync(String table, Key key, Iterable columns) { - try (AsyncResultSet rs = readAsync(table, KeySet.singleKey(key), columns)) { - return AbstractReadContext.consumeSingleRowAsync(rs); - } - } - - @Override - @Nullable - public Struct readRowUsingIndex(String table, String index, Key key, Iterable columns) { - try { - while (true) { - try { - synchronized (lock) { - session.get().markUsed(); - } - return getReadContextDelegate().readRowUsingIndex(table, index, key, columns); - } catch (SessionNotFoundException e) { - replaceSessionIfPossible(e); - } - } - } finally { - synchronized (lock) { - sessionUsedForQuery = true; - } - if (isSingleUse) { - close(); - } - } - } - - @Override - public ApiFuture readRowUsingIndexAsync( - String table, String index, Key key, Iterable columns) { - try (AsyncResultSet rs = readUsingIndexAsync(table, index, KeySet.singleKey(key), columns)) { - return AbstractReadContext.consumeSingleRowAsync(rs); - } - } - - @Override - public ResultSet executeQuery(final Statement statement, final QueryOption... options) { - return wrap( - new CachedResultSetSupplier() { - @Override - ResultSet load() { - return getReadContextDelegate().executeQuery(statement, options); - } - }); - } - - @Override - public AsyncResultSet executeQueryAsync( - final Statement statement, final QueryOption... options) { - Options queryOptions = Options.fromQueryOptions(options); - final int bufferRows = - queryOptions.hasBufferRows() - ? queryOptions.bufferRows() - : AsyncResultSetImpl.DEFAULT_BUFFER_SIZE; - return new AutoClosingReadContextAsyncResultSetImpl( - sessionPool.sessionClient.getSpanner().getAsyncExecutorProvider(), - wrap( - new CachedResultSetSupplier() { - @Override - ResultSet load() { - return getReadContextDelegate().executeQuery(statement, options); - } - }), - bufferRows); - } - - @Override - public ResultSet analyzeQuery(final Statement statement, final QueryAnalyzeMode queryMode) { - return wrap( - new CachedResultSetSupplier() { - @Override - ResultSet load() { - return getReadContextDelegate().analyzeQuery(statement, queryMode); - } - }); - } - - @Override - public void close() { - synchronized (lock) { - if (closed && delegateClosed) { - return; - } - closed = true; - if (asyncOperationsCount.get() == 0) { - if (readContextDelegate != null) { - readContextDelegate.close(); - } - session.close(); - delegateClosed = true; - } - } - } - } - - private static class AutoClosingReadTransaction - extends AutoClosingReadContext implements ReadOnlyTransaction { - - AutoClosingReadTransaction( - Function txnSupplier, - SessionPool sessionPool, - SessionReplacementHandler sessionReplacementHandler, - I session, - boolean isSingleUse) { - super(txnSupplier, sessionPool, sessionReplacementHandler, session, isSingleUse); - } - - @Override - public Timestamp getReadTimestamp() { - return getReadContextDelegate().getReadTimestamp(); - } - } - - interface SessionReplacementHandler { - T replaceSession(SessionNotFoundException notFound, T sessionFuture); - - T denyListSession(RetryOnDifferentGrpcChannelException retryException, T sessionFuture); - } - - class PooledSessionReplacementHandler implements SessionReplacementHandler { - @Override - public PooledSessionFuture replaceSession( - SessionNotFoundException e, PooledSessionFuture session) { - if (!options.isFailIfSessionNotFound() && session.get().isAllowReplacing()) { - synchronized (lock) { - numSessionsInUse--; - numSessionsReleased++; - checkedOutSessions.remove(session); - markedCheckedOutSessions.remove(session); - } - session.leakedException = null; - invalidateSession(session.get()); - return getSession(); - } else { - throw e; - } - } - - @Override - public PooledSessionFuture denyListSession( - RetryOnDifferentGrpcChannelException retryException, PooledSessionFuture session) { - // The feature was not enabled when the session pool was created. - if (denyListedChannels == null) { - throw SpannerExceptionFactory.asSpannerException(retryException.getCause()); - } - - int channel = session.get().getChannel(); - synchronized (lock) { - // Calculate the size manually by iterating over the possible keys. We do this because the - // size of a cache can be stale, and manually checking for each possible key will make sure - // we get the correct value, and it will update the cache. - int currentSize = 0; - for (int i = 0; i < numChannels; i++) { - if (denyListedChannels.getIfPresent(i) != null) { - currentSize++; - } - } - if (currentSize < numChannels - 1) { - denyListedChannels.put(channel, DENY_LISTED); - } else { - // We have now deny-listed all channels. Give up and just throw the original error. - throw SpannerExceptionFactory.asSpannerException(retryException.getCause()); - } - } - session.get().releaseToPosition = Position.LAST; - session.close(); - return getSession(); - } - } - - interface SessionNotFoundHandler { - /** - * Handles the given {@link SessionNotFoundException} by possibly converting it to a different - * exception that should be thrown. - */ - SpannerException handleSessionNotFound(SessionNotFoundException notFound); - } - - static class SessionPoolResultSet extends ForwardingResultSet { - private final SessionNotFoundHandler handler; - - private SessionPoolResultSet(SessionNotFoundHandler handler, ResultSet delegate) { - super(delegate); - this.handler = Preconditions.checkNotNull(handler); - } - - @Override - public boolean next() { - try { - return super.next(); - } catch (SessionNotFoundException e) { - throw handler.handleSessionNotFound(e); - } - } - } - - static class AsyncSessionPoolResultSet extends ForwardingAsyncResultSet { - private final SessionNotFoundHandler handler; - - private AsyncSessionPoolResultSet(SessionNotFoundHandler handler, AsyncResultSet delegate) { - super(delegate); - this.handler = Preconditions.checkNotNull(handler); - } - - @Override - public ApiFuture setCallback(Executor executor, final ReadyCallback callback) { - return super.setCallback( - executor, - resultSet -> { - try { - return callback.cursorReady(resultSet); - } catch (SessionNotFoundException e) { - throw handler.handleSessionNotFound(e); - } - }); - } - - @Override - public boolean next() { - try { - return super.next(); - } catch (SessionNotFoundException e) { - throw handler.handleSessionNotFound(e); - } - } - - @Override - public CursorState tryNext() { - try { - return super.tryNext(); - } catch (SessionNotFoundException e) { - throw handler.handleSessionNotFound(e); - } - } - } - - /** - * {@link TransactionContext} that is used in combination with an {@link - * AutoClosingTransactionManager}. This {@link TransactionContext} handles {@link - * SessionNotFoundException}s by replacing the underlying session with a fresh one, and then - * throws an {@link AbortedException} to trigger the retry-loop that has been created by the - * caller. - */ - static class SessionPoolTransactionContext implements TransactionContext { - private final SessionNotFoundHandler handler; - final TransactionContext delegate; - - SessionPoolTransactionContext(SessionNotFoundHandler handler, TransactionContext delegate) { - this.handler = Preconditions.checkNotNull(handler); - this.delegate = delegate; - } - - @Override - public ResultSet read( - String table, KeySet keys, Iterable columns, ReadOption... options) { - return new SessionPoolResultSet(handler, delegate.read(table, keys, columns, options)); - } - - @Override - public AsyncResultSet readAsync( - String table, KeySet keys, Iterable columns, ReadOption... options) { - return new AsyncSessionPoolResultSet( - handler, delegate.readAsync(table, keys, columns, options)); - } - - @Override - public ResultSet readUsingIndex( - String table, String index, KeySet keys, Iterable columns, ReadOption... options) { - return new SessionPoolResultSet( - handler, delegate.readUsingIndex(table, index, keys, columns, options)); - } - - @Override - public AsyncResultSet readUsingIndexAsync( - String table, String index, KeySet keys, Iterable columns, ReadOption... options) { - return new AsyncSessionPoolResultSet( - handler, delegate.readUsingIndexAsync(table, index, keys, columns, options)); - } - - @Override - public Struct readRow(String table, Key key, Iterable columns) { - try { - return delegate.readRow(table, key, columns); - } catch (SessionNotFoundException e) { - throw handler.handleSessionNotFound(e); - } - } - - @Override - public ApiFuture readRowAsync(String table, Key key, Iterable columns) { - try (AsyncResultSet rs = readAsync(table, KeySet.singleKey(key), columns)) { - return ApiFutures.catching( - AbstractReadContext.consumeSingleRowAsync(rs), - SessionNotFoundException.class, - input -> { - throw handler.handleSessionNotFound(input); - }, - MoreExecutors.directExecutor()); - } - } - - @Override - public void buffer(Mutation mutation) { - delegate.buffer(mutation); - } - - @Override - public ApiFuture bufferAsync(Mutation mutation) { - return delegate.bufferAsync(mutation); - } - - @Override - public Struct readRowUsingIndex(String table, String index, Key key, Iterable columns) { - try { - return delegate.readRowUsingIndex(table, index, key, columns); - } catch (SessionNotFoundException e) { - throw handler.handleSessionNotFound(e); - } - } - - @Override - public ApiFuture readRowUsingIndexAsync( - String table, String index, Key key, Iterable columns) { - try (AsyncResultSet rs = readUsingIndexAsync(table, index, KeySet.singleKey(key), columns)) { - return ApiFutures.catching( - AbstractReadContext.consumeSingleRowAsync(rs), - SessionNotFoundException.class, - input -> { - throw handler.handleSessionNotFound(input); - }, - MoreExecutors.directExecutor()); - } - } - - @Override - public void buffer(Iterable mutations) { - delegate.buffer(mutations); - } - - @Override - public ApiFuture bufferAsync(Iterable mutations) { - return delegate.bufferAsync(mutations); - } - - @SuppressWarnings("deprecation") - @Override - public ResultSetStats analyzeUpdate( - Statement statement, QueryAnalyzeMode analyzeMode, UpdateOption... options) { - try (ResultSet resultSet = analyzeUpdateStatement(statement, analyzeMode, options)) { - return resultSet.getStats(); - } - } - - @Override - public ResultSet analyzeUpdateStatement( - Statement statement, QueryAnalyzeMode analyzeMode, UpdateOption... options) { - try { - return delegate.analyzeUpdateStatement(statement, analyzeMode, options); - } catch (SessionNotFoundException e) { - throw handler.handleSessionNotFound(e); - } - } - - @Override - public long executeUpdate(Statement statement, UpdateOption... options) { - try { - return delegate.executeUpdate(statement, options); - } catch (SessionNotFoundException e) { - throw handler.handleSessionNotFound(e); - } - } - - @Override - public ApiFuture executeUpdateAsync(Statement statement, UpdateOption... options) { - return ApiFutures.catching( - delegate.executeUpdateAsync(statement, options), - SessionNotFoundException.class, - input -> { - throw handler.handleSessionNotFound(input); - }, - MoreExecutors.directExecutor()); - } - - @Override - public long[] batchUpdate(Iterable statements, UpdateOption... options) { - try { - return delegate.batchUpdate(statements, options); - } catch (SessionNotFoundException e) { - throw handler.handleSessionNotFound(e); - } - } - - @Override - public ApiFuture batchUpdateAsync( - Iterable statements, UpdateOption... options) { - return ApiFutures.catching( - delegate.batchUpdateAsync(statements, options), - SessionNotFoundException.class, - input -> { - throw handler.handleSessionNotFound(input); - }, - MoreExecutors.directExecutor()); - } - - @Override - public ResultSet executeQuery(Statement statement, QueryOption... options) { - return new SessionPoolResultSet(handler, delegate.executeQuery(statement, options)); - } - - @Override - public AsyncResultSet executeQueryAsync(Statement statement, QueryOption... options) { - return new AsyncSessionPoolResultSet(handler, delegate.executeQueryAsync(statement, options)); - } - - @Override - public ResultSet analyzeQuery(Statement statement, QueryAnalyzeMode queryMode) { - return new SessionPoolResultSet(handler, delegate.analyzeQuery(statement, queryMode)); - } - - @Override - public void close() { - delegate.close(); - } - } - - private static class AutoClosingTransactionManager - implements TransactionManager, SessionNotFoundHandler { - private TransactionManager delegate; - private T session; - private final SessionReplacementHandler sessionReplacementHandler; - private final TransactionOption[] options; - private boolean closed; - private boolean restartedAfterSessionNotFound; - - AutoClosingTransactionManager( - T session, - SessionReplacementHandler sessionReplacementHandler, - TransactionOption... options) { - this.session = session; - this.options = options; - this.sessionReplacementHandler = sessionReplacementHandler; - } - - @Override - public TransactionContext begin() { - this.delegate = session.get().transactionManager(options); - // This cannot throw a SessionNotFoundException, as it does not call the BeginTransaction RPC. - // Instead, the BeginTransaction will be included with the first statement of the transaction. - return internalBegin(); - } - - @Override - public TransactionContext begin(AbortedException exception) { - // For regular sessions, the input exception is ignored and the behavior is equivalent to - // calling {@link #begin()}. - return begin(); - } - - private TransactionContext internalBegin() { - TransactionContext res = new SessionPoolTransactionContext(this, delegate.begin()); - session.get().markUsed(); - return res; - } - - @Override - public SpannerException handleSessionNotFound(SessionNotFoundException notFoundException) { - session = sessionReplacementHandler.replaceSession(notFoundException, session); - CachedSession cachedSession = session.get(); - delegate = cachedSession.getDelegate().transactionManager(options); - restartedAfterSessionNotFound = true; - return createAbortedExceptionWithMinimalRetryDelay(notFoundException); - } - - private static SpannerException createAbortedExceptionWithMinimalRetryDelay( - SessionNotFoundException notFoundException) { - return SpannerExceptionFactory.newSpannerException( - ErrorCode.ABORTED, - notFoundException.getMessage(), - SpannerExceptionFactory.createAbortedExceptionWithRetryDelay( - notFoundException.getMessage(), notFoundException, 0, 1)); - } - - @Override - public void commit() { - try { - delegate.commit(); - } catch (SessionNotFoundException e) { - throw handleSessionNotFound(e); - } finally { - if (getState() != TransactionState.ABORTED) { - close(); - } - } - } - - @Override - public void rollback() { - try { - delegate.rollback(); - } finally { - close(); - } - } - - @Override - public TransactionContext resetForRetry() { - while (true) { - try { - if (restartedAfterSessionNotFound) { - TransactionContext res = new SessionPoolTransactionContext(this, delegate.begin()); - restartedAfterSessionNotFound = false; - return res; - } else { - return new SessionPoolTransactionContext(this, delegate.resetForRetry()); - } - } catch (SessionNotFoundException e) { - session = sessionReplacementHandler.replaceSession(e, session); - CachedSession cachedSession = session.get(); - delegate = cachedSession.getDelegate().transactionManager(options); - restartedAfterSessionNotFound = true; - } - } - } - - @Override - public Timestamp getCommitTimestamp() { - return delegate.getCommitTimestamp(); - } - - @Override - public CommitResponse getCommitResponse() { - return delegate.getCommitResponse(); - } - - @Override - public void close() { - if (closed) { - return; - } - closed = true; - try { - if (delegate != null) { - delegate.close(); - } - } finally { - session.close(); - } - } - - @Override - public TransactionState getState() { - if (restartedAfterSessionNotFound) { - return TransactionState.ABORTED; - } else { - return delegate == null ? null : delegate.getState(); - } - } - } - - /** - * {@link TransactionRunner} that automatically handles {@link SessionNotFoundException}s by - * replacing the underlying session and then restarts the transaction. - */ - static final class SessionPoolTransactionRunner - implements TransactionRunner { - - private I session; - private final SessionReplacementHandler sessionReplacementHandler; - private final TransactionOption[] options; - private TransactionRunner runner; - - SessionPoolTransactionRunner( - I session, - SessionReplacementHandler sessionReplacementHandler, - TransactionOption... options) { - this.session = session; - this.options = options; - this.sessionReplacementHandler = sessionReplacementHandler; - } - - private TransactionRunner getRunner() { - if (this.runner == null) { - this.runner = session.get().readWriteTransaction(options); - } - return runner; - } - - @Override - @Nullable - public T run(TransactionCallable callable) { - try { - T result; - while (true) { - try { - result = getRunner().run(callable); - break; - } catch (SessionNotFoundException e) { - session = sessionReplacementHandler.replaceSession(e, session); - CachedSession cachedSession = session.get(); - runner = cachedSession.getDelegate().readWriteTransaction(); - } catch (RetryOnDifferentGrpcChannelException retryException) { - // This error is thrown by the RetryOnDifferentGrpcChannelErrorHandler in the specific - // case that a transaction failed with a DEADLINE_EXCEEDED error. This is an - // experimental feature that is disabled by default, and that can be removed in a - // future version. - session = sessionReplacementHandler.denyListSession(retryException, session); - CachedSession cachedSession = session.get(); - runner = cachedSession.getDelegate().readWriteTransaction(); - } - } - session.get().markUsed(); - return result; - } catch (SpannerException e) { - //noinspection ThrowableNotThrown - session.get().setLastException(e); - throw e; - } finally { - session.close(); - } - } - - @Override - public Timestamp getCommitTimestamp() { - return getRunner().getCommitTimestamp(); - } - - @Override - public CommitResponse getCommitResponse() { - return getRunner().getCommitResponse(); - } - - @Override - public TransactionRunner allowNestedTransaction() { - getRunner().allowNestedTransaction(); - return this; - } - } - - private static class SessionPoolAsyncRunner implements AsyncRunner { - private volatile I session; - private final SessionReplacementHandler sessionReplacementHandler; - private final TransactionOption[] options; - private SettableApiFuture commitResponse; - - private SessionPoolAsyncRunner( - I session, - SessionReplacementHandler sessionReplacementHandler, - TransactionOption... options) { - this.session = session; - this.options = options; - this.sessionReplacementHandler = sessionReplacementHandler; - } - - @Override - public ApiFuture runAsync(final AsyncWork work, Executor executor) { - commitResponse = SettableApiFuture.create(); - final SettableApiFuture res = SettableApiFuture.create(); - executor.execute( - () -> { - SpannerException exception = null; - R r = null; - AsyncRunner runner = null; - while (true) { - SpannerException se = null; - try { - runner = session.get().runAsync(options); - r = runner.runAsync(work, MoreExecutors.directExecutor()).get(); - break; - } catch (ExecutionException e) { - se = asSpannerException(e.getCause()); - } catch (InterruptedException e) { - se = SpannerExceptionFactory.propagateInterrupt(e); - } catch (Throwable t) { - se = SpannerExceptionFactory.newSpannerException(t); - } finally { - if (se instanceof SessionNotFoundException) { - try { - // The replaceSession method will re-throw the SessionNotFoundException if the - // session cannot be replaced with a new one. - session = - sessionReplacementHandler.replaceSession( - (SessionNotFoundException) se, session); - } catch (SessionNotFoundException e) { - exception = e; - break; - } - } else { - exception = se; - break; - } - } - } - session.get().markUsed(); - session.close(); - setCommitResponse(runner); - if (exception != null) { - res.setException(exception); - } else { - res.set(r); - } - }); - return res; - } - - private void setCommitResponse(AsyncRunner delegate) { - try { - commitResponse.set(delegate.getCommitResponse().get()); - } catch (Throwable t) { - commitResponse.setException(t); - } - } - - @Override - public ApiFuture getCommitTimestamp() { - checkState(commitResponse != null, "runAsync() has not yet been called"); - return ApiFutures.transform( - commitResponse, CommitResponse::getCommitTimestamp, MoreExecutors.directExecutor()); - } - - @Override - public ApiFuture getCommitResponse() { - checkState(commitResponse != null, "runAsync() has not yet been called"); - return commitResponse; - } - } - - // Exception class used just to track the stack trace at the point when a session was handed out - // from the pool. - final class LeakedSessionException extends RuntimeException { - private static final long serialVersionUID = 1451131180314064914L; - - private LeakedSessionException() { - super("Session was checked out from the pool at " + clock.instant()); - } - - private LeakedSessionException(String message) { - super(message); - } - } - - private enum SessionState { - AVAILABLE, - BUSY, - CLOSING, - } - - private PooledSessionFuture createPooledSessionFuture( - ListenableFuture future, ISpan span) { - return new PooledSessionFuture(future, span); - } - - /** Wrapper class for the {@link SessionFuture} implementations. */ - interface SessionFutureWrapper extends DatabaseClient { - - /** Method to resolve {@link SessionFuture} implementation for different use-cases. */ - T get(); - - default Dialect getDialect() { - return get().getDialect(); - } - - default String getDatabaseRole() { - return get().getDatabaseRole(); - } - - default Timestamp write(Iterable mutations) throws SpannerException { - return get().write(mutations); - } - - default CommitResponse writeWithOptions( - Iterable mutations, TransactionOption... options) throws SpannerException { - return get().writeWithOptions(mutations, options); - } - - default Timestamp writeAtLeastOnce(Iterable mutations) throws SpannerException { - return get().writeAtLeastOnce(mutations); - } - - default CommitResponse writeAtLeastOnceWithOptions( - Iterable mutations, TransactionOption... options) throws SpannerException { - return get().writeAtLeastOnceWithOptions(mutations, options); - } - - default ServerStream batchWriteAtLeastOnce( - Iterable mutationGroups, TransactionOption... options) - throws SpannerException { - return get().batchWriteAtLeastOnce(mutationGroups, options); - } - - default ReadContext singleUse() { - return get().singleUse(); - } - - default ReadContext singleUse(TimestampBound bound) { - return get().singleUse(bound); - } - - default ReadOnlyTransaction singleUseReadOnlyTransaction() { - return get().singleUseReadOnlyTransaction(); - } - - default ReadOnlyTransaction singleUseReadOnlyTransaction(TimestampBound bound) { - return get().singleUseReadOnlyTransaction(bound); - } - - default ReadOnlyTransaction readOnlyTransaction() { - return get().readOnlyTransaction(); - } - - default ReadOnlyTransaction readOnlyTransaction(TimestampBound bound) { - return get().readOnlyTransaction(bound); - } - - default TransactionRunner readWriteTransaction(TransactionOption... options) { - return get().readWriteTransaction(options); - } - - default TransactionManager transactionManager(TransactionOption... options) { - return get().transactionManager(options); - } - - default AsyncRunner runAsync(TransactionOption... options) { - return get().runAsync(options); - } - - default AsyncTransactionManager transactionManagerAsync(TransactionOption... options) { - return get().transactionManagerAsync(options); - } - - default long executePartitionedUpdate(Statement stmt, UpdateOption... options) { - return get().executePartitionedUpdate(stmt, options); - } - } - - class PooledSessionFutureWrapper implements SessionFutureWrapper { - PooledSessionFuture pooledSessionFuture; - - public PooledSessionFutureWrapper(PooledSessionFuture pooledSessionFuture) { - this.pooledSessionFuture = pooledSessionFuture; - } - - @Override - public PooledSessionFuture get() { - return this.pooledSessionFuture; - } - } - - interface SessionFuture extends Session { - - /** - * We need to do this because every implementation of {@link SessionFuture} today extends {@link - * SimpleForwardingListenableFuture}. The get() method in parent {@link - * java.util.concurrent.Future} classes specifies checked exceptions in method signature. - * - *

This method is a workaround we don't have to handle checked exceptions specified by other - * interfaces. - */ - CachedSession get(); - - default void addListener(Runnable listener, Executor exec) {} - } - - class PooledSessionFuture extends SimpleForwardingListenableFuture - implements SessionFuture { - - private boolean closed; - private volatile LeakedSessionException leakedException; - private final AtomicBoolean inUse = new AtomicBoolean(); - private final CountDownLatch initialized = new CountDownLatch(1); - private final ISpan span; - - @VisibleForTesting - PooledSessionFuture(ListenableFuture delegate, ISpan span) { - super(delegate); - this.span = span; - } - - @VisibleForTesting - void clearLeakedException() { - this.leakedException = null; - } - - private void markCheckedOut() { - - if (options.isTrackStackTraceOfSessionCheckout()) { - this.leakedException = new LeakedSessionException(); - synchronized (SessionPool.this.lock) { - SessionPool.this.markedCheckedOutSessions.add(this); - } - } - } - - @Override - public Timestamp write(Iterable mutations) throws SpannerException { - return writeWithOptions(mutations).getCommitTimestamp(); - } - - @Override - public CommitResponse writeWithOptions( - Iterable mutations, TransactionOption... options) throws SpannerException { - try { - return get().writeWithOptions(mutations, options); - } finally { - close(); - } - } - - @Override - public Timestamp writeAtLeastOnce(Iterable mutations) throws SpannerException { - return writeAtLeastOnceWithOptions(mutations).getCommitTimestamp(); - } - - @Override - public CommitResponse writeAtLeastOnceWithOptions( - Iterable mutations, TransactionOption... options) throws SpannerException { - try { - return get().writeAtLeastOnceWithOptions(mutations, options); - } finally { - close(); - } - } - - @Override - public ServerStream batchWriteAtLeastOnce( - Iterable mutationGroups, TransactionOption... options) - throws SpannerException { - try { - return get().batchWriteAtLeastOnce(mutationGroups, options); - } finally { - close(); - } - } - - @Override - public ReadContext singleUse() { - try { - return new AutoClosingReadContext<>( - session -> { - PooledSession ps = session.get(); - return ps.delegate.singleUse(); - }, - SessionPool.this, - pooledSessionReplacementHandler, - this, - true); - } catch (Exception e) { - close(); - throw e; - } - } - - @Override - public ReadContext singleUse(final TimestampBound bound) { - try { - return new AutoClosingReadContext<>( - session -> { - PooledSession ps = session.get(); - return ps.delegate.singleUse(bound); - }, - SessionPool.this, - pooledSessionReplacementHandler, - this, - true); - } catch (Exception e) { - close(); - throw e; - } - } - - @Override - public ReadOnlyTransaction singleUseReadOnlyTransaction() { - return internalReadOnlyTransaction( - session -> { - PooledSession ps = session.get(); - return ps.delegate.singleUseReadOnlyTransaction(); - }, - true); - } - - @Override - public ReadOnlyTransaction singleUseReadOnlyTransaction(final TimestampBound bound) { - return internalReadOnlyTransaction( - session -> { - PooledSession ps = session.get(); - return ps.delegate.singleUseReadOnlyTransaction(bound); - }, - true); - } - - @Override - public ReadOnlyTransaction readOnlyTransaction() { - return internalReadOnlyTransaction( - session -> { - PooledSession ps = session.get(); - return ps.delegate.readOnlyTransaction(); - }, - false); - } - - @Override - public ReadOnlyTransaction readOnlyTransaction(final TimestampBound bound) { - return internalReadOnlyTransaction( - session -> { - PooledSession ps = session.get(); - return ps.delegate.readOnlyTransaction(bound); - }, - false); - } - - private ReadOnlyTransaction internalReadOnlyTransaction( - Function transactionSupplier, - boolean isSingleUse) { - try { - return new AutoClosingReadTransaction<>( - transactionSupplier, - SessionPool.this, - pooledSessionReplacementHandler, - this, - isSingleUse); - } catch (Exception e) { - close(); - throw e; - } - } - - @Override - public TransactionRunner readWriteTransaction(TransactionOption... options) { - return new SessionPoolTransactionRunner<>(this, pooledSessionReplacementHandler, options); - } - - @Override - public TransactionManager transactionManager(TransactionOption... options) { - return new AutoClosingTransactionManager<>(this, pooledSessionReplacementHandler, options); - } - - @Override - public AsyncRunner runAsync(TransactionOption... options) { - return new SessionPoolAsyncRunner<>(this, pooledSessionReplacementHandler, options); - } - - @Override - public AsyncTransactionManager transactionManagerAsync(TransactionOption... options) { - return new SessionPoolAsyncTransactionManager<>( - pooledSessionReplacementHandler, this, options); - } - - @Override - public long executePartitionedUpdate(Statement stmt, UpdateOption... options) { - try { - return get(true).executePartitionedUpdate(stmt, options); - } finally { - close(); - } - } - - @Override - public String getName() { - return get().getName(); - } - - @Override - public void close() { - try { - asyncClose().get(); - } catch (InterruptedException e) { - throw SpannerExceptionFactory.propagateInterrupt(e); - } catch (ExecutionException e) { - throw asSpannerException(e.getCause()); - } - } - - @Override - public ApiFuture asyncClose() { - synchronized (this) { - // Don't add the session twice to the pool if a resource is being closed multiple times. - if (closed) { - return ApiFutures.immediateFuture(Empty.getDefaultInstance()); - } - closed = true; - } - try { - PooledSession delegate = getOrNull(); - if (delegate != null) { - return delegate.asyncClose(); - } - } finally { - synchronized (lock) { - leakedException = null; - checkedOutSessions.remove(this); - markedCheckedOutSessions.remove(this); - } - } - return ApiFutures.immediateFuture(Empty.getDefaultInstance()); - } - - private PooledSession getOrNull() { - try { - return get(); - } catch (Throwable t) { - return null; - } - } - - @Override - public PooledSession get() { - return get(false); - } - - PooledSession get(final boolean eligibleForLongRunning) { - if (inUse.compareAndSet(false, true)) { - PooledSession res = null; - try { - res = super.get(); - } catch (Throwable e) { - // ignore the exception as it will be handled by the call to super.get() below. - } - if (res != null) { - res.markBusy(span); - span.addAnnotation("Using Session", "sessionId", res.getName()); - synchronized (lock) { - incrementNumSessionsInUse(); - checkedOutSessions.add(this); - } - res.eligibleForLongRunning = eligibleForLongRunning; - } - initialized.countDown(); - } - try { - initialized.await(); - return super.get(); - } catch (ExecutionException e) { - throw SpannerExceptionFactory.newSpannerException(e.getCause()); - } catch (InterruptedException e) { - throw SpannerExceptionFactory.propagateInterrupt(e); - } - } - - public int getChannel() { - return get().getChannel(); - } - } - - interface CachedSession extends Session { - - SessionImpl getDelegate(); - - void markBusy(ISpan span); - - void markUsed(); - - SpannerException setLastException(SpannerException exception); - - AsyncTransactionManagerImpl transactionManagerAsync(TransactionOption... options); - - void setAllowReplacing(boolean b); - } - - class PooledSession implements CachedSession { - - @VisibleForTesting final SessionImpl delegate; - private volatile SpannerException lastException; - private volatile boolean allowReplacing = true; - - /** - * This ensures that the session is added at a random position in the pool the first time it is - * actually added to the pool. - */ - @GuardedBy("lock") - private Position releaseToPosition = initialReleasePosition; - - /** - * Property to mark if the session is eligible to be long-running. This can only be true if the - * session is executing certain types of transactions (for ex - Partitioned DML) which can be - * long-running. By default, most transaction types are not expected to be long-running and - * hence this value is false. - */ - private volatile boolean eligibleForLongRunning = false; - - /** - * Property to mark if the session is no longer part of the session pool. For ex - A session - * which is long-running gets cleaned up and removed from the pool. - */ - private volatile boolean isRemovedFromPool = false; - - /** - * Property to mark if a leaked session exception is already logged. Given a session maintainer - * thread runs repeatedly at a defined interval, this property allows us to ensure that an - * exception is logged only once per leaked session. This is to avoid noisy repeated logs around - * session leaks for long-running sessions. - */ - private volatile boolean isLeakedExceptionLogged = false; - - @GuardedBy("lock") - private SessionState state; - - private PooledSession(SessionImpl delegate) { - this.delegate = Preconditions.checkNotNull(delegate); - this.state = SessionState.AVAILABLE; - - // initialise the lastUseTime field for each session. - this.markUsed(); - } - - int getChannel() { - Long channelHint = (Long) delegate.getOptions().get(SpannerRpc.Option.CHANNEL_HINT); - return channelHint == null - ? 0 - : (int) (channelHint % sessionClient.getSpanner().getOptions().getNumChannels()); - } - - @Override - public String toString() { - return getName(); - } - - @VisibleForTesting - @Override - public void setAllowReplacing(boolean allowReplacing) { - this.allowReplacing = allowReplacing; - } - - @VisibleForTesting - void setEligibleForLongRunning(boolean eligibleForLongRunning) { - this.eligibleForLongRunning = eligibleForLongRunning; - } - - @Override - public Timestamp write(Iterable mutations) throws SpannerException { - return writeWithOptions(mutations).getCommitTimestamp(); - } - - @Override - public CommitResponse writeWithOptions( - Iterable mutations, TransactionOption... options) throws SpannerException { - try { - markUsed(); - return delegate.writeWithOptions(mutations, options); - } catch (SpannerException e) { - throw lastException = e; - } - } - - @Override - public Timestamp writeAtLeastOnce(Iterable mutations) throws SpannerException { - return writeAtLeastOnceWithOptions(mutations).getCommitTimestamp(); - } - - @Override - public CommitResponse writeAtLeastOnceWithOptions( - Iterable mutations, TransactionOption... options) throws SpannerException { - try { - markUsed(); - return delegate.writeAtLeastOnceWithOptions(mutations, options); - } catch (SpannerException e) { - throw lastException = e; - } - } - - @Override - public ServerStream batchWriteAtLeastOnce( - Iterable mutationGroups, TransactionOption... options) - throws SpannerException { - try { - markUsed(); - return delegate.batchWriteAtLeastOnce(mutationGroups, options); - } catch (SpannerException e) { - throw lastException = e; - } - } - - @Override - public long executePartitionedUpdate(Statement stmt, UpdateOption... options) - throws SpannerException { - try { - markUsed(); - return delegate.executePartitionedUpdate(stmt, options); - } catch (SpannerException e) { - throw lastException = e; - } - } - - @Override - public ReadContext singleUse() { - return delegate.singleUse(); - } - - @Override - public ReadContext singleUse(TimestampBound bound) { - return delegate.singleUse(bound); - } - - @Override - public ReadOnlyTransaction singleUseReadOnlyTransaction() { - return delegate.singleUseReadOnlyTransaction(); - } - - @Override - public ReadOnlyTransaction singleUseReadOnlyTransaction(TimestampBound bound) { - return delegate.singleUseReadOnlyTransaction(bound); - } - - @Override - public ReadOnlyTransaction readOnlyTransaction() { - return delegate.readOnlyTransaction(); - } - - @Override - public ReadOnlyTransaction readOnlyTransaction(TimestampBound bound) { - return delegate.readOnlyTransaction(bound); - } - - @Override - public TransactionRunner readWriteTransaction(TransactionOption... options) { - return delegate.readWriteTransaction(options); - } - - @Override - public AsyncRunner runAsync(TransactionOption... options) { - return delegate.runAsync(options); - } - - @Override - public AsyncTransactionManagerImpl transactionManagerAsync(TransactionOption... options) { - return delegate.transactionManagerAsync(options); - } - - @Override - public ApiFuture asyncClose() { - close(); - return ApiFutures.immediateFuture(Empty.getDefaultInstance()); - } - - @Override - public void close() { - synchronized (lock) { - numSessionsInUse--; - numSessionsReleased++; - } - if ((lastException != null && isSessionNotFound(lastException)) || isRemovedFromPool) { - invalidateSession(this); - } else { - if (isDatabaseOrInstanceNotFound(lastException)) { - // Mark this session pool as no longer valid and then release the session into the pool as - // there is nothing we can do with it anyways. - synchronized (lock) { - SessionPool.this.resourceNotFoundException = - MoreObjects.firstNonNull( - SessionPool.this.resourceNotFoundException, - (ResourceNotFoundException) lastException); - } - } - lastException = null; - isRemovedFromPool = false; - if (state != SessionState.CLOSING) { - state = SessionState.AVAILABLE; - } - releaseSession(this, false); - } - } - - @Override - public String getName() { - return delegate.getName(); - } - - private void keepAlive() { - markUsed(); - final ISpan previousSpan = delegate.getCurrentSpan(); - delegate.setCurrentSpan(tracer.getBlankSpan()); - try (ResultSet resultSet = - delegate - .singleUse(TimestampBound.ofMaxStaleness(60, TimeUnit.SECONDS)) - .executeQuery(Statement.newBuilder("SELECT 1").build())) { - resultSet.next(); - } finally { - delegate.setCurrentSpan(previousSpan); - } - } - - private void determineDialectAsync(final SettableFuture dialect) { - Preconditions.checkNotNull(dialect); - executor.submit( - () -> { - try { - dialect.set(determineDialect()); - } catch (Throwable t) { - // Catch-all as we want to propagate all exceptions to anyone who might be interested - // in the database dialect, and there's nothing sensible that we can do with it here. - dialect.setException(t); - } finally { - releaseSession(this, false); - } - }); - } - - private Dialect determineDialect() { - try (ResultSet dialectResultSet = - delegate.singleUse().executeQuery(DETERMINE_DIALECT_STATEMENT)) { - if (dialectResultSet.next()) { - return Dialect.fromName(dialectResultSet.getString(0)); - } else { - throw SpannerExceptionFactory.newSpannerException( - ErrorCode.NOT_FOUND, "No dialect found for database"); - } - } - } - - @Override - public SessionImpl getDelegate() { - return this.delegate; - } - - @Override - public void markBusy(ISpan span) { - this.delegate.setCurrentSpan(span); - this.state = SessionState.BUSY; - } - - private void markClosing() { - this.state = SessionState.CLOSING; - } - - @Override - public void markUsed() { - delegate.markUsed(clock.instant()); - } - - @Override - public SpannerException setLastException(SpannerException exception) { - this.lastException = exception; - return exception; - } - - boolean isAllowReplacing() { - return this.allowReplacing; - } - - @Override - public TransactionManager transactionManager(TransactionOption... options) { - return delegate.transactionManager(options); - } - } - - private final class WaiterFuture extends ForwardingListenableFuture { - private static final long MAX_SESSION_WAIT_TIMEOUT = 240_000L; - private final SettableFuture waiter = SettableFuture.create(); - - @Override - @Nonnull - protected ListenableFuture delegate() { - return waiter; - } - - private void put(PooledSession session) { - waiter.set(session); - } - - private void put(SpannerException e) { - waiter.setException(e); - } - - @Override - public PooledSession get() { - long currentTimeout = options.getInitialWaitForSessionTimeoutMillis(); - while (true) { - ISpan span = tracer.spanBuilder(WAIT_FOR_SESSION); - try (IScope ignore = tracer.withSpan(span)) { - PooledSession s = - pollUninterruptiblyWithTimeout(currentTimeout, options.getAcquireSessionTimeout()); - if (s == null) { - // Set the status to DEADLINE_EXCEEDED and retry. - numWaiterTimeouts.incrementAndGet(); - tracer.getCurrentSpan().setStatus(ErrorCode.DEADLINE_EXCEEDED); - currentTimeout = Math.min(currentTimeout * 2, MAX_SESSION_WAIT_TIMEOUT); - } else { - return s; - } - } catch (Exception e) { - if (e instanceof SpannerException - && ErrorCode.RESOURCE_EXHAUSTED.equals(((SpannerException) e).getErrorCode())) { - numWaiterTimeouts.incrementAndGet(); - tracer.getCurrentSpan().setStatus(ErrorCode.RESOURCE_EXHAUSTED); - } - span.setStatus(e); - throw e; - } finally { - span.end(); - } - } - } - - private PooledSession pollUninterruptiblyWithTimeout( - long timeoutMillis, Duration acquireSessionTimeout) { - boolean interrupted = false; - try { - while (true) { - try { - return acquireSessionTimeout == null - ? waiter.get(timeoutMillis, TimeUnit.MILLISECONDS) - : waiter.get(acquireSessionTimeout.toMillis(), TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - interrupted = true; - } catch (TimeoutException e) { - if (acquireSessionTimeout != null) { - SpannerException exception = - SpannerExceptionFactory.newSpannerException( - ErrorCode.RESOURCE_EXHAUSTED, - "Timed out after waiting " - + acquireSessionTimeout.toMillis() - + "ms for acquiring session. To mitigate error" - + " SessionPoolOptions#setAcquireSessionTimeout(Duration) to set a higher" - + " timeout or increase the number of sessions in the session pool.\n" - + createCheckedOutSessionsStackTraces()); - if (waiter.setException(exception)) { - // Only throw the exception if setting it on the waiter was successful. The - // waiter.setException(..) method returns false if some other thread in the meantime - // called waiter.set(..), which means that a session became available between the - // time that the TimeoutException was thrown and now. - throw exception; - } - } - return null; - } catch (ExecutionException e) { - throw SpannerExceptionFactory.newSpannerException(e.getCause()); - } - } - } finally { - if (interrupted) { - Thread.currentThread().interrupt(); - } - } - } - } - - /** - * Background task to maintain the pool. Tasks: - * - *

    - *
  • Removes idle sessions from the pool. Sessions that go above MinSessions that have not - * been used for the last 55 minutes will be removed from the pool. These will automatically - * be garbage collected by the backend. - *
  • Keeps alive sessions that have not been used for a user configured time in order to keep - * MinSessions sessions alive in the pool at any time. The keep-alive traffic is smeared out - * over a window of 10 minutes to avoid bursty traffic. - *
  • Removes unexpected long running transactions from the pool. Only certain transaction - * types (for ex - Partitioned DML / Batch Reads) can be long running. This tasks checks the - * sessions which have been inactive for a longer than usual duration (for ex - 60 minutes) - * and removes such sessions from the pool. - *
- */ - final class PoolMaintainer { - - // Length of the window in millis over which we keep track of maximum number of concurrent - // sessions in use. - private final Duration windowLength = Duration.ofMillis(TimeUnit.MINUTES.toMillis(10)); - // Frequency of the timer loop. - @VisibleForTesting final long loopFrequency = options.getLoopFrequency(); - // Number of loop iterations in which we need to close all the sessions waiting for closure. - @VisibleForTesting final long numClosureCycles = windowLength.toMillis() / loopFrequency; - private final Duration keepAliveMillis = - Duration.ofMillis(TimeUnit.MINUTES.toMillis(options.getKeepAliveIntervalMinutes())); - // Number of loop iterations in which we need to keep alive all the sessions - @VisibleForTesting final long numKeepAliveCycles = keepAliveMillis.toMillis() / loopFrequency; - - /** - * Variable maintaining the last execution time of the long-running transaction cleanup task. - * - *

The long-running transaction cleanup needs to be performed every X minutes. The X minutes - * recurs multiple times within the invocation of the pool maintainer thread. For ex - If the - * main thread runs every 10s and the long-running transaction clean-up needs to be performed - * every 2 minutes, then we need to keep a track of when was the last time that this task - * executed and makes sure we only execute it every 2 minutes and not every 10 seconds. - */ - @VisibleForTesting Instant lastExecutionTime; - - /** - * The previous numSessionsAcquired seen by the maintainer. This is used to calculate the - * transactions per second, which again is used to determine whether to randomize the order of - * the session pool. - */ - private long prevNumSessionsAcquired; - - boolean closed = false; - - @GuardedBy("lock") - ScheduledFuture scheduledFuture; - - @GuardedBy("lock") - boolean running; - - void init() { - lastExecutionTime = clock.instant(); - - // Scheduled pool maintenance worker. - synchronized (lock) { - scheduledFuture = - executor.scheduleAtFixedRate( - this::maintainPool, loopFrequency, loopFrequency, TimeUnit.MILLISECONDS); - } - } - - void close() { - synchronized (lock) { - if (!closed) { - closed = true; - scheduledFuture.cancel(false); - if (!running) { - decrementPendingClosures(1); - } - } - } - } - - boolean isClosed() { - synchronized (lock) { - return closed; - } - } - - // Does various pool maintenance activities. - void maintainPool() { - Instant currTime; - synchronized (lock) { - if (SessionPool.this.isClosed()) { - return; - } - running = true; - if (loopFrequency >= 1000L) { - SessionPool.this.transactionsPerSecond = - (SessionPool.this.numSessionsAcquired - prevNumSessionsAcquired) - / (loopFrequency / 1000L); - } - this.prevNumSessionsAcquired = SessionPool.this.numSessionsAcquired; - - currTime = clock.instant(); - // Reset the start time for recording the maximum number of sessions in the pool - if (currTime.isAfter(SessionPool.this.lastResetTime.plus(Duration.ofMinutes(10)))) { - SessionPool.this.maxSessionsInUse = SessionPool.this.numSessionsInUse; - SessionPool.this.lastResetTime = currTime; - } - } - - removeIdleSessions(currTime); - // Now go over all the remaining sessions and see if they need to be kept alive explicitly. - keepAliveSessions(currTime); - replenishPool(); - synchronized (lock) { - running = false; - if (SessionPool.this.isClosed()) { - decrementPendingClosures(1); - } - } - removeLongRunningSessions(currTime); - } - - private void removeIdleSessions(Instant currTime) { - synchronized (lock) { - // Determine the minimum last use time for a session to be deemed to still be alive. Remove - // all sessions that have a lastUseTime before that time, unless it would cause us to go - // below MinSessions. - Instant minLastUseTime = currTime.minus(options.getRemoveInactiveSessionAfterDuration()); - Iterator iterator = sessions.descendingIterator(); - while (iterator.hasNext()) { - PooledSession session = iterator.next(); - if (session.delegate.getLastUseTime() != null - && session.delegate.getLastUseTime().isBefore(minLastUseTime)) { - if (session.state != SessionState.CLOSING) { - boolean isRemoved = removeFromPool(session); - if (isRemoved) { - numIdleSessionsRemoved++; - if (idleSessionRemovedListener != null) { - idleSessionRemovedListener.apply(session); - } - } - iterator.remove(); - } - } - } - } - } - - private void keepAliveSessions(Instant currTime) { - long numSessionsToKeepAlive = 0; - synchronized (lock) { - if (numSessionsInUse >= (options.getMinSessions() + options.getMaxIdleSessions())) { - // At least MinSessions are in use, so we don't have to ping any sessions. - return; - } - // In each cycle only keep alive a subset of sessions to prevent burst of traffic. - numSessionsToKeepAlive = - (long) - Math.ceil( - (double) - ((options.getMinSessions() + options.getMaxIdleSessions()) - - numSessionsInUse) - / numKeepAliveCycles); - } - // Now go over all the remaining sessions and see if they need to be kept alive explicitly. - Instant keepAliveThreshold = currTime.minus(keepAliveMillis); - - // Keep chugging till there is no session that needs to be kept alive. - while (numSessionsToKeepAlive > 0) { - Tuple sessionToKeepAlive; - synchronized (lock) { - sessionToKeepAlive = findSessionToKeepAlive(sessions, keepAliveThreshold, 0); - } - if (sessionToKeepAlive == null) { - break; - } - try { - logger.log(Level.FINE, "Keeping alive session " + sessionToKeepAlive.x().getName()); - numSessionsToKeepAlive--; - sessionToKeepAlive.x().keepAlive(); - releaseSession(sessionToKeepAlive); - } catch (SpannerException e) { - handleException(e, sessionToKeepAlive); - } - } - } - - private void replenishPool() { - synchronized (lock) { - // If we have gone below min pool size, create that many sessions. - int sessionCount = options.getMinSessions() - (totalSessions() + numSessionsBeingCreated); - if (sessionCount > 0) { - createSessions(getAllowedCreateSessions(sessionCount), false); - } - } - } - - // cleans up sessions which are unexpectedly long-running. - void removeLongRunningSessions(Instant currentTime) { - try { - if (SessionPool.this.isClosed()) { - return; - } - final InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - options.getInactiveTransactionRemovalOptions(); - final Instant minExecutionTime = - lastExecutionTime.plus(inactiveTransactionRemovalOptions.getExecutionFrequency()); - if (currentTime.isBefore(minExecutionTime)) { - return; - } - lastExecutionTime = currentTime; // update this only after we have decided to execute task - if (options.closeInactiveTransactions() - || options.warnInactiveTransactions() - || options.warnAndCloseInactiveTransactions()) { - removeLongRunningSessions(currentTime, inactiveTransactionRemovalOptions); - } - } catch (final Throwable t) { - logger.log(Level.WARNING, "Failed removing long running transactions", t); - } - } - - private void removeLongRunningSessions( - final Instant currentTime, - final InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions) { - synchronized (lock) { - final double usedSessionsRatio = getRatioOfSessionsInUse(); - if (usedSessionsRatio > inactiveTransactionRemovalOptions.getUsedSessionsRatioThreshold()) { - Iterator iterator = checkedOutSessions.iterator(); - while (iterator.hasNext()) { - final PooledSessionFuture sessionFuture = iterator.next(); - // the below get() call on future object is non-blocking since checkedOutSessions - // collection is populated only when the get() method in {@code PooledSessionFuture} is - // called. - final PooledSession session = (PooledSession) sessionFuture.get(); - final Duration durationFromLastUse = - Duration.between(session.getDelegate().getLastUseTime(), currentTime); - if (!session.eligibleForLongRunning - && durationFromLastUse.compareTo( - inactiveTransactionRemovalOptions.getIdleTimeThreshold()) - > 0) { - if ((options.warnInactiveTransactions() || options.warnAndCloseInactiveTransactions()) - && !session.isLeakedExceptionLogged) { - if (options.warnAndCloseInactiveTransactions()) { - logger.log( - Level.WARNING, - String.format("Removing long-running session => %s", session.getName()), - sessionFuture.leakedException); - session.isLeakedExceptionLogged = true; - } else if (options.warnInactiveTransactions()) { - logger.log( - Level.WARNING, - String.format( - "Detected long-running session => %s. To automatically remove" - + " long-running sessions, set SessionOption" - + " ActionOnInactiveTransaction to WARN_AND_CLOSE by invoking" - + " setWarnAndCloseIfInactiveTransactions() method.", - session.getName()), - sessionFuture.leakedException); - session.isLeakedExceptionLogged = true; - } - } - if ((options.closeInactiveTransactions() - || options.warnAndCloseInactiveTransactions()) - && session.state != SessionState.CLOSING) { - final boolean isRemoved = removeFromPool(session); - if (isRemoved) { - session.isRemovedFromPool = true; - numLeakedSessionsRemoved++; - if (longRunningSessionRemovedListener != null) { - longRunningSessionRemovedListener.apply(session); - } - } - iterator.remove(); - } - } - } - } - } - } - } - - enum Position { - FIRST, - LAST, - RANDOM - } - - /** - * This statement is (currently) used to determine the dialect of the database that is used by the - * session pool. This statement is subject to change when the INFORMATION_SCHEMA contains a table - * where the dialect of the database can be read directly, and any tests that want to detect the - * specific 'determine dialect statement' should rely on this constant instead of the actual - * value. - */ - @VisibleForTesting - static final Statement DETERMINE_DIALECT_STATEMENT = - Statement.newBuilder( - "select option_value " - + "from information_schema.database_options " - + "where option_name='database_dialect'") - .build(); - - private final SessionPoolOptions options; - private final SettableFuture dialect = SettableFuture.create(); - private final String databaseRole; - private final SessionClient sessionClient; - private final int numChannels; - private final ScheduledExecutorService executor; - private final ExecutorFactory executorFactory; - - final PoolMaintainer poolMaintainer; - private final Clock clock; - - /** - * initialReleasePosition determines where in the pool sessions are added when they are released - * into the pool the first time. This is always RANDOM in production, but some tests use FIRST to - * be able to verify the order of sessions in the pool. Using RANDOM ensures that we do not get an - * unbalanced session pool where all sessions belonging to one gRPC channel are added to the same - * region in the pool. - */ - private final Position initialReleasePosition; - - private final Object lock = new Object(); - private final Random random = new Random(); - - @GuardedBy("lock") - private boolean detectDialectStarted; - - @GuardedBy("lock") - private int pendingClosure; - - @GuardedBy("lock") - private SettableFuture closureFuture; - - @GuardedBy("lock") - private ClosedException closedException; - - @GuardedBy("lock") - private ResourceNotFoundException resourceNotFoundException; - - @GuardedBy("lock") - private final LinkedList sessions = new LinkedList<>(); - - @GuardedBy("lock") - private final Queue waiters = new LinkedList<>(); - - @GuardedBy("lock") - private int numSessionsBeingCreated = 0; - - @GuardedBy("lock") - private int numSessionsInUse = 0; - - @GuardedBy("lock") - private int maxSessionsInUse = 0; - - @GuardedBy("lock") - private Instant lastResetTime = Clock.INSTANCE.instant(); - - @GuardedBy("lock") - private long numSessionsAcquired = 0; - - @GuardedBy("lock") - private long numSessionsReleased = 0; - - @GuardedBy("lock") - private long numIdleSessionsRemoved = 0; - - @GuardedBy("lock") - private long transactionsPerSecond = 0L; - - @GuardedBy("lock") - private long numLeakedSessionsRemoved = 0; - - private final AtomicLong numWaiterTimeouts = new AtomicLong(); - - @GuardedBy("lock") - private final Set allSessions = new HashSet<>(); - - @GuardedBy("lock") - @VisibleForTesting - final Set checkedOutSessions = new HashSet<>(); - - @GuardedBy("lock") - private final Set markedCheckedOutSessions = new HashSet<>(); - - private final SessionConsumer sessionConsumer = new SessionConsumerImpl(); - - @VisibleForTesting Function idleSessionRemovedListener; - - @VisibleForTesting Function longRunningSessionRemovedListener; - private final CountDownLatch waitOnMinSessionsLatch; - private final PooledSessionReplacementHandler pooledSessionReplacementHandler = - new PooledSessionReplacementHandler(); - - private static final Object DENY_LISTED = new Object(); - private final Cache denyListedChannels; - - /** - * Create a session pool with the given options and for the given database. It will also start - * eagerly creating sessions if {@link SessionPoolOptions#getMinSessions()} is greater than 0. - * Return pool is immediately ready for use, though getting a session might block for sessions to - * be created. - */ - static SessionPool createPool( - SpannerOptions spannerOptions, - SessionClient sessionClient, - TraceWrapper tracer, - List labelValues, - Attributes attributes, - AtomicLong numMultiplexedSessionsAcquired, - AtomicLong numMultiplexedSessionsReleased) { - final SessionPoolOptions sessionPoolOptions = spannerOptions.getSessionPoolOptions(); - - // A clock instance is passed in {@code SessionPoolOptions} in order to allow mocking via tests. - final Clock poolMaintainerClock = sessionPoolOptions.getPoolMaintainerClock(); - return createPool( - sessionPoolOptions, - spannerOptions.getDatabaseRole(), - ((GrpcTransportOptions) spannerOptions.getTransportOptions()).getExecutorFactory(), - sessionClient, - poolMaintainerClock == null ? new Clock() : poolMaintainerClock, - Position.RANDOM, - Metrics.getMetricRegistry(), - tracer, - labelValues, - spannerOptions.getOpenTelemetry(), - attributes, - numMultiplexedSessionsAcquired, - numMultiplexedSessionsReleased); - } - - static SessionPool createPool( - SessionPoolOptions poolOptions, - ExecutorFactory executorFactory, - SessionClient sessionClient, - TraceWrapper tracer, - OpenTelemetry openTelemetry) { - return createPool( - poolOptions, - executorFactory, - sessionClient, - new Clock(), - Position.RANDOM, - tracer, - openTelemetry); - } - - static SessionPool createPool( - SessionPoolOptions poolOptions, - ExecutorFactory executorFactory, - SessionClient sessionClient, - Clock clock, - Position initialReleasePosition, - TraceWrapper tracer, - OpenTelemetry openTelemetry) { - return createPool( - poolOptions, - null, - executorFactory, - sessionClient, - clock, - initialReleasePosition, - Metrics.getMetricRegistry(), - tracer, - SPANNER_DEFAULT_LABEL_VALUES, - openTelemetry, - null, - new AtomicLong(), - new AtomicLong()); - } - - static SessionPool createPool( - SessionPoolOptions poolOptions, - String databaseRole, - ExecutorFactory executorFactory, - SessionClient sessionClient, - Clock clock, - Position initialReleasePosition, - MetricRegistry metricRegistry, - TraceWrapper tracer, - List labelValues, - OpenTelemetry openTelemetry, - Attributes attributes, - AtomicLong numMultiplexedSessionsAcquired, - AtomicLong numMultiplexedSessionsReleased) { - SessionPool pool = - new SessionPool( - poolOptions, - databaseRole, - executorFactory, - executorFactory.get(), - sessionClient, - clock, - initialReleasePosition, - metricRegistry, - tracer, - labelValues, - openTelemetry, - attributes, - numMultiplexedSessionsAcquired, - numMultiplexedSessionsReleased); - pool.initPool(); - return pool; - } - - private SessionPool( - SessionPoolOptions options, - String databaseRole, - ExecutorFactory executorFactory, - ScheduledExecutorService executor, - SessionClient sessionClient, - Clock clock, - Position initialReleasePosition, - MetricRegistry metricRegistry, - TraceWrapper tracer, - List labelValues, - OpenTelemetry openTelemetry, - Attributes attributes, - AtomicLong numMultiplexedSessionsAcquired, - AtomicLong numMultiplexedSessionsReleased) { - this.options = options; - this.databaseRole = databaseRole; - this.executorFactory = executorFactory; - this.executor = executor; - this.sessionClient = sessionClient; - this.numChannels = sessionClient.getSpanner().getOptions().getNumChannels(); - this.clock = clock; - this.initialReleasePosition = initialReleasePosition; - this.poolMaintainer = new PoolMaintainer(); - this.tracer = tracer; - this.initOpenCensusMetricsCollection( - metricRegistry, - labelValues, - numMultiplexedSessionsAcquired, - numMultiplexedSessionsReleased); - this.initOpenTelemetryMetricsCollection( - openTelemetry, attributes, numMultiplexedSessionsAcquired, numMultiplexedSessionsReleased); - this.waitOnMinSessionsLatch = - options.getMinSessions() > 0 ? new CountDownLatch(1) : new CountDownLatch(0); - this.denyListedChannels = - RetryOnDifferentGrpcChannelErrorHandler.isEnabled() - ? CacheBuilder.newBuilder() - .expireAfterWrite(java.time.Duration.ofMinutes(1)) - .maximumSize(this.numChannels) - .concurrencyLevel(1) - .ticker( - new Ticker() { - @Override - public long read() { - return TimeUnit.NANOSECONDS.convert( - clock.instant().toEpochMilli(), TimeUnit.MILLISECONDS); - } - }) - .build() - : null; - } - - /** - * @return the {@link Dialect} of the underlying database. This method will block until the - * dialect is available. It will potentially execute one or two RPCs to get the dialect if - * necessary: One to create a session if there are no sessions in the pool (yet), and one to - * query the database for the dialect that is used. It is recommended that clients that always - * need to know the dialect set {@link - * SessionPoolOptions.Builder#setAutoDetectDialect(boolean)} to true. This will ensure that - * the dialect is fetched automatically in a background task when a session pool is created. - */ - Dialect getDialect() { - boolean mustDetectDialect = false; - synchronized (lock) { - if (!detectDialectStarted) { - mustDetectDialect = true; - detectDialectStarted = true; - } - } - if (mustDetectDialect) { - try (PooledSessionFuture session = getSession()) { - dialect.set(((PooledSession) session.get()).determineDialect()); - } - } - try { - return dialect.get(60L, TimeUnit.SECONDS); - } catch (ExecutionException executionException) { - throw asSpannerException(executionException); - } catch (InterruptedException interruptedException) { - throw SpannerExceptionFactory.propagateInterrupt(interruptedException); - } catch (TimeoutException timeoutException) { - throw SpannerExceptionFactory.propagateTimeout(timeoutException); - } - } - - Future getDialectAsync() { - return executor.submit(this::getDialect); - } - - PooledSessionReplacementHandler getPooledSessionReplacementHandler() { - return pooledSessionReplacementHandler; - } - - @Nullable - public String getDatabaseRole() { - return databaseRole; - } - - @VisibleForTesting - int getNumberOfSessionsInUse() { - synchronized (lock) { - return numSessionsInUse; - } - } - - @VisibleForTesting - int getMaxSessionsInUse() { - synchronized (lock) { - return maxSessionsInUse; - } - } - - @VisibleForTesting - double getRatioOfSessionsInUse() { - synchronized (lock) { - final int maxSessions = options.getMaxSessions(); - if (maxSessions == 0) { - return 0; - } - return (double) numSessionsInUse / maxSessions; - } - } - - boolean removeFromPool(PooledSession session) { - synchronized (lock) { - if (isClosed()) { - decrementPendingClosures(1); - return false; - } - session.markClosing(); - allSessions.remove(session); - return true; - } - } - - long numIdleSessionsRemoved() { - synchronized (lock) { - return numIdleSessionsRemoved; - } - } - - @VisibleForTesting - long numLeakedSessionsRemoved() { - synchronized (lock) { - return numLeakedSessionsRemoved; - } - } - - @VisibleForTesting - int getNumberOfSessionsInPool() { - synchronized (lock) { - return sessions.size(); - } - } - - @VisibleForTesting - int getNumberOfSessionsBeingCreated() { - synchronized (lock) { - return numSessionsBeingCreated; - } - } - - @VisibleForTesting - int getTotalSessionsPlusNumSessionsBeingCreated() { - synchronized (lock) { - return numSessionsBeingCreated + allSessions.size(); - } - } - - @VisibleForTesting - long getNumWaiterTimeouts() { - return numWaiterTimeouts.get(); - } - - private void initPool() { - synchronized (lock) { - poolMaintainer.init(); - if (options.getMinSessions() > 0) { - createSessions(options.getMinSessions(), true); - } - } - } - - private boolean isClosed() { - synchronized (lock) { - return closureFuture != null; - } - } - - private void handleException(SpannerException e, Tuple session) { - if (isSessionNotFound(e)) { - invalidateSession(session.x()); - } else { - releaseSession(session); - } - } - - private boolean isSessionNotFound(SpannerException e) { - return e.getErrorCode() == ErrorCode.NOT_FOUND && e.getMessage().contains("Session not found"); - } - - private boolean isDatabaseOrInstanceNotFound(SpannerException e) { - return e instanceof DatabaseNotFoundException || e instanceof InstanceNotFoundException; - } - - private void invalidateSession(PooledSession session) { - synchronized (lock) { - if (isClosed()) { - decrementPendingClosures(1); - return; - } - allSessions.remove(session); - // replenish the pool. - createSessions(getAllowedCreateSessions(1), false); - } - } - - private Tuple findSessionToKeepAlive( - Queue queue, Instant keepAliveThreshold, int numAlreadyChecked) { - int numChecked = 0; - Iterator iterator = queue.iterator(); - while (iterator.hasNext() - && (numChecked + numAlreadyChecked) - < (options.getMinSessions() + options.getMaxIdleSessions() - numSessionsInUse)) { - PooledSession session = iterator.next(); - if (session.delegate.getLastUseTime() != null - && session.delegate.getLastUseTime().isBefore(keepAliveThreshold)) { - iterator.remove(); - return Tuple.of(session, numChecked); - } - numChecked++; - } - return null; - } - - /** - * @return true if this {@link SessionPool} is still valid. - */ - boolean isValid() { - synchronized (lock) { - return closureFuture == null && resourceNotFoundException == null; - } - } - - /** - * Returns a multiplexed session. The method fallbacks to a regular session if {@link - * SessionPoolOptions#getUseMultiplexedSession} is not set. - */ - PooledSessionFutureWrapper getMultiplexedSessionWithFallback() throws SpannerException { - return new PooledSessionFutureWrapper(getSession()); - } - - /** - * Returns a session to be used for requests to spanner. This method is always non-blocking and - * returns a {@link PooledSessionFuture}. In case the pool is exhausted and {@link - * SessionPoolOptions#isFailIfPoolExhausted()} has been set, it will throw an exception. Returned - * session must be closed by calling {@link Session#close()}. - * - *

Implementation strategy: - * - *

    - *
  1. If a read session is available, return that. - *
  2. Otherwise if a session can be created, fire a creation request. - *
  3. Wait for a session to become available. Note that this can be unblocked either by a - * session being returned to the pool or a new session being created. - *
- */ - PooledSessionFuture getSession() throws SpannerException { - ISpan span = tracer.getCurrentSpan(); - span.addAnnotation("Acquiring session"); - WaiterFuture waiter = null; - PooledSession sess = null; - synchronized (lock) { - if (closureFuture != null) { - span.addAnnotation("Pool has been closed"); - throw new IllegalStateException("Pool has been closed", closedException); - } - if (resourceNotFoundException != null) { - span.addAnnotation("Database has been deleted"); - throw SpannerExceptionFactory.newSpannerException( - ErrorCode.NOT_FOUND, - String.format( - "The session pool has been invalidated because a previous RPC returned 'Database" - + " not found': %s", - resourceNotFoundException.getMessage()), - resourceNotFoundException); - } - if (denyListedChannels != null - && denyListedChannels.size() > 0 - && denyListedChannels.size() < numChannels) { - // There are deny-listed channels. Get a session that is not affiliated with a deny-listed - // channel. - for (PooledSession session : sessions) { - if (denyListedChannels.getIfPresent(session.getChannel()) == null) { - sessions.remove(session); - sess = session; - break; - } - // Size is cached and can change after calling getIfPresent. - if (denyListedChannels.size() == 0) { - break; - } - } - } - if (sess == null) { - sess = sessions.poll(); - } - if (sess == null) { - span.addAnnotation("No session available"); - maybeCreateSession(); - waiter = new WaiterFuture(); - waiters.add(waiter); - } else { - span.addAnnotation("Acquired session"); - } - return checkoutSession(span, sess, waiter); - } - } - - private PooledSessionFuture checkoutSession( - final ISpan span, final PooledSession readySession, WaiterFuture waiter) { - ListenableFuture sessionFuture; - if (waiter != null) { - logger.log( - Level.FINE, - "No session available in the pool. Blocking for one to become available/created"); - span.addAnnotation("Waiting for a session to come available"); - sessionFuture = waiter; - } else { - SettableFuture fut = SettableFuture.create(); - fut.set(readySession); - sessionFuture = fut; - } - PooledSessionFuture res = createPooledSessionFuture(sessionFuture, span); - res.markCheckedOut(); - return res; - } - - private void incrementNumSessionsInUse() { - synchronized (lock) { - if (maxSessionsInUse < ++numSessionsInUse) { - maxSessionsInUse = numSessionsInUse; - } - numSessionsAcquired++; - } - } - - private void maybeCreateSession() { - ISpan span = tracer.getCurrentSpan(); - boolean throwResourceExhaustedException = false; - synchronized (lock) { - if (numWaiters() >= numSessionsBeingCreated) { - if (canCreateSession()) { - span.addAnnotation("Creating sessions"); - createSessions(getAllowedCreateSessions(options.getIncStep()), false); - } else if (options.isFailIfPoolExhausted()) { - throwResourceExhaustedException = true; - } - } - } - if (!throwResourceExhaustedException) { - return; - } - span.addAnnotation("Pool exhausted. Failing"); - - String message = - "No session available in the pool. Maximum number of sessions in the pool can be overridden" - + " by invoking SessionPoolOptions#Builder#setMaxSessions. Client can be made to block" - + " rather than fail by setting SessionPoolOptions#Builder#setBlockIfPoolExhausted.\n" - + createCheckedOutSessionsStackTraces(); - throw newSpannerException(ErrorCode.RESOURCE_EXHAUSTED, message); - } - - private StringBuilder createCheckedOutSessionsStackTraces() { - List currentlyCheckedOutSessions; - synchronized (lock) { - currentlyCheckedOutSessions = new ArrayList<>(this.markedCheckedOutSessions); - } - - // Create the error message without holding the lock, as we are potentially looping through a - // large set, and analyzing a large number of stack traces. - StringBuilder stackTraces = - new StringBuilder("MinSessions: ") - .append(options.getMinSessions()) - .append("\nMaxSessions: ") - .append(options.getMaxSessions()) - .append("\nThere are currently ") - .append(currentlyCheckedOutSessions.size()) - .append(" sessions checked out:\n\n"); - if (options.isTrackStackTraceOfSessionCheckout()) { - for (PooledSessionFuture session : currentlyCheckedOutSessions) { - if (session.leakedException != null) { - StringWriter writer = new StringWriter(); - PrintWriter printWriter = new PrintWriter(writer); - session.leakedException.printStackTrace(printWriter); - stackTraces.append(writer).append("\n\n"); - } - } - } - return stackTraces; - } - - private void releaseSession(Tuple sessionWithPosition) { - releaseSession(sessionWithPosition.x(), false, sessionWithPosition.y()); - } - - private void releaseSession(PooledSession session, boolean isNewSession) { - releaseSession(session, isNewSession, null); - } - - /** Releases a session back to the pool. This might cause one of the waiters to be unblocked. */ - private void releaseSession( - PooledSession session, boolean isNewSession, @Nullable Integer position) { - Preconditions.checkNotNull(session); - synchronized (lock) { - if (closureFuture != null) { - return; - } - if (waiters.isEmpty()) { - // There are no pending waiters. - // Add to a random position if the transactions per second is high or the head of the - // session pool already contains many sessions with the same channel as this one. - if (session.releaseToPosition != Position.RANDOM && shouldRandomize()) { - session.releaseToPosition = Position.RANDOM; - } else if (session.releaseToPosition == Position.FIRST && isUnbalanced(session)) { - session.releaseToPosition = Position.RANDOM; - } else if (session.releaseToPosition == Position.RANDOM - && !isNewSession - && checkedOutSessions.size() <= 2) { - // Do not randomize if there are few other sessions checked out and this session has been - // used. This ensures that this session will be re-used for the next transaction, which is - // more efficient. - session.releaseToPosition = options.getReleaseToPosition(); - } - if (position != null) { - // Make sure we use a valid position, as the number of sessions could have changed in the - // meantime. - int actualPosition = Math.min(position, sessions.size()); - sessions.add(actualPosition, session); - } else if (session.releaseToPosition == Position.RANDOM && !sessions.isEmpty()) { - // A session should only be added at a random position the first time it is added to - // the pool or if the pool was deemed unbalanced. All following releases into the pool - // should normally happen at the default release position (unless the pool is again deemed - // to be unbalanced and the insertion would happen at the front of the pool). - session.releaseToPosition = options.getReleaseToPosition(); - int pos = random.nextInt(sessions.size() + 1); - sessions.add(pos, session); - } else if (session.releaseToPosition == Position.LAST) { - sessions.addLast(session); - } else { - sessions.addFirst(session); - } - session.releaseToPosition = options.getReleaseToPosition(); - } else { - waiters.poll().put(session); - } - } - } - - /** - * Returns true if the position where we return the session should be random if: - * - *
    - *
  1. The current TPS is higher than the configured threshold. - *
  2. AND the number of sessions checked out is larger than the number of channels. - *
- * - * The second check prevents the session pool from being randomized when the application is - * running many small, quick queries using a small number of parallel threads. This can cause a - * high TPS, without actually having a high degree of parallelism. - */ - @VisibleForTesting - boolean shouldRandomize() { - return this.options.getRandomizePositionQPSThreshold() > 0 - && this.transactionsPerSecond >= this.options.getRandomizePositionQPSThreshold() - && this.numSessionsInUse >= this.numChannels; - } - - private boolean isUnbalanced(PooledSession session) { - int channel = session.getChannel(); - int numChannels = sessionClient.getSpanner().getOptions().getNumChannels(); - return isUnbalanced(channel, this.sessions, this.checkedOutSessions, numChannels); - } - - /** - * Returns true if the given list of sessions is considered unbalanced when compared to the - * sessionChannel that is about to be added to the pool. - * - *

The method returns true if all the following is true: - * - *

    - *
  1. The list of sessions is not empty. - *
  2. The number of checked out sessions is > 2. - *
  3. The number of channels being used by the pool is > 1. - *
  4. And at least one of the following is true: - *
      - *
    1. The first numChannels sessions in the list of sessions contains more than 2 - * sessions that use the same channel as the one being added. - *
    2. The list of currently checked out sessions contains more than 2 times the the - * number of sessions with the same channel as the one being added than it should in - * order for it to be perfectly balanced. Perfectly balanced in this case means that - * the list should preferably contain size/numChannels sessions of each channel. - *
    - *
- * - * @param channelOfSessionBeingAdded the channel number being used by the session that is about to - * be released into the pool - * @param sessions the list of all sessions in the pool - * @param checkedOutSessions the currently checked out sessions of the pool - * @param numChannels the number of channels in use - * @return true if the pool is considered unbalanced, and false otherwise - */ - @VisibleForTesting - static boolean isUnbalanced( - int channelOfSessionBeingAdded, - List sessions, - Set checkedOutSessions, - int numChannels) { - // Do not re-balance the pool if the number of checked out sessions is low, as it is - // better to re-use sessions as much as possible in a low-QPS scenario. - if (sessions.isEmpty() || checkedOutSessions.size() <= 2) { - return false; - } - if (numChannels == 1) { - return false; - } - - // Ideally, the first numChannels sessions in the pool should contain exactly one session for - // each channel. - // Check if the first numChannels sessions at the head of the pool already contain more than 2 - // sessions that use the same channel as this one. If so, we re-balance. - // We also re-balance the pool in the specific case that the pool uses 2 channels and the first - // two sessions use those two channels. - int maxSessionsAtHeadOfPool = Math.min(numChannels, 3); - int count = 0; - for (int i = 0; i < Math.min(numChannels, sessions.size()); i++) { - PooledSession otherSession = sessions.get(i); - if (channelOfSessionBeingAdded == otherSession.getChannel()) { - count++; - if (count >= maxSessionsAtHeadOfPool) { - return true; - } - } - } - // Ideally, the use of a channel in the checked out sessions is exactly - // numCheckedOut / numChannels - // We check whether we are more than a factor two away from that perfect distribution. - // If we are, then we re-balance. - count = 0; - int checkedOutThreshold = Math.max(2, 2 * checkedOutSessions.size() / numChannels); - for (PooledSessionFuture otherSession : checkedOutSessions) { - if (otherSession.isDone() && channelOfSessionBeingAdded == otherSession.get().getChannel()) { - count++; - if (count > checkedOutThreshold) { - return true; - } - } - } - return false; - } - - private void handleCreateSessionsFailure(SpannerException e, int count) { - synchronized (lock) { - for (int i = 0; i < count; i++) { - if (!waiters.isEmpty()) { - waiters.poll().put(e); - } else { - break; - } - } - if (!dialect.isDone()) { - dialect.setException(e); - } - if (isDatabaseOrInstanceNotFound(e)) { - setResourceNotFoundException((ResourceNotFoundException) e); - poolMaintainer.close(); - } - } - } - - void setResourceNotFoundException(ResourceNotFoundException e) { - this.resourceNotFoundException = MoreObjects.firstNonNull(this.resourceNotFoundException, e); - } - - private void decrementPendingClosures(int count) { - pendingClosure -= count; - if (pendingClosure == 0) { - closureFuture.set(null); - } - } - - /** - * Close all the sessions. Once this method is invoked {@link #getSession()} will start throwing - * {@code IllegalStateException}. The returned future blocks till all the sessions created in this - * pool have been closed. - */ - ListenableFuture closeAsync(ClosedException closedException) { - ListenableFuture retFuture = null; - synchronized (lock) { - if (closureFuture != null) { - throw new IllegalStateException("Close has already been invoked", this.closedException); - } - this.closedException = closedException; - // Fail all pending waiters. - WaiterFuture waiter = waiters.poll(); - while (waiter != null) { - waiter.put(newSpannerException(ErrorCode.INTERNAL, "Client has been closed")); - waiter = waiters.poll(); - } - closureFuture = SettableFuture.create(); - retFuture = closureFuture; - - pendingClosure = totalSessions() + numSessionsBeingCreated; - - if (!poolMaintainer.isClosed()) { - pendingClosure += 1; // For pool maintenance thread - poolMaintainer.close(); - } - - sessions.clear(); - for (PooledSessionFuture session : checkedOutSessions) { - if (session.leakedException != null) { - if (options.isFailOnSessionLeak()) { - throw session.leakedException; - } else { - logger.log(Level.WARNING, "Leaked session", session.leakedException); - } - } else { - String message = - "Leaked session. Call" - + " SessionOptions.Builder#setTrackStackTraceOfSessionCheckout(true) to start" - + " tracking the call stack trace of the thread that checked out the session."; - if (options.isFailOnSessionLeak()) { - throw new LeakedSessionException(message); - } else { - logger.log(Level.WARNING, message); - } - } - } - for (final PooledSession session : ImmutableList.copyOf(allSessions)) { - if (session.state != SessionState.CLOSING) { - closeSessionAsync(session); - } - } - - // Nothing to be closed, mark as complete - if (pendingClosure == 0) { - closureFuture.set(null); - } - } - - retFuture.addListener(() -> executorFactory.release(executor), MoreExecutors.directExecutor()); - return retFuture; - } - - private int numWaiters() { - synchronized (lock) { - return waiters.size(); - } - } - - @VisibleForTesting - int totalSessions() { - synchronized (lock) { - return allSessions.size(); - } - } - - @VisibleForTesting - int numSessionsInPool() { - synchronized (lock) { - return sessions.size(); - } - } - - private ApiFuture closeSessionAsync(final PooledSession sess) { - ApiFuture res = sess.delegate.asyncClose(); - res.addListener( - () -> { - synchronized (lock) { - allSessions.remove(sess); - if (isClosed()) { - decrementPendingClosures(1); - return; - } - // Create a new session if needed to unblock some waiter. - if (numWaiters() > numSessionsBeingCreated) { - createSessions( - getAllowedCreateSessions(numWaiters() - numSessionsBeingCreated), false); - } - } - }, - MoreExecutors.directExecutor()); - return res; - } - - /** - * Returns the minimum of the wanted number of sessions that the caller wants to create and the - * actual max number that may be created at this moment. - */ - private int getAllowedCreateSessions(int wantedSessions) { - synchronized (lock) { - return Math.min( - wantedSessions, options.getMaxSessions() - (totalSessions() + numSessionsBeingCreated)); - } - } - - private boolean canCreateSession() { - synchronized (lock) { - return totalSessions() + numSessionsBeingCreated < options.getMaxSessions(); - } - } - - private void createSessions(final int sessionCount, boolean distributeOverChannels) { - logger.log(Level.FINE, String.format("Creating %d sessions", sessionCount)); - synchronized (lock) { - numSessionsBeingCreated += sessionCount; - try { - // Create a batch of sessions. The actual session creation can be split into multiple gRPC - // calls and the session consumer consumes the returned sessions as they become available. - // The batchCreateSessions method automatically spreads the sessions evenly over all - // available channels. - sessionClient.asyncBatchCreateSessions( - sessionCount, distributeOverChannels, sessionConsumer); - } catch (Throwable t) { - // Expose this to customer via a metric. - numSessionsBeingCreated -= sessionCount; - if (isClosed()) { - decrementPendingClosures(sessionCount); - } - handleCreateSessionsFailure(newSpannerException(t), sessionCount); - } - } - } - - /** - * {@link SessionConsumer} that receives the created sessions from a {@link SessionClient} and - * releases these into the pool. The session pool only needs one instance of this, as all sessions - * should be returned to the same pool regardless of what triggered the creation of the sessions. - */ - class SessionConsumerImpl implements SessionConsumer { - /** Release a new session to the pool. */ - @Override - public void onSessionReady(SessionImpl session) { - PooledSession pooledSession = null; - boolean closeSession = false; - synchronized (lock) { - int minSessions = options.getMinSessions(); - pooledSession = new PooledSession(session); - numSessionsBeingCreated--; - if (closureFuture != null) { - closeSession = true; - } else { - Preconditions.checkState(totalSessions() <= options.getMaxSessions() - 1); - allSessions.add(pooledSession); - if (allSessions.size() >= minSessions) { - waitOnMinSessionsLatch.countDown(); - } - if (options.isAutoDetectDialect() - && !detectDialectStarted - && !options.getUseMultiplexedSession()) { - // Get the dialect of the underlying database if that has not yet been done. Note that - // this method will release the session into the pool once it is done. - detectDialectStarted = true; - pooledSession.determineDialectAsync(SessionPool.this.dialect); - } else { - // Release the session to a random position in the pool to prevent the case that a batch - // of sessions that are affiliated with the same channel are all placed sequentially in - // the pool. - releaseSession(pooledSession, true); - } - } - } - if (closeSession) { - closeSessionAsync(pooledSession); - } - } - - /** - * Informs waiters for a session that session creation failed. The exception will propagate to - * the waiters as a {@link SpannerException}. - */ - @Override - public void onSessionCreateFailure(Throwable t, int createFailureForSessionCount) { - synchronized (lock) { - numSessionsBeingCreated -= createFailureForSessionCount; - if (numSessionsBeingCreated == 0) { - // Don't continue to block if no more sessions are being created. - waitOnMinSessionsLatch.countDown(); - } - if (isClosed()) { - decrementPendingClosures(createFailureForSessionCount); - } - handleCreateSessionsFailure(newSpannerException(t), createFailureForSessionCount); - } - } - } - - /** - * Initializes and creates Spanner session relevant metrics using OpenCensus. When coupled with an - * exporter, it allows users to monitor client behavior. - */ - private void initOpenCensusMetricsCollection( - MetricRegistry metricRegistry, - List labelValues, - AtomicLong numMultiplexedSessionsAcquired, - AtomicLong numMultiplexedSessionsReleased) { - if (!SpannerOptions.isEnabledOpenCensusMetrics()) { - return; - } - DerivedLongGauge maxInUseSessionsMetric = - metricRegistry.addDerivedLongGauge( - METRIC_PREFIX + MAX_IN_USE_SESSIONS, - MetricOptions.builder() - .setDescription(MAX_IN_USE_SESSIONS_DESCRIPTION) - .setUnit(COUNT) - .setLabelKeys(SPANNER_LABEL_KEYS) - .build()); - - DerivedLongGauge maxAllowedSessionsMetric = - metricRegistry.addDerivedLongGauge( - METRIC_PREFIX + MAX_ALLOWED_SESSIONS, - MetricOptions.builder() - .setDescription(MAX_ALLOWED_SESSIONS_DESCRIPTION) - .setUnit(COUNT) - .setLabelKeys(SPANNER_LABEL_KEYS) - .build()); - - DerivedLongCumulative sessionsTimeouts = - metricRegistry.addDerivedLongCumulative( - METRIC_PREFIX + GET_SESSION_TIMEOUTS, - MetricOptions.builder() - .setDescription(SESSIONS_TIMEOUTS_DESCRIPTION) - .setUnit(COUNT) - .setLabelKeys(SPANNER_LABEL_KEYS) - .build()); - - DerivedLongCumulative numAcquiredSessionsMetric = - metricRegistry.addDerivedLongCumulative( - METRIC_PREFIX + NUM_ACQUIRED_SESSIONS, - MetricOptions.builder() - .setDescription(NUM_ACQUIRED_SESSIONS_DESCRIPTION) - .setUnit(COUNT) - .setLabelKeys(SPANNER_LABEL_KEYS_WITH_MULTIPLEXED_SESSIONS) - .build()); - - DerivedLongCumulative numReleasedSessionsMetric = - metricRegistry.addDerivedLongCumulative( - METRIC_PREFIX + NUM_RELEASED_SESSIONS, - MetricOptions.builder() - .setDescription(NUM_RELEASED_SESSIONS_DESCRIPTION) - .setUnit(COUNT) - .setLabelKeys(SPANNER_LABEL_KEYS_WITH_MULTIPLEXED_SESSIONS) - .build()); - - DerivedLongGauge numSessionsInPoolMetric = - metricRegistry.addDerivedLongGauge( - METRIC_PREFIX + NUM_SESSIONS_IN_POOL, - MetricOptions.builder() - .setDescription(NUM_SESSIONS_IN_POOL_DESCRIPTION) - .setUnit(COUNT) - .setLabelKeys(SPANNER_LABEL_KEYS_WITH_TYPE) - .build()); - - // The value of a maxSessionsInUse is observed from a callback function. This function is - // invoked whenever metrics are collected. - maxInUseSessionsMetric.removeTimeSeries(labelValues); - maxInUseSessionsMetric.createTimeSeries( - labelValues, this, sessionPool -> sessionPool.maxSessionsInUse); - - // The value of a maxSessions is observed from a callback function. This function is invoked - // whenever metrics are collected. - maxAllowedSessionsMetric.removeTimeSeries(labelValues); - maxAllowedSessionsMetric.createTimeSeries( - labelValues, options, SessionPoolOptions::getMaxSessions); - - // The value of a numWaiterTimeouts is observed from a callback function. This function is - // invoked whenever metrics are collected. - sessionsTimeouts.removeTimeSeries(labelValues); - sessionsTimeouts.createTimeSeries(labelValues, this, SessionPool::getNumWaiterTimeouts); - - List labelValuesWithRegularSessions = new ArrayList<>(labelValues); - List labelValuesWithMultiplexedSessions = new ArrayList<>(labelValues); - labelValuesWithMultiplexedSessions.add(LabelValue.create("true")); - labelValuesWithRegularSessions.add(LabelValue.create("false")); - - numAcquiredSessionsMetric.removeTimeSeries(labelValuesWithRegularSessions); - numAcquiredSessionsMetric.createTimeSeries( - labelValuesWithRegularSessions, this, sessionPool -> sessionPool.numSessionsAcquired); - numAcquiredSessionsMetric.removeTimeSeries(labelValuesWithMultiplexedSessions); - numAcquiredSessionsMetric.createTimeSeries( - labelValuesWithMultiplexedSessions, this, unused -> numMultiplexedSessionsAcquired.get()); - - numReleasedSessionsMetric.removeTimeSeries(labelValuesWithRegularSessions); - numReleasedSessionsMetric.createTimeSeries( - labelValuesWithRegularSessions, this, sessionPool -> sessionPool.numSessionsReleased); - numReleasedSessionsMetric.removeTimeSeries(labelValuesWithMultiplexedSessions); - numReleasedSessionsMetric.createTimeSeries( - labelValuesWithMultiplexedSessions, this, unused -> numMultiplexedSessionsReleased.get()); - - List labelValuesWithBeingPreparedType = new ArrayList<>(labelValues); - labelValuesWithBeingPreparedType.add(NUM_SESSIONS_BEING_PREPARED); - numSessionsInPoolMetric.removeTimeSeries(labelValuesWithBeingPreparedType); - numSessionsInPoolMetric.createTimeSeries( - labelValuesWithBeingPreparedType, - this, - // TODO: Remove metric. - ignored -> 0L); - - List labelValuesWithInUseType = new ArrayList<>(labelValues); - labelValuesWithInUseType.add(NUM_IN_USE_SESSIONS); - numSessionsInPoolMetric.removeTimeSeries(labelValuesWithInUseType); - numSessionsInPoolMetric.createTimeSeries( - labelValuesWithInUseType, this, sessionPool -> sessionPool.numSessionsInUse); - - List labelValuesWithReadType = new ArrayList<>(labelValues); - labelValuesWithReadType.add(NUM_READ_SESSIONS); - numSessionsInPoolMetric.removeTimeSeries(labelValuesWithReadType); - numSessionsInPoolMetric.createTimeSeries( - labelValuesWithReadType, this, sessionPool -> sessionPool.sessions.size()); - - List labelValuesWithWriteType = new ArrayList<>(labelValues); - labelValuesWithWriteType.add(NUM_WRITE_SESSIONS); - numSessionsInPoolMetric.removeTimeSeries(labelValuesWithWriteType); - numSessionsInPoolMetric.createTimeSeries( - labelValuesWithWriteType, - this, - // TODO: Remove metric. - ignored -> 0L); - } - - /** - * Initializes and creates Spanner session relevant metrics using OpenTelemetry. When coupled with - * an exporter, it allows users to monitor client behavior. - */ - private void initOpenTelemetryMetricsCollection( - OpenTelemetry openTelemetry, - Attributes attributes, - AtomicLong numMultiplexedSessionsAcquired, - AtomicLong numMultiplexedSessionsReleased) { - if (openTelemetry == null || !SpannerOptions.isEnabledOpenTelemetryMetrics()) { - return; - } - - Meter meter = openTelemetry.getMeter(MetricRegistryConstants.INSTRUMENTATION_SCOPE); - meter - .gaugeBuilder(MAX_ALLOWED_SESSIONS) - .setDescription(MAX_ALLOWED_SESSIONS_DESCRIPTION) - .setUnit(COUNT) - .buildWithCallback( - measurement -> { - // Although Max sessions is a constant value, OpenTelemetry requires to define this as - // a callback. - measurement.record(options.getMaxSessions(), attributes); - }); - - meter - .gaugeBuilder(MAX_IN_USE_SESSIONS) - .setDescription(MAX_IN_USE_SESSIONS_DESCRIPTION) - .setUnit(COUNT) - .buildWithCallback( - measurement -> { - measurement.record(this.maxSessionsInUse, attributes); - }); - - AttributesBuilder attributesBuilder; - if (attributes != null) { - attributesBuilder = attributes.toBuilder(); - } else { - attributesBuilder = Attributes.builder(); - } - Attributes attributesInUseSessions = - attributesBuilder.put(SESSIONS_TYPE, NUM_SESSIONS_IN_USE).build(); - Attributes attributesAvailableSessions = - attributesBuilder.put(SESSIONS_TYPE, NUM_SESSIONS_AVAILABLE).build(); - meter - .upDownCounterBuilder(NUM_SESSIONS_IN_POOL) - .setDescription(NUM_SESSIONS_IN_POOL_DESCRIPTION) - .setUnit(COUNT) - .buildWithCallback( - measurement -> { - measurement.record(this.numSessionsInUse, attributesInUseSessions); - measurement.record(this.sessions.size(), attributesAvailableSessions); - }); - - AttributesBuilder attributesBuilderIsMultiplexed; - if (attributes != null) { - attributesBuilderIsMultiplexed = attributes.toBuilder(); - } else { - attributesBuilderIsMultiplexed = Attributes.builder(); - } - Attributes attributesRegularSession = - attributesBuilderIsMultiplexed.put(IS_MULTIPLEXED, false).build(); - Attributes attributesMultiplexedSession = - attributesBuilderIsMultiplexed.put(IS_MULTIPLEXED, true).build(); - meter - .counterBuilder(GET_SESSION_TIMEOUTS) - .setDescription(SESSIONS_TIMEOUTS_DESCRIPTION) - .setUnit(COUNT) - .buildWithCallback( - measurement -> { - measurement.record(this.getNumWaiterTimeouts(), attributes); - }); - - meter - .counterBuilder(NUM_ACQUIRED_SESSIONS) - .setDescription(NUM_ACQUIRED_SESSIONS_DESCRIPTION) - .setUnit(COUNT) - .buildWithCallback( - measurement -> { - measurement.record(this.numSessionsAcquired, attributesRegularSession); - measurement.record( - numMultiplexedSessionsAcquired.get(), attributesMultiplexedSession); - }); - - meter - .counterBuilder(NUM_RELEASED_SESSIONS) - .setDescription(NUM_RELEASED_SESSIONS_DESCRIPTION) - .setUnit(COUNT) - .buildWithCallback( - measurement -> { - measurement.record(this.numSessionsReleased, attributesRegularSession); - measurement.record( - numMultiplexedSessionsReleased.get(), attributesMultiplexedSession); - }); - } -} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolAsyncTransactionManager.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolAsyncTransactionManager.java deleted file mode 100644 index 5e48d1b78bc..00000000000 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolAsyncTransactionManager.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutureCallback; -import com.google.api.core.ApiFutures; -import com.google.api.core.SettableApiFuture; -import com.google.cloud.Timestamp; -import com.google.cloud.spanner.Options.TransactionOption; -import com.google.cloud.spanner.SessionPool.SessionFuture; -import com.google.cloud.spanner.SessionPool.SessionNotFoundHandler; -import com.google.cloud.spanner.SessionPool.SessionReplacementHandler; -import com.google.cloud.spanner.TransactionContextFutureImpl.CommittableAsyncTransactionManager; -import com.google.cloud.spanner.TransactionManager.TransactionState; -import com.google.common.base.Preconditions; -import com.google.common.util.concurrent.MoreExecutors; -import javax.annotation.concurrent.GuardedBy; - -class SessionPoolAsyncTransactionManager - implements CommittableAsyncTransactionManager, SessionNotFoundHandler { - private final Object lock = new Object(); - - @GuardedBy("lock") - private TransactionState txnState; - - @GuardedBy("lock") - private AbortedException abortedException; - - private final SessionReplacementHandler sessionReplacementHandler; - private final TransactionOption[] options; - private volatile I session; - private volatile SettableApiFuture delegate; - private boolean restartedAfterSessionNotFound; - - SessionPoolAsyncTransactionManager( - SessionReplacementHandler sessionReplacementHandler, - I session, - TransactionOption... options) { - this.options = options; - this.sessionReplacementHandler = sessionReplacementHandler; - createTransaction(session); - } - - private void createTransaction(I session) { - this.session = session; - this.delegate = SettableApiFuture.create(); - this.session.addListener( - () -> { - try { - delegate.set( - SessionPoolAsyncTransactionManager.this - .session - .get() - .transactionManagerAsync(options)); - } catch (Throwable t) { - delegate.setException(t); - } - }, - MoreExecutors.directExecutor()); - } - - @Override - public SpannerException handleSessionNotFound(SessionNotFoundException notFound) { - // Restart the entire transaction with a new session and throw an AbortedException to force the - // client application to retry. - createTransaction(sessionReplacementHandler.replaceSession(notFound, session)); - restartedAfterSessionNotFound = true; - return SpannerExceptionFactory.newSpannerException( - ErrorCode.ABORTED, notFound.getMessage(), notFound); - } - - @Override - public void close() { - SpannerApiFutures.get(closeAsync()); - } - - @Override - public ApiFuture closeAsync() { - final SettableApiFuture res = SettableApiFuture.create(); - ApiFutures.addCallback( - delegate, - new ApiFutureCallback() { - @Override - public void onFailure(Throwable t) { - session.close(); - } - - @Override - public void onSuccess(AsyncTransactionManagerImpl result) { - ApiFutures.addCallback( - result.closeAsync(), - new ApiFutureCallback() { - @Override - public void onFailure(Throwable t) { - session.close(); - res.setException(t); - } - - @Override - public void onSuccess(Void result) { - session.close(); - res.set(result); - } - }, - MoreExecutors.directExecutor()); - } - }, - MoreExecutors.directExecutor()); - return res; - } - - @Override - public TransactionContextFuture beginAsync() { - synchronized (lock) { - Preconditions.checkState(txnState == null, "begin can only be called once"); - txnState = TransactionState.STARTED; - } - final SettableApiFuture delegateTxnFuture = SettableApiFuture.create(); - ApiFutures.addCallback( - delegate, - new ApiFutureCallback() { - @Override - public void onFailure(Throwable t) { - delegateTxnFuture.setException(t); - } - - @Override - public void onSuccess(AsyncTransactionManagerImpl result) { - ApiFutures.addCallback( - result.beginAsync(), - new ApiFutureCallback() { - @Override - public void onFailure(Throwable t) { - delegateTxnFuture.setException(t); - } - - @Override - public void onSuccess(TransactionContext result) { - delegateTxnFuture.set( - new SessionPool.SessionPoolTransactionContext( - SessionPoolAsyncTransactionManager.this, result)); - } - }, - MoreExecutors.directExecutor()); - } - }, - MoreExecutors.directExecutor()); - return new TransactionContextFutureImpl(this, delegateTxnFuture); - } - - @Override - public TransactionContextFuture beginAsync(AbortedException exception) { - // For regular sessions, the input exception is ignored and the behavior is equivalent to - // calling {@link #beginAsync()}. - return beginAsync(); - } - - @Override - public void onError(Throwable t) { - if (t instanceof AbortedException) { - synchronized (lock) { - txnState = TransactionState.ABORTED; - abortedException = (AbortedException) t; - } - } - } - - @Override - public ApiFuture commitAsync() { - synchronized (lock) { - Preconditions.checkState( - txnState == TransactionState.STARTED || txnState == TransactionState.ABORTED, - "commit can only be invoked if the transaction is in progress. Current state: " - + txnState); - if (txnState == TransactionState.ABORTED) { - return ApiFutures.immediateFailedFuture(abortedException); - } - txnState = TransactionState.COMMITTED; - } - return ApiFutures.transformAsync( - delegate, - input -> { - final SettableApiFuture res = SettableApiFuture.create(); - ApiFutures.addCallback( - input.commitAsync(), - new ApiFutureCallback() { - @Override - public void onFailure(Throwable t) { - synchronized (lock) { - if (t instanceof AbortedException) { - txnState = TransactionState.ABORTED; - abortedException = (AbortedException) t; - } else { - txnState = TransactionState.COMMIT_FAILED; - } - } - res.setException(t); - } - - @Override - public void onSuccess(Timestamp result) { - res.set(result); - } - }, - MoreExecutors.directExecutor()); - return res; - }, - MoreExecutors.directExecutor()); - } - - @Override - public ApiFuture rollbackAsync() { - synchronized (lock) { - Preconditions.checkState( - txnState == TransactionState.STARTED, - "rollback can only be called if the transaction is in progress"); - txnState = TransactionState.ROLLED_BACK; - } - return ApiFutures.transformAsync( - delegate, - input -> { - ApiFuture res = input.rollbackAsync(); - res.addListener(() -> session.close(), MoreExecutors.directExecutor()); - return res; - }, - MoreExecutors.directExecutor()); - } - - @Override - public TransactionContextFuture resetForRetryAsync() { - synchronized (lock) { - Preconditions.checkState( - txnState == TransactionState.ABORTED || restartedAfterSessionNotFound, - "resetForRetry can only be called after the transaction aborted."); - txnState = TransactionState.STARTED; - } - return new TransactionContextFutureImpl( - this, - ApiFutures.transform( - ApiFutures.transformAsync( - delegate, - input -> { - if (restartedAfterSessionNotFound) { - restartedAfterSessionNotFound = false; - return input.beginAsync(); - } - return input.resetForRetryAsync(); - }, - MoreExecutors.directExecutor()), - input -> - new SessionPool.SessionPoolTransactionContext( - SessionPoolAsyncTransactionManager.this, input), - MoreExecutors.directExecutor())); - } - - @Override - public TransactionState getState() { - synchronized (lock) { - return txnState; - } - } - - public ApiFuture getCommitResponse() { - synchronized (lock) { - Preconditions.checkState( - txnState == TransactionState.COMMITTED, - "commit can only be invoked if the transaction was successfully committed"); - } - return ApiFutures.transformAsync( - delegate, AsyncTransactionManagerImpl::getCommitResponse, MoreExecutors.directExecutor()); - } -} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java index 605f96da74b..c0fb65980cb 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPoolOptions.java @@ -21,15 +21,27 @@ import com.google.api.core.InternalApi; import com.google.api.core.ObsoleteApi; -import com.google.cloud.spanner.SessionPool.Position; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import java.time.Duration; import java.util.Locale; import java.util.Objects; -/** Options for the session pool used by {@code DatabaseClient}. */ +/** + * Options for the session pool used by {@code DatabaseClient}. + * + * @deprecated The Spanner Java client uses a single multiplexed session. All options related to the + * session pool are no longer functional and will be removed in a future version. + */ +@Deprecated public class SessionPoolOptions { + @Deprecated + enum Position { + FIRST, + LAST, + RANDOM + } + // Default number of channels * 100. private static final int DEFAULT_MAX_SESSIONS = 400; private static final int DEFAULT_MIN_SESSIONS = 100; @@ -222,10 +234,12 @@ public Builder toBuilder() { return new Builder(this); } + @Deprecated public int getMinSessions() { return minSessions; } + @Deprecated public int getMaxSessions() { return maxSessions; } @@ -262,6 +276,7 @@ Duration getMultiplexedSessionMaintenanceLoopFrequency() { return this.multiplexedSessionMaintenanceLoopFrequency; } + @Deprecated public int getKeepAliveIntervalMinutes() { return keepAliveIntervalMinutes; } @@ -272,14 +287,17 @@ public org.threeten.bp.Duration getRemoveInactiveSessionAfter() { return toThreetenDuration(getRemoveInactiveSessionAfterDuration()); } + @Deprecated public Duration getRemoveInactiveSessionAfterDuration() { return removeInactiveSessionAfter; } + @Deprecated public boolean isFailIfPoolExhausted() { return actionOnExhaustion == ActionOnExhaustion.FAIL; } + @Deprecated public boolean isBlockIfPoolExhausted() { return actionOnExhaustion == ActionOnExhaustion.BLOCK; } @@ -327,6 +345,7 @@ Clock getPoolMaintainerClock() { return poolMaintainerClock; } + @Deprecated public boolean isTrackStackTraceOfSessionCheckout() { return trackStackTraceOfSessionCheckout; } @@ -583,10 +602,10 @@ public static class Builder { /** * Capture the call stack of the thread that checked out a session of the pool. This will - * pre-create a {@link com.google.cloud.spanner.SessionPool.LeakedSessionException} already when - * a session is checked out. This can be disabled by users, for example if their monitoring - * systems log the pre-created exception. If disabled, the {@link - * com.google.cloud.spanner.SessionPool.LeakedSessionException} will only be created when an + * pre-create a com.google.cloud.spanner.SessionPool.LeakedSessionException already when a + * session is checked out. This can be disabled by users, for example if their monitoring + * systems log the pre-created exception. If disabled, the + * com.google.cloud.spanner.SessionPool.LeakedSessionException will only be created when an * actual session leak is detected. The stack trace of the exception will in that case not * contain the call stack of when the session was checked out. */ @@ -681,6 +700,7 @@ private Builder(SessionPoolOptions options) { * Minimum number of sessions that this pool will always maintain. These will be created eagerly * in parallel. Defaults to 100. */ + @Deprecated public Builder setMinSessions(int minSessions) { Preconditions.checkArgument(minSessions >= 0, "minSessions must be >= 0"); this.minSessionsSet = true; @@ -694,6 +714,7 @@ public Builder setMinSessions(int minSessions) { * operation. If current number of in use sessions is same as this and a new request comes, pool * can either block or fail. Defaults to 400. */ + @Deprecated public Builder setMaxSessions(int maxSessions) { Preconditions.checkArgument(maxSessions > 0, "maxSessions must be > 0"); this.maxSessions = maxSessions; @@ -747,10 +768,12 @@ Builder setInactiveTransactionRemovalOptions( * instead. */ @ObsoleteApi("Use setRemoveInactiveSessionAfterDuration(Duration) instead") + @Deprecated public Builder setRemoveInactiveSessionAfter(org.threeten.bp.Duration duration) { return setRemoveInactiveSessionAfterDuration(toJavaTimeDuration(duration)); } + @Deprecated public Builder setRemoveInactiveSessionAfterDuration(Duration duration) { this.removeInactiveSessionAfter = duration; return this; @@ -761,16 +784,18 @@ public Builder setRemoveInactiveSessionAfterDuration(Duration duration) { * is automatically closed after 60 minutes. Sessions will be kept alive by sending a dummy * query "Select 1". Default value is 30 minutes. */ + @Deprecated public Builder setKeepAliveIntervalMinutes(int intervalMinutes) { this.keepAliveIntervalMinutes = intervalMinutes; return this; } /** - * If all sessions are in use and and {@code maxSessions} has been reached, fail the request by + * If all sessions are in use and {@code maxSessions} has been reached, fail the request by * throwing a {@link SpannerException} with the error code {@code RESOURCE_EXHAUSTED}. Default * behavior is to block the request. */ + @Deprecated public Builder setFailIfPoolExhausted() { this.actionOnExhaustion = ActionOnExhaustion.FAIL; return this; @@ -785,6 +810,7 @@ public Builder setFailIfPoolExhausted() { * different period use the option {@link Builder#setAcquireSessionTimeoutDuration(Duration)} * ()} */ + @Deprecated public Builder setBlockIfPoolExhausted() { this.actionOnExhaustion = ActionOnExhaustion.BLOCK; return this; @@ -800,6 +826,7 @@ public Builder setBlockIfPoolExhausted() { * * @return this builder for chaining */ + @Deprecated public Builder setWarnIfInactiveTransactions() { this.inactiveTransactionRemovalOptions = InactiveTransactionRemovalOptions.newBuilder() @@ -819,6 +846,7 @@ public Builder setWarnIfInactiveTransactions() { * * @return this builder for chaining */ + @Deprecated public Builder setWarnAndCloseIfInactiveTransactions() { this.inactiveTransactionRemovalOptions = InactiveTransactionRemovalOptions.newBuilder() @@ -945,8 +973,8 @@ Builder setInitialWaitForSessionTimeoutMillis(long timeout) { } /** - * If a session has been invalidated by the server, the {@link SessionPool} will by default - * retry the session. Set this option to throw an exception instead of retrying. + * If a session has been invalidated by the server, the SessionPool will by default retry the + * session. Set this option to throw an exception instead of retrying. */ @VisibleForTesting Builder setFailIfSessionNotFound() { @@ -962,14 +990,15 @@ Builder setFailOnSessionLeak() { /** * Sets whether the session pool should capture the call stack trace when a session is checked - * out of the pool. This will internally prepare a {@link - * com.google.cloud.spanner.SessionPool.LeakedSessionException} that will only be thrown if the + * out of the pool. This will internally prepare a + * com.google.cloud.spanner.SessionPool.LeakedSessionException that will only be thrown if the * session is actually leaked. This makes it easier to debug session leaks, as the stack trace * of the thread that checked out the session will be available in the exception. * *

Some monitoring tools might log these exceptions even though they are not thrown. This * option can be used to suppress the creation and logging of these exceptions. */ + @Deprecated public Builder setTrackStackTraceOfSessionCheckout(boolean trackStackTraceOfSessionCheckout) { this.trackStackTraceOfSessionCheckout = trackStackTraceOfSessionCheckout; return this; @@ -982,6 +1011,7 @@ public Builder setTrackStackTraceOfSessionCheckout(boolean trackStackTraceOfSess * BeginTransaction option with that statement. *

This method may be removed in a future release. */ + @Deprecated public Builder setWriteSessionsFraction(float writeSessionsFraction) { this.writeSessionsFraction = writeSessionsFraction; return this; @@ -1010,14 +1040,16 @@ public Builder setWaitForMinSessionsDuration(Duration waitForMinSessions) { /** This method is obsolete. Use {@link #setAcquireSessionTimeoutDuration(Duration)} instead. */ @ObsoleteApi("Use setAcquireSessionTimeoutDuration(Duration) instead") + @Deprecated public Builder setAcquireSessionTimeout(org.threeten.bp.Duration acquireSessionTimeout) { return setAcquireSessionTimeoutDuration(toJavaTimeDuration(acquireSessionTimeout)); } /** - * If greater than zero, we wait for said duration when no sessions are available in the {@link - * SessionPool}. The default is a 60s timeout. Set the value to null to disable the timeout. + * If greater than zero, we wait for said duration when no sessions are available in the + * SessionPool. The default is a 60s timeout. Set the value to null to disable the timeout. */ + @Deprecated public Builder setAcquireSessionTimeoutDuration(Duration acquireSessionTimeout) { try { if (acquireSessionTimeout != null) { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionReference.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionReference.java index e96be9effaa..1fd6c303ede 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionReference.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionReference.java @@ -33,15 +33,17 @@ class SessionReference { private final String name; private final DatabaseId databaseId; + @Nullable private final String databaseRole; private final Map options; private volatile Instant lastUseTime; @Nullable private final Instant createTime; private final boolean isMultiplexed; - SessionReference(String name, Map options) { + SessionReference(String name, @Nullable String databaseRole, Map options) { this.options = options; this.name = checkNotNull(name); this.databaseId = SessionId.of(name).getDatabaseId(); + this.databaseRole = databaseRole; this.lastUseTime = Instant.now(); this.createTime = null; this.isMultiplexed = false; @@ -49,12 +51,14 @@ class SessionReference { SessionReference( String name, + @Nullable String databaseRole, com.google.protobuf.Timestamp createTime, boolean isMultiplexed, Map options) { this.options = options; this.name = checkNotNull(name); this.databaseId = SessionId.of(name).getDatabaseId(); + this.databaseRole = databaseRole; this.lastUseTime = Instant.now(); this.createTime = convert(createTime); this.isMultiplexed = isMultiplexed; @@ -64,6 +68,10 @@ public String getName() { return name; } + public String getDatabaseRole() { + return databaseRole; + } + public DatabaseId getDatabaseId() { return databaseId; } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerApiFutures.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerApiFutures.java index fb55378aa56..88e0b84f0fc 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerApiFutures.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerApiFutures.java @@ -33,12 +33,11 @@ public static T getOrNull(ApiFuture future) throws SpannerException { if (e.getCause() instanceof SpannerException) { throw (SpannerException) e.getCause(); } - throw SpannerExceptionFactory.newSpannerException(e.getCause()); + throw SpannerExceptionFactory.asSpannerException(e.getCause()); } catch (InterruptedException e) { - throw SpannerExceptionFactory.propagateInterrupt(e, null /*TODO: requestId*/); + throw SpannerExceptionFactory.propagateInterrupt(e); } catch (CancellationException e) { - throw SpannerExceptionFactory.newSpannerExceptionForCancellation( - null, e, null /*TODO: requestId*/); + throw SpannerExceptionFactory.newSpannerExceptionForCancellation(null, e); } } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerBatchUpdateException.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerBatchUpdateException.java index 0d841d24463..837a008a833 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerBatchUpdateException.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerBatchUpdateException.java @@ -25,9 +25,8 @@ public class SpannerBatchUpdateException extends SpannerException { ErrorCode code, String message, long[] counts, - Throwable cause, - XGoogSpannerRequestId reqId) { - super(token, code, false, message, cause, null, reqId); + Throwable cause) { + super(token, code, false, message, cause, null); updateCounts = counts; } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterUtils.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterUtils.java index 890d39b31a6..0f6d8006866 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterUtils.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterUtils.java @@ -24,6 +24,7 @@ import static com.google.api.MetricDescriptor.ValueType.INT64; import static com.google.cloud.spanner.BuiltInMetricsConstant.ALLOWED_EXEMPLARS_ATTRIBUTES; import static com.google.cloud.spanner.BuiltInMetricsConstant.GAX_METER_NAME; +import static com.google.cloud.spanner.BuiltInMetricsConstant.GRPC_GCP_METER_NAME; import static com.google.cloud.spanner.BuiltInMetricsConstant.GRPC_METER_NAME; import static com.google.cloud.spanner.BuiltInMetricsConstant.PROJECT_ID_KEY; import static com.google.cloud.spanner.BuiltInMetricsConstant.SPANNER_METER_NAME; @@ -86,7 +87,8 @@ static List convertToSpannerTimeSeries( // Get metrics data from GAX library, GRPC library and Spanner library if (!(metricData.getInstrumentationScopeInfo().getName().equals(GAX_METER_NAME) || metricData.getInstrumentationScopeInfo().getName().equals(SPANNER_METER_NAME) - || metricData.getInstrumentationScopeInfo().getName().equals(GRPC_METER_NAME))) { + || metricData.getInstrumentationScopeInfo().getName().equals(GRPC_METER_NAME) + || metricData.getInstrumentationScopeInfo().getName().equals(GRPC_GCP_METER_NAME))) { // Filter out metric data for instruments that are not part of the spanner metrics list continue; } @@ -116,9 +118,10 @@ private static TimeSeries convertPointToSpannerTimeSeries( PointData pointData, MonitoredResource.Builder monitoredResourceBuilder, String projectId) { + MetricKind metricKind = convertMetricKind(metricData); TimeSeries.Builder builder = TimeSeries.newBuilder() - .setMetricKind(convertMetricKind(metricData)) + .setMetricKind(metricKind) .setValueType(convertValueType(metricData.getType())); Metric.Builder metricBuilder = Metric.newBuilder().setType(metricData.getName()); @@ -143,7 +146,11 @@ private static TimeSeries convertPointToSpannerTimeSeries( TimeInterval timeInterval = TimeInterval.newBuilder() - .setStartTime(Timestamps.fromNanos(pointData.getStartEpochNanos())) + .setStartTime( + // For gauge metrics, the start and end time should be the same. + metricKind == MetricKind.GAUGE + ? Timestamps.fromNanos(pointData.getEpochNanos()) + : Timestamps.fromNanos(pointData.getStartEpochNanos())) .setEndTime(Timestamps.fromNanos(pointData.getEpochNanos())) .build(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerException.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerException.java index c5af3f48152..0829cc35d62 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerException.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerException.java @@ -16,11 +16,11 @@ package com.google.cloud.spanner; -import com.google.api.core.InternalApi; import com.google.api.gax.rpc.ApiException; import com.google.api.gax.rpc.ErrorDetails; import com.google.cloud.grpc.BaseGrpcServiceException; import com.google.common.base.Preconditions; +import com.google.common.base.Strings; import com.google.protobuf.util.Durations; import com.google.rpc.ResourceInfo; import com.google.rpc.RetryInfo; @@ -41,9 +41,8 @@ public abstract static class ResourceNotFoundException extends SpannerException @Nullable String message, ResourceInfo resourceInfo, @Nullable Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId reqId) { - super(token, ErrorCode.NOT_FOUND, /* retryable */ false, message, cause, apiException, reqId); + @Nullable ApiException apiException) { + super(token, ErrorCode.NOT_FOUND, /* retryable */ false, message, cause, apiException); this.resourceInfo = resourceInfo; } @@ -55,10 +54,12 @@ public String getResourceName() { private static final long serialVersionUID = 20150916L; private static final Metadata.Key KEY_RETRY_INFO = ProtoUtils.keyForProto(RetryInfo.getDefaultInstance()); + private static final String PG_ERR_CODE_KEY = "pg_sqlerrcode"; private final ErrorCode code; private final ApiException apiException; - private XGoogSpannerRequestId requestId; + private final XGoogSpannerRequestId requestId; + private String statement; /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ SpannerException( @@ -78,25 +79,29 @@ public String getResourceName() { @Nullable String message, @Nullable Throwable cause, @Nullable ApiException apiException) { - this(token, code, retryable, message, cause, apiException, null); - } - - /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ - SpannerException( - DoNotConstructDirectly token, - ErrorCode code, - boolean retryable, - @Nullable String message, - @Nullable Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId requestId) { super(message, cause, code.getCode(), retryable); if (token != DoNotConstructDirectly.ALLOWED) { throw new AssertionError("Do not construct directly: use SpannerExceptionFactory"); } this.code = Preconditions.checkNotNull(code); this.apiException = apiException; - this.requestId = requestId; + this.requestId = extractRequestId(cause); + } + + @Override + public String getMessage() { + if (this.statement == null) { + return super.getMessage(); + } + return String.format("%s - Statement: '%s'", super.getMessage(), this.statement); + } + + @Override + public String toString() { + if (this.requestId == null) { + return super.toString(); + } + return super.toString() + " - RequestId: " + this.requestId; } /** Returns the error code associated with this exception. */ @@ -104,6 +109,18 @@ public ErrorCode getErrorCode() { return code; } + /** + * Returns the PostgreSQL SQLState error code that is encoded in this exception, or null if this + * {@link SpannerException} does not include a PostgreSQL error code. + */ + public String getPostgreSQLErrorCode() { + ErrorDetails details = getErrorDetails(); + if (details == null || details.getErrorInfo() == null) { + return null; + } + return details.getErrorInfo().getMetadataOrDefault(PG_ERR_CODE_KEY, null); + } + public String getRequestId() { if (requestId == null) { return ""; @@ -128,7 +145,7 @@ static long extractRetryDelay(Throwable cause) { Metadata trailers = Status.trailersFromThrowable(cause); if (trailers != null && trailers.containsKey(KEY_RETRY_INFO)) { RetryInfo retryInfo = trailers.get(KEY_RETRY_INFO); - if (retryInfo.hasRetryDelay()) { + if (retryInfo != null && retryInfo.hasRetryDelay()) { return Durations.toMillis(retryInfo.getRetryDelay()); } } @@ -136,6 +153,20 @@ static long extractRetryDelay(Throwable cause) { return -1L; } + @Nullable + static XGoogSpannerRequestId extractRequestId(Throwable cause) { + if (cause != null) { + Metadata trailers = Status.trailersFromThrowable(cause); + if (trailers != null && trailers.containsKey(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY)) { + String requestId = trailers.get(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY); + if (!Strings.isNullOrEmpty(requestId)) { + return XGoogSpannerRequestId.of(requestId); + } + } + } + return null; + } + /** * Checks the underlying reason of the exception and if it's {@link ApiException} then return the * reason otherwise null. @@ -199,9 +230,7 @@ public ErrorDetails getErrorDetails() { return null; } - /** Sets the requestId. */ - @InternalApi - public void setRequestId(XGoogSpannerRequestId reqId) { - this.requestId = reqId; + void setStatement(String statement) { + this.statement = statement; } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerExceptionFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerExceptionFactory.java index f55770dff99..185f98b5433 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerExceptionFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerExceptionFactory.java @@ -58,37 +58,17 @@ public final class SpannerExceptionFactory { ProtoUtils.keyForProto(ErrorInfo.getDefaultInstance()); public static SpannerException newSpannerException(ErrorCode code, @Nullable String message) { - return newSpannerException(code, message, (XGoogSpannerRequestId) (null)); - } - - public static SpannerException newSpannerException( - ErrorCode code, - @Nullable String message, - @Nullable Throwable cause, - @Nullable XGoogSpannerRequestId reqId) { - return newSpannerExceptionPreformatted( - code, formatMessage(code, message), cause, (ApiException) (null), reqId); - } - - public static SpannerException newSpannerException( - ErrorCode code, @Nullable String message, @Nullable XGoogSpannerRequestId reqId) { - return newSpannerException(code, message, (Throwable) (null), reqId); + return newSpannerException(code, message, null); } public static SpannerException newSpannerException( ErrorCode code, @Nullable String message, @Nullable Throwable cause) { - return newSpannerException(code, message, cause, null); + return newSpannerExceptionPreformatted(code, formatMessage(code, message), cause, null); } public static SpannerException propagateInterrupt(InterruptedException e) { - return propagateInterrupt(e, null); - } - - public static SpannerException propagateInterrupt( - InterruptedException e, XGoogSpannerRequestId reqId) { Thread.currentThread().interrupt(); - return SpannerExceptionFactory.newSpannerException( - ErrorCode.CANCELLED, "Interrupted", e, reqId); + return SpannerExceptionFactory.newSpannerException(ErrorCode.CANCELLED, "Interrupted", e); } /** @@ -132,27 +112,17 @@ public static SpannerException asSpannerException(Throwable t) { * #newSpannerException(ErrorCode, String)} instead of this method. */ public static SpannerException newSpannerException(Throwable cause) { - return newSpannerException(null, cause, null); - } - - public static SpannerException newSpannerException(Throwable cause, XGoogSpannerRequestId reqId) { - return newSpannerException(null, cause, reqId); + return newSpannerException(null, cause); } public static SpannerBatchUpdateException newSpannerBatchUpdateException( ErrorCode code, String message, long[] updateCounts) { - return newSpannerBatchUpdateException(code, message, updateCounts, null); - } - - public static SpannerBatchUpdateException newSpannerBatchUpdateException( - ErrorCode code, String message, long[] updateCounts, @Nullable XGoogSpannerRequestId reqId) { DoNotConstructDirectly token = DoNotConstructDirectly.ALLOWED; SpannerException cause = null; if (isTransactionMutationLimitException(code, message)) { - cause = - new TransactionMutationLimitExceededException(token, code, message, null, null, reqId); + cause = new TransactionMutationLimitExceededException(token, code, message, null, null); } - return new SpannerBatchUpdateException(token, code, message, updateCounts, cause, reqId); + return new SpannerBatchUpdateException(token, code, message, updateCounts, cause); } /** Constructs a specific error that */ @@ -205,10 +175,6 @@ public static SpannerBatchUpdateException newSpannerBatchUpdateException( cause); } - public static SpannerException newSpannerException(@Nullable Context context, Throwable cause) { - return newSpannerException(context, cause, null); - } - /** * Creates a new exception based on {@code cause}. If {@code cause} indicates cancellation, {@code * context} will be inspected to establish the type of cancellation. @@ -216,22 +182,21 @@ public static SpannerException newSpannerException(@Nullable Context context, Th *

Intended for internal library use; user code should use {@link * #newSpannerException(ErrorCode, String)} instead of this method. */ - public static SpannerException newSpannerException( - @Nullable Context context, Throwable cause, @Nullable XGoogSpannerRequestId reqId) { + public static SpannerException newSpannerException(@Nullable Context context, Throwable cause) { if (cause instanceof SpannerException) { SpannerException e = (SpannerException) cause; - return newSpannerExceptionPreformatted(e.getErrorCode(), e.getMessage(), e, null, reqId); + return newSpannerExceptionPreformatted(e.getErrorCode(), e.getMessage(), e, null); } else if (cause instanceof CancellationException) { - return newSpannerExceptionForCancellation(context, cause, reqId); + return newSpannerExceptionForCancellation(context, cause); } else if (cause instanceof ApiException) { - return fromApiException((ApiException) cause, reqId); + return fromApiException((ApiException) cause); } // Extract gRPC status. This will produce "UNKNOWN" for non-gRPC exceptions. Status status = Status.fromThrowable(cause); if (status.getCode() == Status.Code.CANCELLED) { - return newSpannerExceptionForCancellation(context, cause, reqId); + return newSpannerExceptionForCancellation(context, cause); } - return newSpannerException(ErrorCode.fromGrpcStatus(status), cause.getMessage(), cause, reqId); + return newSpannerException(ErrorCode.fromGrpcStatus(status), cause.getMessage(), cause); } public static RuntimeException causeAsRunTimeException(ExecutionException executionException) { @@ -256,11 +221,6 @@ static SpannerException newRetryOnDifferentGrpcChannelException( static SpannerException newSpannerExceptionForCancellation( @Nullable Context context, @Nullable Throwable cause) { - return newSpannerExceptionForCancellation(context, cause, null); - } - - static SpannerException newSpannerExceptionForCancellation( - @Nullable Context context, @Nullable Throwable cause, @Nullable XGoogSpannerRequestId reqId) { if (context != null && context.isCancelled()) { Throwable cancellationCause = context.cancellationCause(); Throwable throwable = @@ -269,14 +229,13 @@ static SpannerException newSpannerExceptionForCancellation( : MoreObjects.firstNonNull(cause, cancellationCause); if (cancellationCause instanceof TimeoutException) { return newSpannerException( - ErrorCode.DEADLINE_EXCEEDED, "Current context exceeded deadline", throwable, reqId); + ErrorCode.DEADLINE_EXCEEDED, "Current context exceeded deadline", throwable); } else { - return newSpannerException( - ErrorCode.CANCELLED, "Current context was cancelled", throwable, reqId); + return newSpannerException(ErrorCode.CANCELLED, "Current context was cancelled", throwable); } } return newSpannerException( - ErrorCode.CANCELLED, cause == null ? "Cancelled" : cause.getMessage(), cause, reqId); + ErrorCode.CANCELLED, cause == null ? "Cancelled" : cause.getMessage(), cause); } private static String formatMessage(ErrorCode code, @Nullable String message) { @@ -297,7 +256,10 @@ private static ResourceInfo extractResourceInfo(Throwable cause) { return null; } - private static ErrorInfo extractErrorInfo(Throwable cause) { + private static ErrorInfo extractErrorInfo(Throwable cause, ApiException apiException) { + if (apiException != null && apiException.getErrorDetails() != null) { + return apiException.getErrorDetails().getErrorInfo(); + } if (cause != null) { Metadata trailers = Status.trailersFromThrowable(cause); if (trailers != null) { @@ -307,7 +269,11 @@ private static ErrorInfo extractErrorInfo(Throwable cause) { return null; } - static ErrorDetails extractErrorDetails(Throwable cause) { + static ErrorDetails extractErrorDetails(Throwable cause, ApiException apiException) { + if (apiException != null && apiException.getErrorDetails() != null) { + return apiException.getErrorDetails(); + } + Throwable prevCause = null; while (cause != null && cause != prevCause) { if (cause instanceof ApiException) { @@ -348,23 +314,21 @@ static SpannerException newSpannerExceptionPreformatted( ErrorCode code, @Nullable String message, @Nullable Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId reqId) { + @Nullable ApiException apiException) { // This is the one place in the codebase that is allowed to call constructors directly. DoNotConstructDirectly token = DoNotConstructDirectly.ALLOWED; switch (code) { case ABORTED: - return new AbortedException(token, message, cause, apiException, reqId); + return new AbortedException(token, message, cause, apiException); case RESOURCE_EXHAUSTED: - ErrorInfo info = extractErrorInfo(cause); + ErrorInfo info = extractErrorInfo(cause, apiException); if (info != null && info.getMetadataMap() .containsKey(AdminRequestsPerMinuteExceededException.ADMIN_REQUESTS_LIMIT_KEY) && AdminRequestsPerMinuteExceededException.ADMIN_REQUESTS_LIMIT_VALUE.equals( info.getMetadataMap() .get(AdminRequestsPerMinuteExceededException.ADMIN_REQUESTS_LIMIT_KEY))) { - return new AdminRequestsPerMinuteExceededException( - token, message, cause, apiException, reqId); + return new AdminRequestsPerMinuteExceededException(token, message, cause, apiException); } case NOT_FOUND: ResourceInfo resourceInfo = extractResourceInfo(cause); @@ -372,39 +336,36 @@ static SpannerException newSpannerExceptionPreformatted( switch (resourceInfo.getResourceType()) { case SESSION_RESOURCE_TYPE: return new SessionNotFoundException( - token, message, resourceInfo, cause, apiException, reqId); + token, message, resourceInfo, cause, apiException); case DATABASE_RESOURCE_TYPE: return new DatabaseNotFoundException( - token, message, resourceInfo, cause, apiException, reqId); + token, message, resourceInfo, cause, apiException); case INSTANCE_RESOURCE_TYPE: return new InstanceNotFoundException( - token, message, resourceInfo, cause, apiException, reqId); + token, message, resourceInfo, cause, apiException); } } case INVALID_ARGUMENT: - if (isTransactionMutationLimitException(cause)) { + if (isTransactionMutationLimitException(cause, apiException)) { return new TransactionMutationLimitExceededException( - token, code, message, cause, apiException, reqId); + token, code, message, cause, apiException); } if (isMissingDefaultSequenceKindException(apiException)) { - return new MissingDefaultSequenceKindException( - token, code, message, cause, apiException, reqId); + return new MissingDefaultSequenceKindException(token, code, message, cause, apiException); } // Fall through to the default. default: return new SpannerException( - token, code, isRetryable(code, cause), message, cause, apiException, reqId); + token, code, isRetryable(code, cause), message, cause, apiException); } } static SpannerException newSpannerExceptionPreformatted( ErrorCode code, @Nullable String message, @Nullable Throwable cause) { - return newSpannerExceptionPreformatted( - code, message, cause, null, (XGoogSpannerRequestId) (null)); + return newSpannerExceptionPreformatted(code, message, cause, null); } - private static SpannerException fromApiException( - ApiException exception, @Nullable XGoogSpannerRequestId reqId) { + private static SpannerException fromApiException(ApiException exception) { Status.Code code; if (exception.getStatusCode() instanceof GrpcStatusCode) { code = ((GrpcStatusCode) exception.getStatusCode()).getTransportCode(); @@ -419,8 +380,7 @@ private static SpannerException fromApiException( errorCode, formatMessage(errorCode, exception.getMessage()), exception.getCause(), - exception, - reqId); + exception); } private static boolean isRetryable(ErrorCode code, @Nullable Throwable cause) { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java index 34fad2a69c9..c201924dfbe 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerImpl.java @@ -34,14 +34,11 @@ import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.base.Strings; -import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.spanner.v1.ExecuteSqlRequest.QueryOptions; -import io.opencensus.metrics.LabelValue; import io.opencensus.trace.Tracing; import io.opentelemetry.api.common.Attributes; -import io.opentelemetry.api.common.AttributesBuilder; import java.io.IOException; import java.time.Instant; import java.util.ArrayList; @@ -51,7 +48,6 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Level; import java.util.logging.Logger; @@ -183,7 +179,7 @@ private void logSpannerOptions(SpannerOptions options) { if (options.getSessionPoolOptions() != null) { logger.log( Level.INFO, - "Session pool options: " + "Session pool options (deprecated, no longer used): " + "\nSession pool min sessions: " + options.getSessionPoolOptions().getMinSessions() + "\nSession pool max sessions: " @@ -313,54 +309,13 @@ public DatabaseClient getDatabaseClient(DatabaseId db) { if (clientId == null) { clientId = nextDatabaseClientId(db); } - List labelValues = - ImmutableList.of( - LabelValue.create(clientId), - LabelValue.create(db.getDatabase()), - LabelValue.create(db.getInstanceId().getName()), - LabelValue.create(GaxProperties.getLibraryVersion(getOptions().getClass()))); - - AttributesBuilder attributesBuilder = Attributes.builder(); - attributesBuilder.put("client_id", clientId); - attributesBuilder.put("database", db.getDatabase()); - attributesBuilder.put("instance_id", db.getInstanceId().getName()); - - boolean useMultiplexedSession = - getOptions().getSessionPoolOptions().getUseMultiplexedSession(); - boolean useMultiplexedSessionForRW = - getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW(); - MultiplexedSessionDatabaseClient multiplexedSessionDatabaseClient = - useMultiplexedSession - ? new MultiplexedSessionDatabaseClient(SpannerImpl.this.getSessionClient(db)) - : null; - AtomicLong numMultiplexedSessionsAcquired = - useMultiplexedSession - ? multiplexedSessionDatabaseClient.getNumSessionsAcquired() - : new AtomicLong(); - AtomicLong numMultiplexedSessionsReleased = - useMultiplexedSession - ? multiplexedSessionDatabaseClient.getNumSessionsReleased() - : new AtomicLong(); - SessionPool pool = - SessionPool.createPool( - getOptions(), - SpannerImpl.this.getSessionClient(db), - this.tracer, - labelValues, - attributesBuilder.build(), - numMultiplexedSessionsAcquired, - numMultiplexedSessionsReleased); - pool.maybeWaitOnMinSessions(); + new MultiplexedSessionDatabaseClient(SpannerImpl.this.getSessionClient(db)); DatabaseClientImpl dbClient = createDatabaseClient( clientId, - pool, - getOptions().getSessionPoolOptions().getUseMultiplexedSessionBlindWrite(), multiplexedSessionDatabaseClient, - getOptions().getSessionPoolOptions().getUseMultiplexedSessionPartitionedOps(), - useMultiplexedSessionForRW, - this.tracer.createCommonAttributes(db)); + this.tracer.createDatabaseAttributes(db)); dbClients.put(db, dbClient); return dbClient; } @@ -370,48 +325,24 @@ public DatabaseClient getDatabaseClient(DatabaseId db) { @VisibleForTesting DatabaseClientImpl createDatabaseClient( String clientId, - SessionPool pool, - boolean useMultiplexedSessionBlindWrite, - @Nullable MultiplexedSessionDatabaseClient multiplexedSessionClient, - boolean useMultiplexedSessionPartitionedOps, - boolean useMultiplexedSessionForRW, - Attributes commonAttributes) { - if (multiplexedSessionClient != null) { - // Set the session pool in the multiplexed session client. - // This is required to handle fallback to regular sessions for in-progress transactions that - // use multiplexed sessions but fail with UNIMPLEMENTED errors. - multiplexedSessionClient.setPool(pool); - } - return new DatabaseClientImpl( - clientId, - pool, - useMultiplexedSessionBlindWrite, - multiplexedSessionClient, - useMultiplexedSessionPartitionedOps, - tracer, - useMultiplexedSessionForRW, - commonAttributes); + MultiplexedSessionDatabaseClient multiplexedSessionClient, + Attributes databaseAttributes) { + return new DatabaseClientImpl(clientId, multiplexedSessionClient, tracer, databaseAttributes); } @Override public BatchClient getBatchClient(DatabaseId db) { - if (getOptions().getSessionPoolOptions().getUseMultiplexedSessionPartitionedOps()) { - this.dbBatchClientLock.lock(); - try { - if (this.dbBatchClients.containsKey(db)) { - return this.dbBatchClients.get(db); - } - BatchClientImpl batchClient = - new BatchClientImpl( - getSessionClient(db), /* useMultiplexedSessionPartitionedOps= */ true); - this.dbBatchClients.put(db, batchClient); - return batchClient; - } finally { - this.dbBatchClientLock.unlock(); + this.dbBatchClientLock.lock(); + try { + if (this.dbBatchClients.containsKey(db)) { + return this.dbBatchClients.get(db); } + BatchClientImpl batchClient = new BatchClientImpl(getSessionClient(db)); + this.dbBatchClients.put(db, batchClient); + return batchClient; + } finally { + this.dbBatchClientLock.unlock(); } - return new BatchClientImpl( - getSessionClient(db), /* useMultiplexedSessionPartitionedOps= */ false); } @Override @@ -459,6 +390,14 @@ public boolean isClosed() { } } + void resetRequestIdCounters() { + gapicRpc.getRequestIdCreator().reset(); + } + + long getRequestIdClientId() { + return gapicRpc.getRequestIdCreator().getClientId(); + } + /** Helper class for gRPC calls that can return paginated results. */ abstract static class PageFetcher implements NextPageFetcher { private String nextPageToken; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java index 765114dc68d..2fa6d4fd291 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java @@ -18,6 +18,7 @@ import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration; import static com.google.api.gax.util.TimeConversionUtils.toThreetenDuration; +import static com.google.cloud.spanner.spi.v1.GapicSpannerRpc.EXPERIMENTAL_LOCATION_API_ENV_VAR; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; @@ -43,6 +44,7 @@ import com.google.cloud.ServiceRpc; import com.google.cloud.TransportOptions; import com.google.cloud.grpc.GcpManagedChannelOptions; +import com.google.cloud.grpc.GcpManagedChannelOptions.GcpChannelPoolOptions; import com.google.cloud.grpc.GrpcTransportOptions; import com.google.cloud.spanner.Options.DirectedReadOption; import com.google.cloud.spanner.Options.QueryOption; @@ -52,6 +54,7 @@ import com.google.cloud.spanner.admin.instance.v1.InstanceAdminSettings; import com.google.cloud.spanner.admin.instance.v1.stub.InstanceAdminStubSettings; import com.google.cloud.spanner.spi.SpannerRpcFactory; +import com.google.cloud.spanner.spi.v1.ChannelEndpointCacheFactory; import com.google.cloud.spanner.spi.v1.GapicSpannerRpc; import com.google.cloud.spanner.spi.v1.SpannerRpc; import com.google.cloud.spanner.v1.SpannerSettings; @@ -66,6 +69,7 @@ import com.google.spanner.v1.DirectedReadOptions; import com.google.spanner.v1.ExecuteSqlRequest; import com.google.spanner.v1.ExecuteSqlRequest.QueryOptions; +import com.google.spanner.v1.RequestOptions; import com.google.spanner.v1.SpannerGrpc; import com.google.spanner.v1.TransactionOptions; import com.google.spanner.v1.TransactionOptions.IsolationLevel; @@ -124,7 +128,7 @@ public class SpannerOptions extends ServiceOptions { private static final String GOOGLE_DEFAULT_UNIVERSE = "googleapis.com"; private static final String EXPERIMENTAL_HOST_PROJECT_ID = "default"; - private static final ImmutableSet SCOPES = + static final ImmutableSet SCOPES = ImmutableSet.of( "https://www.googleapis.com/auth/spanner.admin", "https://www.googleapis.com/auth/spanner.data"); @@ -134,7 +138,74 @@ public class SpannerOptions extends ServiceOptions { // is enabled, to make sure there are sufficient channels available to move the sessions to a // different channel if a network connection in a particular channel fails. @VisibleForTesting static final int GRPC_GCP_ENABLED_DEFAULT_CHANNELS = 8; + + // Dynamic Channel Pool (DCP) default values and bounds + /** Default max concurrent RPCs per channel before triggering scale up. */ + public static final int DEFAULT_DYNAMIC_POOL_MAX_RPC = 25; + + /** Default min concurrent RPCs per channel for scale down check. */ + public static final int DEFAULT_DYNAMIC_POOL_MIN_RPC = 15; + + /** Default scale down check interval. */ + public static final Duration DEFAULT_DYNAMIC_POOL_SCALE_DOWN_INTERVAL = Duration.ofMinutes(3); + + /** Default initial number of channels for dynamic pool. */ + public static final int DEFAULT_DYNAMIC_POOL_INITIAL_SIZE = 4; + + /** Default max number of channels for dynamic pool. */ + public static final int DEFAULT_DYNAMIC_POOL_MAX_CHANNELS = 10; + + /** Default min number of channels for dynamic pool. */ + public static final int DEFAULT_DYNAMIC_POOL_MIN_CHANNELS = 2; + + /** + * Default affinity key lifetime for dynamic channel pool. This is how long to keep an affinity + * key after its last use. Zero means keeping keys forever. Default is 10 minutes, which is + * sufficient to ensure that requests within a single transaction use the same channel. + */ + public static final Duration DEFAULT_DYNAMIC_POOL_AFFINITY_KEY_LIFETIME = Duration.ofMinutes(10); + + /** + * Default cleanup interval for dynamic channel pool affinity keys. This is how frequently the + * affinity key cleanup process runs. Default is 1 minute (1/10 of default affinity key lifetime). + */ + public static final Duration DEFAULT_DYNAMIC_POOL_CLEANUP_INTERVAL = Duration.ofMinutes(1); + + /** + * Creates a {@link GcpChannelPoolOptions} instance with Spanner-specific defaults for dynamic + * channel pooling. These defaults are optimized for typical Spanner workloads. + * + *

Default values: + * + *

    + *
  • Max size: {@value #DEFAULT_DYNAMIC_POOL_MAX_CHANNELS} + *
  • Min size: {@value #DEFAULT_DYNAMIC_POOL_MIN_CHANNELS} + *
  • Initial size: {@value #DEFAULT_DYNAMIC_POOL_INITIAL_SIZE} + *
  • Max RPC per channel: {@value #DEFAULT_DYNAMIC_POOL_MAX_RPC} + *
  • Min RPC per channel: {@value #DEFAULT_DYNAMIC_POOL_MIN_RPC} + *
  • Scale down interval: 3 minutes + *
  • Affinity key lifetime: 10 minutes + *
  • Cleanup interval: 1 minute + *
+ * + * @return a new {@link GcpChannelPoolOptions} instance with Spanner defaults + */ + public static GcpChannelPoolOptions createDefaultDynamicChannelPoolOptions() { + return GcpChannelPoolOptions.newBuilder() + .setMaxSize(DEFAULT_DYNAMIC_POOL_MAX_CHANNELS) + .setMinSize(DEFAULT_DYNAMIC_POOL_MIN_CHANNELS) + .setInitSize(DEFAULT_DYNAMIC_POOL_INITIAL_SIZE) + .setDynamicScaling( + DEFAULT_DYNAMIC_POOL_MIN_RPC, + DEFAULT_DYNAMIC_POOL_MAX_RPC, + DEFAULT_DYNAMIC_POOL_SCALE_DOWN_INTERVAL) + .setAffinityKeyLifetime(DEFAULT_DYNAMIC_POOL_AFFINITY_KEY_LIFETIME) + .setCleanupInterval(DEFAULT_DYNAMIC_POOL_CLEANUP_INTERVAL) + .build(); + } + private final TransportChannelProvider channelProvider; + private final ChannelEndpointCacheFactory channelEndpointCacheFactory; @SuppressWarnings("rawtypes") private final ApiFunction channelConfigurator; @@ -153,9 +224,12 @@ public class SpannerOptions extends ServiceOptions { private final Duration partitionedDmlTimeout; private final boolean grpcGcpExtensionEnabled; private final GcpManagedChannelOptions grpcGcpOptions; + private final boolean dynamicChannelPoolEnabled; + private final GcpChannelPoolOptions gcpChannelPoolOptions; private final boolean autoThrottleAdministrativeRequests; private final RetrySettings retryAdministrativeRequestsSettings; private final boolean trackTransactionStarter; + private final boolean enableGrpcGcpOtelMetrics; private final BuiltInMetricsProvider builtInMetricsProvider = BuiltInMetricsProvider.INSTANCE; /** @@ -179,15 +253,18 @@ public class SpannerOptions extends ServiceOptions { private final String compressorName; private final boolean leaderAwareRoutingEnabled; private final boolean enableDirectAccess; + private final boolean enableGcpFallback; private final DirectedReadOptions directedReadOptions; private final boolean useVirtualThreads; private final OpenTelemetry openTelemetry; private final boolean enableApiTracing; private final boolean enableBuiltInMetrics; + private final boolean enableLocationApi; private final boolean enableExtendedTracing; private final boolean enableEndToEndTracing; private final String monitoringHost; private final TransactionOptions defaultTransactionOptions; + private final RequestOptions.ClientContext clientContext; enum TracingFramework { OPEN_CENSUS, @@ -757,6 +834,7 @@ protected SpannerOptions(Builder builder) { transportChannelExecutorThreadNameFormat = builder.transportChannelExecutorThreadNameFormat; channelProvider = builder.channelProvider; + channelEndpointCacheFactory = builder.channelEndpointCacheFactory; if (builder.mTLSContext != null) { channelConfigurator = channelBuilder -> { @@ -800,9 +878,30 @@ protected SpannerOptions(Builder builder) { partitionedDmlTimeout = builder.partitionedDmlTimeout; grpcGcpExtensionEnabled = builder.grpcGcpExtensionEnabled; grpcGcpOptions = builder.grpcGcpOptions; + + // Dynamic channel pooling is disabled by default. + // It is only enabled when: + // 1. enableDynamicChannelPool() was explicitly called, AND + // 2. grpc-gcp extension is enabled, AND + // 3. numChannels was not explicitly set + if (builder.dynamicChannelPoolEnabled != null && builder.dynamicChannelPoolEnabled) { + // DCP was explicitly enabled, but respect numChannels if set + dynamicChannelPoolEnabled = grpcGcpExtensionEnabled && !builder.numChannelsExplicitlySet; + } else { + // DCP is disabled by default, or was explicitly disabled + dynamicChannelPoolEnabled = false; + } + + // Use user-provided GcpChannelPoolOptions or create Spanner-specific defaults + gcpChannelPoolOptions = + builder.gcpChannelPoolOptions != null + ? builder.gcpChannelPoolOptions + : createDefaultDynamicChannelPoolOptions(); + autoThrottleAdministrativeRequests = builder.autoThrottleAdministrativeRequests; retryAdministrativeRequestsSettings = builder.retryAdministrativeRequestsSettings; trackTransactionStarter = builder.trackTransactionStarter; + enableGrpcGcpOtelMetrics = builder.enableGrpcGcpOtelMetrics; defaultQueryOptions = builder.defaultQueryOptions; envQueryOptions = builder.getEnvironmentQueryOptions(); if (envQueryOptions.equals(QueryOptions.getDefaultInstance())) { @@ -820,19 +919,22 @@ protected SpannerOptions(Builder builder) { compressorName = builder.compressorName; leaderAwareRoutingEnabled = builder.leaderAwareRoutingEnabled; enableDirectAccess = builder.enableDirectAccess; + enableGcpFallback = builder.enableGcpFallback; directedReadOptions = builder.directedReadOptions; useVirtualThreads = builder.useVirtualThreads; openTelemetry = builder.openTelemetry; enableApiTracing = builder.enableApiTracing; enableExtendedTracing = builder.enableExtendedTracing; - if (builder.isExperimentalHost) { + if (builder.experimentalHost != null) { enableBuiltInMetrics = false; } else { enableBuiltInMetrics = builder.enableBuiltInMetrics; } + enableLocationApi = builder.enableLocationApi; enableEndToEndTracing = builder.enableEndToEndTracing; monitoringHost = builder.monitoringHost; defaultTransactionOptions = builder.defaultTransactionOptions; + clientContext = builder.clientContext; } private String getResolvedUniverseDomain() { @@ -840,6 +942,11 @@ private String getResolvedUniverseDomain() { return Strings.isNullOrEmpty(universeDomain) ? GOOGLE_DEFAULT_UNIVERSE : universeDomain; } + /** Returns the default {@link RequestOptions.ClientContext} for this {@link SpannerOptions}. */ + public RequestOptions.ClientContext getClientContext() { + return clientContext; + } + /** * The environment to read configuration values from. The default implementation uses environment * variables. @@ -875,6 +982,10 @@ default boolean isEnableDirectAccess() { return false; } + default boolean isEnableGcpFallback() { + return false; + } + default boolean isEnableBuiltInMetrics() { return true; } @@ -883,10 +994,18 @@ default boolean isEnableGRPCBuiltInMetrics() { return false; } + default boolean isEnableGrpcGcpOtelMetrics() { + return true; + } + default boolean isEnableEndToEndTracing() { return false; } + default boolean isEnableLocationApi() { + return false; + } + @Deprecated @ObsoleteApi( "This will be removed in an upcoming version without a major version bump. You should use" @@ -916,11 +1035,15 @@ private static class SpannerEnvironmentImpl implements SpannerEnvironment { private static final String SPANNER_ENABLE_API_TRACING = "SPANNER_ENABLE_API_TRACING"; private static final String GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS = "GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS"; + private static final String GOOGLE_SPANNER_ENABLE_GCP_FALLBACK = + "GOOGLE_SPANNER_ENABLE_GCP_FALLBACK"; private static final String SPANNER_ENABLE_END_TO_END_TRACING = "SPANNER_ENABLE_END_TO_END_TRACING"; private static final String SPANNER_DISABLE_BUILTIN_METRICS = "SPANNER_DISABLE_BUILTIN_METRICS"; private static final String SPANNER_DISABLE_DIRECT_ACCESS_GRPC_BUILTIN_METRICS = "SPANNER_DISABLE_DIRECT_ACCESS_GRPC_BUILTIN_METRICS"; + private static final String SPANNER_DISABLE_GRPC_GCP_OTEL_METRICS = + "SPANNER_DISABLE_GRPC_GCP_OTEL_METRICS"; private static final String SPANNER_MONITORING_HOST = "SPANNER_MONITORING_HOST"; private SpannerEnvironmentImpl() {} @@ -953,6 +1076,11 @@ public boolean isEnableDirectAccess() { return Boolean.parseBoolean(System.getenv(GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS)); } + @Override + public boolean isEnableGcpFallback() { + return Boolean.parseBoolean(System.getenv(GOOGLE_SPANNER_ENABLE_GCP_FALLBACK)); + } + @Override public boolean isEnableBuiltInMetrics() { return !Boolean.parseBoolean(System.getenv(SPANNER_DISABLE_BUILTIN_METRICS)); @@ -966,11 +1094,21 @@ public boolean isEnableGRPCBuiltInMetrics() { System.getenv(SPANNER_DISABLE_DIRECT_ACCESS_GRPC_BUILTIN_METRICS)); } + @Override + public boolean isEnableGrpcGcpOtelMetrics() { + return !Boolean.parseBoolean(System.getenv(SPANNER_DISABLE_GRPC_GCP_OTEL_METRICS)); + } + @Override public boolean isEnableEndToEndTracing() { return Boolean.parseBoolean(System.getenv(SPANNER_ENABLE_END_TO_END_TRACING)); } + @Override + public boolean isEnableLocationApi() { + return Boolean.parseBoolean(System.getenv(EXPERIMENTAL_LOCATION_API_ENV_VAR)); + } + @Override public String getMonitoringHost() { return System.getenv(SPANNER_MONITORING_HOST); @@ -1003,6 +1141,7 @@ public static class Builder createCustomClientLibToken(LIQUIBASE_API_CLIENT_LIB_TOKEN), createCustomClientLibToken(PG_ADAPTER_CLIENT_LIB_TOKEN)); private TransportChannelProvider channelProvider; + private ChannelEndpointCacheFactory channelEndpointCacheFactory; @SuppressWarnings("rawtypes") private ApiFunction channelConfigurator; @@ -1010,6 +1149,7 @@ public static class Builder private GrpcInterceptorProvider interceptorProvider; private Integer numChannels; + private boolean numChannelsExplicitlySet = false; private String transportChannelExecutorThreadNameFormat = "Cloud-Spanner-TransportChannel-%d"; @@ -1025,19 +1165,24 @@ public static class Builder private DatabaseAdminStubSettings.Builder databaseAdminStubSettingsBuilder = DatabaseAdminStubSettings.newBuilder(); private Duration partitionedDmlTimeout = Duration.ofHours(2L); - private boolean grpcGcpExtensionEnabled = false; + private boolean grpcGcpExtensionEnabled = true; private GcpManagedChannelOptions grpcGcpOptions; + private Boolean dynamicChannelPoolEnabled; + private GcpChannelPoolOptions gcpChannelPoolOptions; private RetrySettings retryAdministrativeRequestsSettings = DEFAULT_ADMIN_REQUESTS_LIMIT_EXCEEDED_RETRY_SETTINGS; private boolean autoThrottleAdministrativeRequests = false; private boolean trackTransactionStarter = false; private Map defaultQueryOptions = new HashMap<>(); + private boolean enableGrpcGcpOtelMetrics = + SpannerOptions.environment.isEnableGrpcGcpOtelMetrics(); private CallCredentialsProvider callCredentialsProvider; private CloseableExecutorProvider asyncExecutorProvider; private String compressorName; private String emulatorHost = System.getenv("SPANNER_EMULATOR_HOST"); private boolean leaderAwareRoutingEnabled = true; private boolean enableDirectAccess = SpannerOptions.environment.isEnableDirectAccess(); + private boolean enableGcpFallback = SpannerOptions.environment.isEnableGcpFallback(); private DirectedReadOptions directedReadOptions; private boolean useVirtualThreads = false; private OpenTelemetry openTelemetry; @@ -1045,10 +1190,13 @@ public static class Builder private boolean enableExtendedTracing = SpannerOptions.environment.isEnableExtendedTracing(); private boolean enableEndToEndTracing = SpannerOptions.environment.isEnableEndToEndTracing(); private boolean enableBuiltInMetrics = SpannerOptions.environment.isEnableBuiltInMetrics(); + private boolean enableLocationApi = SpannerOptions.environment.isEnableLocationApi(); private String monitoringHost = SpannerOptions.environment.getMonitoringHost(); private SslContext mTLSContext = null; - private boolean isExperimentalHost = false; + private String experimentalHost = null; + private boolean usePlainText = false; private TransactionOptions defaultTransactionOptions = TransactionOptions.getDefaultInstance(); + private RequestOptions.ClientContext clientContext; private static String createCustomClientLibToken(String token) { return token + " " + ServiceOptions.getGoogApiClientLibName(); @@ -1056,26 +1204,56 @@ private static String createCustomClientLibToken(String token) { protected Builder() { // Manually set retry and polling settings that work. - OperationTimedPollAlgorithm longRunningPollingAlgorithm = + RetrySettings baseRetrySettings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofSeconds(60L)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(600L)) + .setMaxRetryDelayDuration(Duration.ofSeconds(45L)) + .setRetryDelayMultiplier(1.5) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofHours(48L)) + .build(); + + // The polling setting with a short initial delay as we expect + // it to return soon. + OperationTimedPollAlgorithm shortInitialPollingDelayAlgorithm = OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRpcTimeoutDuration(Duration.ofSeconds(60L)) - .setMaxRpcTimeoutDuration(Duration.ofSeconds(600L)) - .setInitialRetryDelayDuration(Duration.ofSeconds(20L)) - .setMaxRetryDelayDuration(Duration.ofSeconds(45L)) - .setRetryDelayMultiplier(1.5) - .setRpcTimeoutMultiplier(1.5) - .setTotalTimeoutDuration(Duration.ofHours(48L)) + baseRetrySettings.toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1L)) .build()); databaseAdminStubSettingsBuilder .createDatabaseOperationSettings() - .setPollingAlgorithm(longRunningPollingAlgorithm); + .setPollingAlgorithm(shortInitialPollingDelayAlgorithm); + + // The polling setting with a long initial delay as we expect + // the operation to take a bit long time to return. + OperationTimedPollAlgorithm longInitialPollingDelayAlgorithm = + OperationTimedPollAlgorithm.create( + baseRetrySettings.toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(20L)) + .build()); databaseAdminStubSettingsBuilder .createBackupOperationSettings() - .setPollingAlgorithm(longRunningPollingAlgorithm); + .setPollingAlgorithm(longInitialPollingDelayAlgorithm); databaseAdminStubSettingsBuilder .restoreDatabaseOperationSettings() - .setPollingAlgorithm(longRunningPollingAlgorithm); + .setPollingAlgorithm(longInitialPollingDelayAlgorithm); + + // updateDatabaseDdl requires a separate setting because + // it has no existing overrides on RPC timeouts for LRO polling. + databaseAdminStubSettingsBuilder + .updateDatabaseDdlOperationSettings() + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofHours(48L)) + .build())); } Builder(SpannerOptions options) { @@ -1099,25 +1277,32 @@ protected Builder() { this.partitionedDmlTimeout = options.partitionedDmlTimeout; this.grpcGcpExtensionEnabled = options.grpcGcpExtensionEnabled; this.grpcGcpOptions = options.grpcGcpOptions; + this.dynamicChannelPoolEnabled = options.dynamicChannelPoolEnabled; + this.gcpChannelPoolOptions = options.gcpChannelPoolOptions; this.autoThrottleAdministrativeRequests = options.autoThrottleAdministrativeRequests; this.retryAdministrativeRequestsSettings = options.retryAdministrativeRequestsSettings; this.trackTransactionStarter = options.trackTransactionStarter; + this.enableGrpcGcpOtelMetrics = options.enableGrpcGcpOtelMetrics; this.defaultQueryOptions = options.defaultQueryOptions; this.callCredentialsProvider = options.callCredentialsProvider; this.asyncExecutorProvider = options.asyncExecutorProvider; this.compressorName = options.compressorName; this.channelProvider = options.channelProvider; + this.channelEndpointCacheFactory = options.channelEndpointCacheFactory; this.channelConfigurator = options.channelConfigurator; this.interceptorProvider = options.interceptorProvider; this.enableDirectAccess = options.enableDirectAccess; + this.enableGcpFallback = options.enableGcpFallback; this.directedReadOptions = options.directedReadOptions; this.useVirtualThreads = options.useVirtualThreads; this.enableApiTracing = options.enableApiTracing; this.enableExtendedTracing = options.enableExtendedTracing; this.enableBuiltInMetrics = options.enableBuiltInMetrics; + this.enableLocationApi = options.enableLocationApi; this.enableEndToEndTracing = options.enableEndToEndTracing; this.monitoringHost = options.monitoringHost; this.defaultTransactionOptions = options.defaultTransactionOptions; + this.clientContext = options.clientContext; } @Override @@ -1163,6 +1348,13 @@ public Builder setChannelProvider(TransportChannelProvider channelProvider) { return this; } + @InternalApi + public Builder setChannelEndpointCacheFactory( + ChannelEndpointCacheFactory channelEndpointCacheFactory) { + this.channelEndpointCacheFactory = channelEndpointCacheFactory; + return this; + } + /** * Sets an {@link ApiFunction} that will be used to configure the transport channel. This will * only be used if no custom {@link TransportChannelProvider} has been set. @@ -1189,6 +1381,7 @@ public Builder setInterceptorProvider(GrpcInterceptorProvider interceptorProvide */ public Builder setNumChannels(int numChannels) { this.numChannels = numChannels; + this.numChannelsExplicitlySet = true; return this; } @@ -1550,27 +1743,30 @@ public Builder setHost(String host) { @ExperimentalApi("https://github.com/googleapis/java-spanner/pull/3676") public Builder setExperimentalHost(String host) { + if (this.usePlainText) { + Preconditions.checkArgument( + !host.startsWith("https:"), + "Please remove the 'https:' protocol prefix from the host string when using plain text" + + " communication"); + if (!host.startsWith("http")) { + host = "http://" + host; + } + } super.setHost(host); super.setProjectId(EXPERIMENTAL_HOST_PROJECT_ID); setSessionPoolOption(SessionPoolOptions.newBuilder().setExperimentalHost().build()); - this.isExperimentalHost = true; + this.experimentalHost = host; return this; } - /** - * Enables gRPC-GCP extension with the default settings. Do not set - * GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS to true in combination with this option, as - * Multiplexed sessions are not supported for gRPC-GCP. - */ + /** Enables gRPC-GCP extension with the default settings. This option is enabled by default. */ public Builder enableGrpcGcpExtension() { return this.enableGrpcGcpExtension(null); } /** * Enables gRPC-GCP extension and uses provided options for configuration. The metric registry - * and default Spanner metric labels will be added automatically. Do not set - * GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS to true in combination with this option, as - * Multiplexed sessions are not supported for gRPC-GCP. + * and default Spanner metric labels will be added automatically. */ public Builder enableGrpcGcpExtension(GcpManagedChannelOptions options) { this.grpcGcpExtensionEnabled = true; @@ -1578,12 +1774,79 @@ public Builder enableGrpcGcpExtension(GcpManagedChannelOptions options) { return this; } - /** Disables gRPC-GCP extension. */ + /** Disables gRPC-GCP extension and uses GAX channel pool instead. */ public Builder disableGrpcGcpExtension() { this.grpcGcpExtensionEnabled = false; return this; } + /** + * Enables dynamic channel pooling. When enabled, the client will automatically scale the number + * of channels based on load. This requires the gRPC-GCP extension to be enabled. + * + *

Dynamic channel pooling is disabled by default. Use this method to explicitly enable it. + * Note that calling {@link #setNumChannels(int)} will disable dynamic channel pooling even if + * this method was called. + */ + public Builder enableDynamicChannelPool() { + this.dynamicChannelPoolEnabled = true; + return this; + } + + /** + * Disables dynamic channel pooling. When disabled, the client will use a static number of + * channels as configured by {@link #setNumChannels(int)}. + * + *

Dynamic channel pooling is disabled by default, so this method is typically not needed + * unless you want to explicitly disable it after enabling it. + */ + public Builder disableDynamicChannelPool() { + this.dynamicChannelPoolEnabled = false; + return this; + } + + /** + * Sets whether to enable or disable grpc-gcp OpenTelemetry metrics injection. When disabled, + * Spanner will not automatically inject an OpenTelemetry {@link + * io.opentelemetry.api.metrics.Meter} into grpc-gcp. If a Meter or MetricRegistry is explicitly + * provided via {@link GcpManagedChannelOptions}, those settings will still be honored. + */ + public Builder setGrpcGcpOtelMetricsEnabled(boolean enableGrpcGcpOtelMetrics) { + this.enableGrpcGcpOtelMetrics = enableGrpcGcpOtelMetrics; + return this; + } + + /** + * Sets the channel pool options for dynamic channel pooling. Use this to configure the dynamic + * channel pool behavior when {@link #enableDynamicChannelPool()} is enabled. + * + *

If not set, Spanner-specific defaults will be used (see {@link + * #createDefaultDynamicChannelPoolOptions()}). + * + *

Example usage: + * + *

{@code
+     * SpannerOptions options = SpannerOptions.newBuilder()
+     *     .setProjectId("my-project")
+     *     .enableDynamicChannelPool()
+     *     .setGcpChannelPoolOptions(
+     *         GcpChannelPoolOptions.newBuilder()
+     *             .setMaxSize(15)
+     *             .setMinSize(3)
+     *             .setInitSize(5)
+     *             .setDynamicScaling(10, 30, Duration.ofMinutes(5))
+     *             .build())
+     *     .build();
+     * }
+ * + * @param gcpChannelPoolOptions the channel pool options to use + * @return this builder for chaining + */ + public Builder setGcpChannelPoolOptions(GcpChannelPoolOptions gcpChannelPoolOptions) { + this.gcpChannelPoolOptions = Preconditions.checkNotNull(gcpChannelPoolOptions); + return this; + } + /** * Sets the host of an emulator to use. By default the value is read from an environment * variable. If the environment variable is not set, this will be null. @@ -1614,6 +1877,23 @@ public Builder useClientCert(String clientCertificate, String clientCertificateK return this; } + /** + * {@code usePlainText} will configure the transport to use plaintext (no TLS) and will set + * credentials to {@link com.google.cloud.NoCredentials} to avoid sending authentication over an + * unsecured channel. + */ + @ExperimentalApi("https://github.com/googleapis/java-spanner/pull/4264") + public Builder usePlainText() { + this.usePlainText = true; + this.setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setCredentials(NoCredentials.getInstance()); + if (this.experimentalHost != null) { + // Re-apply host settings to ensure http:// is prepended. + setExperimentalHost(this.experimentalHost); + } + return this; + } + /** * Sets OpenTelemetry object to be used for Spanner Metrics and Traces. GlobalOpenTelemetry will * be used as fallback if this options is not set. @@ -1775,11 +2055,17 @@ public Builder setDefaultTransactionOptions( return this; } + /** Sets the default {@link RequestOptions.ClientContext} for all requests. */ + public Builder setDefaultClientContext(RequestOptions.ClientContext clientContext) { + this.clientContext = clientContext; + return this; + } + @SuppressWarnings("rawtypes") @Override public SpannerOptions build() { // Set the host of emulator has been set. - if (emulatorHost != null) { + if (emulatorHost != null && experimentalHost == null) { if (!emulatorHost.startsWith("http")) { emulatorHost = "http://" + emulatorHost; } @@ -1789,7 +2075,7 @@ public SpannerOptions build() { this.setChannelConfigurator(ManagedChannelBuilder::usePlaintext); // As we are using plain text, we should never send any credentials. this.setCredentials(NoCredentials.getInstance()); - } else if (isExperimentalHost && credentials == null) { + } else if (experimentalHost != null && credentials == null) { credentials = environment.getDefaultExperimentalHostCredentials(); } if (this.numChannels == null) { @@ -1939,6 +2225,11 @@ public TransportChannelProvider getChannelProvider() { return channelProvider; } + @InternalApi + public ChannelEndpointCacheFactory getChannelEndpointCacheFactory() { + return channelEndpointCacheFactory; + } + @SuppressWarnings("rawtypes") public ApiFunction getChannelConfigurator() { return channelConfigurator; @@ -1992,10 +2283,34 @@ public boolean isGrpcGcpExtensionEnabled() { return grpcGcpExtensionEnabled; } + public boolean isGrpcGcpOtelMetricsEnabled() { + return enableGrpcGcpOtelMetrics; + } + public GcpManagedChannelOptions getGrpcGcpOptions() { return grpcGcpOptions; } + /** + * Returns whether dynamic channel pooling is enabled. Dynamic channel pooling is disabled by + * default. Use {@link Builder#enableDynamicChannelPool()} to explicitly enable it. Note that + * calling {@link Builder#setNumChannels(int)} will disable dynamic channel pooling even if it was + * explicitly enabled. + */ + public boolean isDynamicChannelPoolEnabled() { + return dynamicChannelPoolEnabled; + } + + /** + * Returns the channel pool options for dynamic channel pooling. If no options were explicitly + * set, returns the Spanner-specific defaults. + * + * @see #createDefaultDynamicChannelPoolOptions() + */ + public GcpChannelPoolOptions getGcpChannelPoolOptions() { + return gcpChannelPoolOptions; + } + public boolean isAutoThrottleAdministrativeRequests() { return autoThrottleAdministrativeRequests; } @@ -2038,6 +2353,10 @@ public Boolean isEnableDirectAccess() { return enableDirectAccess; } + public Boolean isEnableGcpFallback() { + return enableGcpFallback; + } + @ObsoleteApi("Use isEnableDirectAccess() instead") @Deprecated public boolean isAttemptDirectPath() { @@ -2061,6 +2380,13 @@ public ApiTracerFactory getApiTracerFactory() { return createApiTracerFactory(false, false); } + /** Returns the internal OpenTelemetry instance used for built-in metrics. */ + @InternalApi + public OpenTelemetry getBuiltInOpenTelemetry() { + return this.builtInMetricsProvider.getOrCreateOpenTelemetry( + this.getProjectId(), getCredentials(), this.monitoringHost, getUniverseDomain()); + } + public void enablegRPCMetrics(InstantiatingGrpcChannelProvider.Builder channelProviderBuilder) { if (SpannerOptions.environment.isEnableGRPCBuiltInMetrics()) { this.builtInMetricsProvider.enableGrpcMetrics( @@ -2148,6 +2474,11 @@ public boolean isEnableBuiltInMetrics() { return enableBuiltInMetrics; } + @InternalApi + public boolean isEnableLocationApi() { + return enableLocationApi; + } + /** Returns the override metrics Host. */ String getMonitoringHost() { return monitoringHost; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerRetryHelper.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerRetryHelper.java index 6ca1a4e02e8..0dabcbd0094 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerRetryHelper.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerRetryHelper.java @@ -116,8 +116,7 @@ public TimedAttemptSettings createNextAttempt( public boolean shouldRetry(Throwable prevThrowable, T prevResponse) throws CancellationException { if (Context.current().isCancelled()) { - throw SpannerExceptionFactory.newSpannerExceptionForCancellation( - Context.current(), null, null); + throw SpannerExceptionFactory.newSpannerExceptionForCancellation(Context.current(), null); } return prevThrowable instanceof AbortedException || prevThrowable instanceof com.google.api.gax.rpc.AbortedException; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TraceWrapper.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TraceWrapper.java index df5874cb3c6..e94c6492699 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TraceWrapper.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TraceWrapper.java @@ -55,11 +55,15 @@ class TraceWrapper { AttributeKey.stringKey("gcp.client.version"); private static final AttributeKey GCP_CLIENT_REPO_KEY = AttributeKey.stringKey("gcp.client.repo"); + private static final AttributeKey GCP_RESOURCE_NAME_KEY = + AttributeKey.stringKey("gcp.resource.name"); + private static final String GCP_RESOURCE_NAME_PREFIX = "//spanner.googleapis.com/"; private static final AttributeKey THREAD_NAME_KEY = AttributeKey.stringKey("thread.name"); private final Tracer openCensusTracer; private final io.opentelemetry.api.trace.Tracer openTelemetryTracer; private final boolean enableExtendedTracing; + private final Attributes commonAttributes; TraceWrapper( Tracer openCensusTracer, @@ -68,20 +72,25 @@ class TraceWrapper { this.openTelemetryTracer = openTelemetryTracer; this.openCensusTracer = openCensusTracer; this.enableExtendedTracing = enableExtendedTracing; + this.commonAttributes = createCommonAttributes(); } ISpan spanBuilder(String spanName) { return spanBuilder(spanName, Attributes.empty()); } - ISpan spanBuilder(String spanName, Attributes commonAttributes, TransactionOption... options) { - return spanBuilder(spanName, createTransactionAttributes(commonAttributes, options)); + ISpan spanBuilder(String spanName, Attributes attributes, TransactionOption... options) { + return spanBuilder(spanName, createTransactionAttributes(attributes, options)); } ISpan spanBuilder(String spanName, Attributes attributes) { if (SpannerOptions.getActiveTracingFramework().equals(TracingFramework.OPEN_TELEMETRY)) { return new OpenTelemetrySpan( - openTelemetryTracer.spanBuilder(spanName).setAllAttributes(attributes).startSpan()); + openTelemetryTracer + .spanBuilder(spanName) + .setAllAttributes(attributes) + .setAllAttributes(commonAttributes) + .startSpan()); } else { return new OpenCensusSpan(openCensusTracer.spanBuilder(spanName).startSpan()); } @@ -209,10 +218,16 @@ Attributes createTableAttributes(String tableName, Options options) { return builder.build(); } - Attributes createCommonAttributes(DatabaseId db) { + Attributes createDatabaseAttributes(DatabaseId db) { AttributesBuilder builder = Attributes.builder(); builder.put(DB_NAME_KEY, db.getDatabase()); builder.put(INSTANCE_NAME_KEY, db.getInstanceId().getInstance()); + builder.put(GCP_RESOURCE_NAME_KEY, GCP_RESOURCE_NAME_PREFIX + db.getName()); + return builder.build(); + } + + private Attributes createCommonAttributes() { + AttributesBuilder builder = Attributes.builder(); builder.put(GCP_CLIENT_SERVICE_KEY, "spanner"); builder.put(GCP_CLIENT_REPO_KEY, "googleapis/java-spanner"); builder.put(GCP_CLIENT_VERSION_KEY, GaxProperties.getLibraryVersion(TraceWrapper.class)); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionMutationLimitExceededException.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionMutationLimitExceededException.java index c51ae96e9f3..de215c5caee 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionMutationLimitExceededException.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionMutationLimitExceededException.java @@ -28,32 +28,38 @@ public class TransactionMutationLimitExceededException extends SpannerException private static final String ERROR_MESSAGE = "The transaction contains too many mutations."; + private static final String TRANSACTION_RESOURCE_LIMIT_EXCEEDED_MESSAGE = + "Transaction resource limits exceeded"; + /** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */ TransactionMutationLimitExceededException( DoNotConstructDirectly token, ErrorCode errorCode, String message, Throwable cause, - @Nullable ApiException apiException, - @Nullable XGoogSpannerRequestId reqId) { - super(token, errorCode, /* retryable= */ false, message, cause, apiException, reqId); + @Nullable ApiException apiException) { + super(token, errorCode, /* retryable= */ false, message, cause, apiException); } static boolean isTransactionMutationLimitException(ErrorCode code, String message) { - return code == ErrorCode.INVALID_ARGUMENT && message != null && message.contains(ERROR_MESSAGE); + return code == ErrorCode.INVALID_ARGUMENT + && message != null + && (message.contains(ERROR_MESSAGE) + || message.contains(TRANSACTION_RESOURCE_LIMIT_EXCEEDED_MESSAGE)); } - static boolean isTransactionMutationLimitException(Throwable cause) { + static boolean isTransactionMutationLimitException(Throwable cause, ApiException apiException) { if (cause == null || cause.getMessage() == null - || !cause.getMessage().contains(ERROR_MESSAGE)) { + || !(cause.getMessage().contains(ERROR_MESSAGE) + || cause.getMessage().contains(TRANSACTION_RESOURCE_LIMIT_EXCEEDED_MESSAGE))) { return false; } // Spanner includes a hint that points to the Spanner limits documentation page when the error // was that the transaction mutation limit was exceeded. We use that here to identify the error, // as there is no other specific metadata in the error that identifies it (other than the error // message). - ErrorDetails errorDetails = extractErrorDetails(cause); + ErrorDetails errorDetails = extractErrorDetails(cause, apiException); if (errorDetails != null && errorDetails.getHelp() != null) { return errorDetails.getHelp().getLinksCount() == 1 && errorDetails @@ -66,6 +72,9 @@ static boolean isTransactionMutationLimitException(Throwable cause) { .getLinks(0) .getUrl() .equals("https://cloud.google.com/spanner/docs/limits"); + } else if (cause.getMessage().contains(TRANSACTION_RESOURCE_LIMIT_EXCEEDED_MESSAGE)) { + // This more generic error does not contain any additional details. + return true; } return false; } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java index 8af9ba65d23..3458b04e7a9 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunnerImpl.java @@ -281,7 +281,7 @@ void ensureTxn() { try { ensureTxnAsync().get(); } catch (ExecutionException e) { - throw SpannerExceptionFactory.newSpannerException(e.getCause() == null ? e : e.getCause()); + throw SpannerExceptionFactory.asSpannerException(e.getCause() == null ? e : e.getCause()); } catch (InterruptedException e) { throw SpannerExceptionFactory.propagateInterrupt(e); } @@ -370,7 +370,7 @@ void commit() { throw SpannerExceptionFactory.propagateTimeout((TimeoutException) e); } } catch (ExecutionException e) { - throw SpannerExceptionFactory.newSpannerException(e.getCause() == null ? e : e.getCause()); + throw SpannerExceptionFactory.asSpannerException(e.getCause() == null ? e : e.getCause()); } } @@ -449,8 +449,6 @@ private final class CommitRunnable implements Runnable { @Override public void run() { - XGoogSpannerRequestId reqId = - session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); try { prev.get(); if (transactionId == null && transactionIdFuture == null) { @@ -466,15 +464,9 @@ public void run() { waitForTransactionTimeoutMillis, TimeUnit.MILLISECONDS) : transactionId); } - if (options.hasPriority() || getTransactionTag() != null) { - RequestOptions.Builder requestOptionsBuilder = RequestOptions.newBuilder(); - if (options.hasPriority()) { - requestOptionsBuilder.setPriority(options.priority()); - } - if (getTransactionTag() != null) { - requestOptionsBuilder.setTransactionTag(getTransactionTag()); - } - requestBuilder.setRequestOptions(requestOptionsBuilder.build()); + RequestOptions requestOptions = options.toRequestOptionsProto(true); + if (!requestOptions.equals(RequestOptions.getDefaultInstance())) { + requestBuilder.setRequestOptions(requestOptions); } if (session.getIsMultiplexed() && getLatestPrecommitToken() != null) { // Set the precommit token in the CommitRequest for multiplexed sessions. @@ -493,8 +485,7 @@ public void run() { final ApiFuture commitFuture; final ISpan opSpan = tracer.spanBuilderWithExplicitParent(SpannerImpl.COMMIT, span); try (IScope ignore = tracer.withSpan(opSpan)) { - commitFuture = - rpc.commitAsync(commitRequest, reqId.withOptions(getTransactionChannelHint())); + commitFuture = rpc.commitAsync(commitRequest, getTransactionChannelHint()); } session.markUsed(clock.instant()); commitFuture.addListener( @@ -505,7 +496,7 @@ public void run() { // future, but we add a result here as well as a safety precaution. res.setException( SpannerExceptionFactory.newSpannerException( - ErrorCode.INTERNAL, "commitFuture is not done", reqId)); + ErrorCode.INTERNAL, "commitFuture is not done")); return; } com.google.spanner.v1.CommitResponse proto = commitFuture.get(); @@ -535,9 +526,7 @@ public void run() { } if (!proto.hasCommitTimestamp()) { throw newSpannerException( - ErrorCode.INTERNAL, - "Missing commitTimestamp:\n" + session.getName(), - reqId); + ErrorCode.INTERNAL, "Missing commitTimestamp:\n" + session.getName()); } span.addAnnotation("Commit Done"); opSpan.end(); @@ -559,7 +548,11 @@ public void run() { span.addAnnotation("Commit Failed", resultException); opSpan.setStatus(resultException); opSpan.end(); - res.setException(onError(resultException, false)); + res.setException( + onError( + resultException, + /* withBeginTransaction= */ false, + /* lastStatement= */ true)); } catch (Throwable unexpectedError) { // This is a safety precaution to make sure that a result is always returned. res.setException(unexpectedError); @@ -573,8 +566,7 @@ public void run() { res.setException(SpannerExceptionFactory.propagateTimeout(e)); } catch (Throwable e) { res.setException( - SpannerExceptionFactory.newSpannerException( - e.getCause() == null ? e : e.getCause(), reqId)); + SpannerExceptionFactory.newSpannerException(e.getCause() == null ? e : e.getCause())); } } } @@ -622,6 +614,25 @@ ApiFuture rollbackAsync() { getTransactionChannelHint()); session.markUsed(clock.instant()); return apiFuture; + } else if (transactionIdFuture != null) { + ApiFuture transactionIdOrEmptyFuture = + ApiFutures.catching( + transactionIdFuture, + Throwable.class, + input -> ByteString.empty(), + MoreExecutors.directExecutor()); + return ApiFutures.transformAsync( + transactionIdOrEmptyFuture, + transactionId -> + transactionId.isEmpty() + ? ApiFutures.immediateFuture(Empty.getDefaultInstance()) + : rpc.rollbackAsync( + RollbackRequest.newBuilder() + .setSession(session.getName()) + .setTransactionId(transactionId) + .build(), + getTransactionChannelHint()), + MoreExecutors.directExecutor()); } else { return ApiFutures.immediateFuture(Empty.getDefaultInstance()); } @@ -675,7 +686,7 @@ options, getPreviousTransactionId()))) aborted = true; } } - throw SpannerExceptionFactory.newSpannerException(e.getCause()); + throw SpannerExceptionFactory.asSpannerException(e.getCause()); } catch (TimeoutException e) { // Throw an ABORTED exception to force a retry of the transaction if no transaction // has been returned by the first statement. @@ -693,8 +704,7 @@ options, getPreviousTransactionId()))) } throw se; } catch (InterruptedException e) { - throw SpannerExceptionFactory.newSpannerExceptionForCancellation( - null, e, null /*TODO: requestId*/); + throw SpannerExceptionFactory.newSpannerExceptionForCancellation(null, e); } } // There is already a transactionId available. Include that id as the transaction to use. @@ -759,8 +769,9 @@ MultiplexedSessionPrecommitToken getLatestPrecommitToken() { } @Override - public SpannerException onError(SpannerException e, boolean withBeginTransaction) { - e = super.onError(e, withBeginTransaction); + public SpannerException onError( + SpannerException e, boolean withBeginTransaction, boolean lastStatement) { + e = super.onError(e, withBeginTransaction, lastStatement); // If the statement that caused an error was the statement that included a BeginTransaction // option, we simulate an aborted transaction to force a retry of the entire transaction. This @@ -770,13 +781,17 @@ public SpannerException onError(SpannerException e, boolean withBeginTransaction // statement are included in the transaction, even if the statement again causes an error // during the retry. if (withBeginTransaction) { - // Simulate an aborted transaction to force a retry with a new transaction. - this.transactionIdFuture.setException( - SpannerExceptionFactory.newSpannerException( - ErrorCode.ABORTED, - "Aborted due to failed initial statement", - SpannerExceptionFactory.createAbortedExceptionWithRetryDelay( - "Aborted due to failed initial statement", e, 0, 1))); + if (lastStatement) { + this.transactionIdFuture.setException(e); + } else { + // Simulate an aborted transaction to force a retry with a new transaction. + this.transactionIdFuture.setException( + SpannerExceptionFactory.newSpannerException( + ErrorCode.ABORTED, + "Aborted due to failed initial statement", + SpannerExceptionFactory.createAbortedExceptionWithRetryDelay( + "Aborted due to failed initial statement", e, 0, 1))); + } } SpannerException exceptionToThrow; if (withBeginTransaction @@ -929,12 +944,9 @@ private ResultSet internalExecuteUpdate( final ExecuteSqlRequest.Builder builder = getExecuteSqlRequestBuilder( statement, queryMode, options, /* withTransactionSelector= */ true); - XGoogSpannerRequestId reqId = - session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); try { com.google.spanner.v1.ResultSet resultSet = - rpc.executeQuery( - builder.build(), reqId.withOptions(getTransactionChannelHint()), isRouteToLeader()); + rpc.executeQuery(builder.build(), getTransactionChannelHint(), isRouteToLeader()); session.markUsed(clock.instant()); if (resultSet.getMetadata().hasTransaction()) { onTransactionMetadata( @@ -950,7 +962,9 @@ private ResultSet internalExecuteUpdate( return resultSet; } catch (Throwable t) { throw onError( - SpannerExceptionFactory.asSpannerException(t), builder.getTransaction().hasBegin()); + SpannerExceptionFactory.asSpannerException(t), + builder.getTransaction().hasBegin(), + builder.getLastStatement()); } } @@ -1008,7 +1022,7 @@ public ApiFuture executeUpdateAsync(Statement statement, UpdateOption... u input -> { SpannerException e = SpannerExceptionFactory.asSpannerException(input); SpannerException exceptionToThrow = - onError(e, builder.getTransaction().hasBegin()); + onError(e, builder.getTransaction().hasBegin(), builder.getLastStatement()); span.setStatus(exceptionToThrow); throw exceptionToThrow; }, @@ -1065,11 +1079,9 @@ public long[] batchUpdate(Iterable statements, UpdateOption... update } final ExecuteBatchDmlRequest.Builder builder = getExecuteBatchDmlRequestBuilder(statements, options); - XGoogSpannerRequestId reqId = - session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); try { com.google.spanner.v1.ExecuteBatchDmlResponse response = - rpc.executeBatchDml(builder.build(), reqId.withOptions(getTransactionChannelHint())); + rpc.executeBatchDml(builder.build(), getTransactionChannelHint()); session.markUsed(clock.instant()); long[] results = new long[response.getResultSetsCount()]; for (int i = 0; i < response.getResultSetsCount(); ++i) { @@ -1093,13 +1105,14 @@ public long[] batchUpdate(Iterable statements, UpdateOption... update throw newSpannerBatchUpdateException( ErrorCode.fromRpcStatus(response.getStatus()), response.getStatus().getMessage(), - results, - reqId); + results); } return results; } catch (Throwable e) { throw onError( - SpannerExceptionFactory.asSpannerException(e), builder.getTransaction().hasBegin()); + SpannerExceptionFactory.asSpannerException(e), + builder.getTransaction().hasBegin(), + builder.getLastStatements()); } } catch (Throwable throwable) { span.setStatus(throwable); @@ -1127,15 +1140,11 @@ public ApiFuture batchUpdateAsync( final ExecuteBatchDmlRequest.Builder builder = getExecuteBatchDmlRequestBuilder(statements, options); ApiFuture response; - XGoogSpannerRequestId reqId = - session.getRequestIdCreator().nextRequestId(session.getChannel(), 1); try { // Register the update as an async operation that must finish before the transaction may // commit. increaseAsyncOperations(); - response = - rpc.executeBatchDmlAsync( - builder.build(), reqId.withOptions(getTransactionChannelHint())); + response = rpc.executeBatchDmlAsync(builder.build(), getTransactionChannelHint()); session.markUsed(clock.instant()); } catch (Throwable t) { decreaseAsyncOperations(); @@ -1165,8 +1174,7 @@ public ApiFuture batchUpdateAsync( throw newSpannerBatchUpdateException( ErrorCode.fromRpcStatus(batchDmlResponse.getStatus()), batchDmlResponse.getStatus().getMessage(), - results, - reqId); + results); } return results; }, @@ -1178,7 +1186,7 @@ public ApiFuture batchUpdateAsync( input -> { SpannerException e = SpannerExceptionFactory.asSpannerException(input); SpannerException exceptionToThrow = - onError(e, builder.getTransaction().hasBegin()); + onError(e, builder.getTransaction().hasBegin(), builder.getLastStatements()); span.setStatus(exceptionToThrow); throw exceptionToThrow; }, @@ -1220,7 +1228,7 @@ public ListenableAsyncResultSet executeQueryAsync( private final SessionImpl session; private final Options options; private ISpan span; - private TraceWrapper tracer; + private final TraceWrapper tracer; private TransactionContextImpl txn; private volatile boolean isValid = true; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/XGoogSpannerRequestId.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/XGoogSpannerRequestId.java index 274592f9b40..d858fdb9273 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/XGoogSpannerRequestId.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/XGoogSpannerRequestId.java @@ -17,13 +17,11 @@ package com.google.cloud.spanner; import com.google.api.core.InternalApi; -import com.google.cloud.spanner.spi.v1.SpannerRpc; import com.google.common.annotations.VisibleForTesting; +import io.grpc.CallOptions; import io.grpc.Metadata; import java.math.BigInteger; import java.security.SecureRandom; -import java.util.HashMap; -import java.util.Map; import java.util.Objects; import java.util.regex.MatchResult; import java.util.regex.Matcher; @@ -31,13 +29,15 @@ @InternalApi public class XGoogSpannerRequestId { - // 1. Generate the random process Id singleton. + // 1. Generate the random process ID singleton. @VisibleForTesting static final String RAND_PROCESS_ID = XGoogSpannerRequestId.generateRandProcessId(); - static String REQUEST_ID = "x-goog-spanner-request-id"; - public static final Metadata.Key REQUEST_HEADER_KEY = - Metadata.Key.of(REQUEST_ID, Metadata.ASCII_STRING_MARSHALLER); + public static String REQUEST_ID_HEADER_NAME = "x-goog-spanner-request-id"; + public static final Metadata.Key REQUEST_ID_HEADER_KEY = + Metadata.Key.of(REQUEST_ID_HEADER_NAME, Metadata.ASCII_STRING_MARSHALLER); + public static final CallOptions.Key REQUEST_ID_CALL_OPTIONS_KEY = + CallOptions.Key.create("XGoogSpannerRequestId"); @VisibleForTesting static final long VERSION = 1; // The version of the specification being implemented. @@ -59,6 +59,20 @@ public static XGoogSpannerRequestId of( return new XGoogSpannerRequestId(nthClientId, nthChannelId, nthRequest, attempt); } + @VisibleForTesting + long getNthClientId() { + return nthClientId; + } + + @VisibleForTesting + long getNthChannelId() { + return nthChannelId; + } + + boolean hasChannelId() { + return nthChannelId > 0; + } + @VisibleForTesting long getAttempt() { return this.attempt; @@ -95,8 +109,8 @@ private static String generateRandProcessId() { return String.format("%016x", bigInt); } - @Override - public String toString() { + /** Returns the string representation of this RequestId as it should be sent to Spanner. */ + public String getHeaderValue() { return String.format( "%d.%s.%d.%d.%d.%d", XGoogSpannerRequestId.VERSION, @@ -107,6 +121,18 @@ public String toString() { this.attempt); } + @Override + public String toString() { + return String.format( + "%d.%s.%d.%s.%d.%d", + XGoogSpannerRequestId.VERSION, + XGoogSpannerRequestId.RAND_PROCESS_ID, + this.nthClientId, + this.nthChannelId < 0 ? "x" : String.valueOf(this.nthChannelId), + this.nthRequest, + this.attempt); + } + public String debugToString() { return String.format( "%d.%s.nth_client=%d.nth_chan=%d.nth_req=%d.attempt=%d", @@ -151,31 +177,38 @@ public void incrementAttempt() { this.attempt++; } - Map withOptions(Map options) { - Map copyOptions = new HashMap<>(); - if (options != null) { - copyOptions.putAll(options); - } - copyOptions.put(SpannerRpc.Option.REQUEST_ID, this); - return copyOptions; - } - @Override public int hashCode() { return Objects.hash(this.nthClientId, this.nthChannelId, this.nthRequest, this.attempt); } - interface RequestIdCreator { - XGoogSpannerRequestId nextRequestId(long channelId, int attempt); + @InternalApi + public interface RequestIdCreator { + long getClientId(); + + XGoogSpannerRequestId nextRequestId(long channelId); + + void reset(); } - static class NoopRequestIdCreator implements RequestIdCreator { - NoopRequestIdCreator() {} + // TODO: Move this class into test code. + static final class NoopRequestIdCreator implements RequestIdCreator { + static final NoopRequestIdCreator INSTANCE = new NoopRequestIdCreator(); + + private NoopRequestIdCreator() {} @Override - public XGoogSpannerRequestId nextRequestId(long channelId, int attempt) { - return XGoogSpannerRequestId.of(1, 1, 1, 0); + public long getClientId() { + return 1L; } + + @Override + public XGoogSpannerRequestId nextRequestId(long channelId) { + return XGoogSpannerRequestId.of(1, channelId, 1, 0); + } + + @Override + public void reset() {} } public void setChannelId(long channelId) { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java index 3d831a07efa..a75e9d546eb 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java index 8d49eec27fa..7457cd253c5 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -136,8 +136,8 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. * *

To configure the RetrySettings of a Long Running Operation method, create an * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/package-info.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/package-info.java index c22e62a32fd..ea0fc2fa430 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/package-info.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java index 274b05f78fe..ffb3b37e8bd 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java index fa7dc6d88b6..a796903c705 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/DatabaseAdminStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,7 @@ import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; @@ -159,8 +160,8 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. * *

To configure the RetrySettings of a Long Running Operation method, create an * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to @@ -189,6 +190,7 @@ * } */ @Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") public class DatabaseAdminStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -943,6 +945,14 @@ protected DatabaseAdminStubSettings(Builder settingsBuilder) throws IOException settingsBuilder.internalUpdateGraphOperationSettings().build(); } + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-spanner") + .setRepository("googleapis/java-spanner") + .build(); + } + /** Builder for DatabaseAdminStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; @@ -1412,7 +1422,7 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelayDuration(Duration.ofMillis(20000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) @@ -1461,7 +1471,7 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelayDuration(Duration.ofMillis(20000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) .setRetryDelayMultiplier(1.5) .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) .setInitialRpcTimeoutDuration(Duration.ZERO) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminCallableFactory.java index 76b7fe09c9f..15fa1361452 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java index 69b3d31e633..d403b6823b7 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/GrpcDatabaseAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminCallableFactory.java index 2ef9cdf2b38..0d93f799046 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java index cfce70b7c8a..57d0623df4a 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/database/v1/stub/HttpJsonDatabaseAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java index fdf5301d7d4..05150d865e7 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java index 73e108c6121..3b4af74269f 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -127,8 +127,8 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. * *

To configure the RetrySettings of a Long Running Operation method, create an * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java index c085e0a6e6c..207d8ecb31a 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminCallableFactory.java index 2864b382a09..983c0fda6e0 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java index 147742b551b..b5c1515a263 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/GrpcInstanceAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminCallableFactory.java index 9b05fc67f74..cad7d83e97e 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java index 5af29072b57..1ccabcd68ae 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java index 980969388ed..2c8e3f1c4d9 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java index 6c61fa97387..d2fed30c092 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/InstanceAdminStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; @@ -149,8 +150,8 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. * *

To configure the RetrySettings of a Long Running Operation method, create an * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to @@ -179,6 +180,7 @@ * } */ @Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") public class InstanceAdminStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -905,6 +907,14 @@ protected InstanceAdminStubSettings(Builder settingsBuilder) throws IOException moveInstanceOperationSettings = settingsBuilder.moveInstanceOperationSettings().build(); } + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-spanner") + .setRepository("googleapis/java-spanner") + .build(); + } + /** Builder for InstanceAdminStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractBaseUnitOfWork.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractBaseUnitOfWork.java index 75a207043c2..1d71e062cbb 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractBaseUnitOfWork.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractBaseUnitOfWork.java @@ -80,6 +80,7 @@ abstract class AbstractBaseUnitOfWork implements UnitOfWork { protected final List transactionRetryListeners; protected final boolean excludeTxnFromChangeStreams; protected final RpcPriority rpcPriority; + protected final com.google.spanner.v1.RequestOptions.ClientContext clientContext; protected final Span span; /** Class for keeping track of the stacktrace of the caller of an async statement. */ @@ -117,6 +118,7 @@ abstract static class Builder, T extends AbstractBaseUni private boolean excludeTxnFromChangeStreams; private RpcPriority rpcPriority; + private com.google.spanner.v1.RequestOptions.ClientContext clientContext; private Span span; Builder() {} @@ -163,6 +165,11 @@ B setRpcPriority(@Nullable RpcPriority rpcPriority) { return self(); } + B setClientContext(@Nullable com.google.spanner.v1.RequestOptions.ClientContext clientContext) { + this.clientContext = clientContext; + return self(); + } + B setSpan(@Nullable Span span) { this.span = span; return self(); @@ -179,6 +186,7 @@ B setSpan(@Nullable Span span) { this.transactionRetryListeners = builder.transactionRetryListeners; this.excludeTxnFromChangeStreams = builder.excludeTxnFromChangeStreams; this.rpcPriority = builder.rpcPriority; + this.clientContext = builder.clientContext; this.span = Preconditions.checkNotNull(builder.span); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java index 698534844ea..fea032e2f52 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java @@ -109,7 +109,7 @@ public static AbstractStatementParser getInstance(Dialect dialect) { static final Set ddlStatements = ImmutableSet.of("CREATE", "DROP", "ALTER", "ANALYZE", "GRANT", "REVOKE", "RENAME"); static final Set selectStatements = - ImmutableSet.of("SELECT", "WITH", "SHOW", "FROM", "GRAPH"); + ImmutableSet.of("SELECT", "WITH", "SHOW", "FROM", "GRAPH", "CALL"); static final Set SELECT_STATEMENTS_ALLOWING_PRECEDING_BRACKETS = ImmutableSet.of("SELECT", "FROM"); static final Set dmlStatements = ImmutableSet.of("INSERT", "UPDATE", "DELETE"); @@ -1033,8 +1033,9 @@ int skipQuoted( } else if (supportsBackslashEscape() && currentChar == BACKSLASH && length > currentIndex + 1 - && sql.charAt(currentIndex + 1) == startQuote) { - // This is an escaped quote (e.g. 'foo\'bar'). + && (sql.charAt(currentIndex + 1) == startQuote + || sql.charAt(currentIndex + 1) == BACKSLASH)) { + // This is an escaped quote (e.g. 'foo\'bar') or an escaped backslash (e.g. 'test\\'). // Note that in raw strings, the \ officially does not start an escape sequence, but the // result is still the same, as in a raw string 'both characters are preserved'. appendIfNotNull(result, currentChar); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/Connection.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/Connection.java index 1d3b6152066..60d739a3c85 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/Connection.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/Connection.java @@ -189,6 +189,10 @@ public interface Connection extends AutoCloseable { */ void reset(); + /** Returns the current value of the given connection property. */ + T getConnectionPropertyValue( + com.google.cloud.spanner.connection.ConnectionProperty property); + /** * Sets autocommit on/off for this {@link Connection}. Connections in autocommit mode will apply * any changes to the database directly without waiting for an explicit commit. DDL- and DML @@ -445,6 +449,25 @@ default String getStatementTag() { throw new UnsupportedOperationException(); } + /** + * Sets the client context to use for the statements that are executed. The client context + * persists until it is changed or cleared. + * + * @param clientContext The client context to use with the statements that will be executed on + * this connection. + */ + default void setClientContext(com.google.spanner.v1.RequestOptions.ClientContext clientContext) { + throw new UnsupportedOperationException(); + } + + /** + * @return The client context that will be used with the statements that are executed on this + * connection. + */ + default com.google.spanner.v1.RequestOptions.ClientContext getClientContext() { + throw new UnsupportedOperationException(); + } + /** * Sets whether the next transaction should be excluded from all change streams with the DDL * option `allow_txn_exclusion=true` diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java index ac3341e8f38..cadd6375739 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java @@ -94,6 +94,7 @@ import com.google.common.util.concurrent.MoreExecutors; import com.google.spanner.v1.DirectedReadOptions; import com.google.spanner.v1.ExecuteSqlRequest.QueryOptions; +import com.google.spanner.v1.RequestOptions; import com.google.spanner.v1.ResultSetStats; import com.google.spanner.v1.TransactionOptions.IsolationLevel; import com.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode; @@ -299,6 +300,7 @@ static UnitOfWorkType of(TransactionMode transactionMode) { private IsolationLevel transactionIsolationLevel; private String transactionTag; private String statementTag; + private RequestOptions.ClientContext clientContext; private boolean excludeTxnFromChangeStreams; private byte[] protoDescriptors; private String protoDescriptorsFilePath; @@ -536,6 +538,7 @@ private void reset(Context context, boolean inTransaction) { this.connectionState.resetValue(SAVEPOINT_SUPPORT, context, inTransaction); this.protoDescriptors = null; this.protoDescriptorsFilePath = null; + this.clientContext = null; if (!isTransactionStarted()) { setDefaultTransactionOptions(getDefaultIsolationLevel()); @@ -574,7 +577,8 @@ public boolean isClosed() { return closed; } - private T getConnectionPropertyValue( + @Override + public T getConnectionPropertyValue( com.google.cloud.spanner.connection.ConnectionProperty property) { return this.connectionState.getValue(property).getValue(); } @@ -954,6 +958,18 @@ public String getTransactionTag() { return transactionTag; } + @Override + public void setClientContext(RequestOptions.ClientContext clientContext) { + ConnectionPreconditions.checkState(!isClosed(), CLOSED_ERROR_MSG); + this.clientContext = clientContext; + } + + @Override + public RequestOptions.ClientContext getClientContext() { + ConnectionPreconditions.checkState(!isClosed(), CLOSED_ERROR_MSG); + return clientContext; + } + @Override public void setTransactionTag(String tag) { ConnectionPreconditions.checkState(!isClosed(), CLOSED_ERROR_MSG); @@ -2025,6 +2041,9 @@ private QueryOption[] mergeQueryRequestOptions( options = appendQueryOption(options, Options.priority(getConnectionPropertyValue(RPC_PRIORITY))); } + if (clientContext != null) { + options = appendQueryOption(options, Options.clientContext(clientContext)); + } if (currentUnitOfWork != null && currentUnitOfWork.supportsDirectedReads(parsedStatement) && getConnectionPropertyValue(DIRECTED_READ) != null) { @@ -2069,6 +2088,14 @@ private UpdateOption[] mergeUpdateRequestOptions(UpdateOption... options) { options[options.length - 1] = Options.priority(getConnectionPropertyValue(RPC_PRIORITY)); } } + if (clientContext != null) { + if (options == null || options.length == 0) { + options = new UpdateOption[] {Options.clientContext(clientContext)}; + } else { + options = Arrays.copyOf(options, options.length + 1); + options[options.length - 1] = Options.clientContext(clientContext); + } + } return options; } @@ -2298,6 +2325,7 @@ UnitOfWork createNewUnitOfWork( createSpanForUnitOfWork( statementType == StatementType.DDL ? DDL_STATEMENT : SINGLE_USE_TRANSACTION)) .setProtoDescriptors(getProtoDescriptors()) + .setClientContext(clientContext) .build(); if (!isInternalMetadataQuery && !forceSingleUse) { // Reset the transaction options after starting a single-use transaction. @@ -2316,6 +2344,7 @@ UnitOfWork createNewUnitOfWork( .setTransactionTag(transactionTag) .setRpcPriority(getConnectionPropertyValue(RPC_PRIORITY)) .setSpan(createSpanForUnitOfWork(READ_ONLY_TRANSACTION)) + .setClientContext(clientContext) .build(); case READ_WRITE_TRANSACTION: return ReadWriteTransaction.newBuilder() @@ -2339,6 +2368,7 @@ UnitOfWork createNewUnitOfWork( .setExcludeTxnFromChangeStreams(excludeTxnFromChangeStreams) .setRpcPriority(getConnectionPropertyValue(RPC_PRIORITY)) .setSpan(createSpanForUnitOfWork(READ_WRITE_TRANSACTION)) + .setClientContext(clientContext) .build(); case DML_BATCH: // A DML batch can run inside the current transaction. It should therefore only @@ -2358,6 +2388,7 @@ UnitOfWork createNewUnitOfWork( .setRpcPriority(getConnectionPropertyValue(RPC_PRIORITY)) // Use the transaction Span for the DML batch. .setSpan(transactionStack.peek().getSpan()) + .setClientContext(clientContext) .build(); case DDL_BATCH: return DdlBatch.newBuilder() @@ -2368,6 +2399,7 @@ UnitOfWork createNewUnitOfWork( .setSpan(createSpanForUnitOfWork(DDL_BATCH)) .setProtoDescriptors(getProtoDescriptors()) .setConnectionState(connectionState) + .setClientContext(clientContext) .build(); default: } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java index 13f316e2cc6..44faecee704 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java @@ -26,9 +26,13 @@ import static com.google.cloud.spanner.connection.ConnectionProperties.CREDENTIALS_URL; import static com.google.cloud.spanner.connection.ConnectionProperties.DATABASE_ROLE; import static com.google.cloud.spanner.connection.ConnectionProperties.DATA_BOOST_ENABLED; +import static com.google.cloud.spanner.connection.ConnectionProperties.DCP_INITIAL_CHANNELS; +import static com.google.cloud.spanner.connection.ConnectionProperties.DCP_MAX_CHANNELS; +import static com.google.cloud.spanner.connection.ConnectionProperties.DCP_MIN_CHANNELS; import static com.google.cloud.spanner.connection.ConnectionProperties.DIALECT; import static com.google.cloud.spanner.connection.ConnectionProperties.ENABLE_API_TRACING; import static com.google.cloud.spanner.connection.ConnectionProperties.ENABLE_DIRECT_ACCESS; +import static com.google.cloud.spanner.connection.ConnectionProperties.ENABLE_DYNAMIC_CHANNEL_POOL; import static com.google.cloud.spanner.connection.ConnectionProperties.ENABLE_END_TO_END_TRACING; import static com.google.cloud.spanner.connection.ConnectionProperties.ENABLE_EXTENDED_TRACING; import static com.google.cloud.spanner.connection.ConnectionProperties.ENCODED_CREDENTIALS; @@ -155,6 +159,10 @@ public class ConnectionOptions { static final Integer DEFAULT_MIN_SESSIONS = null; static final Integer DEFAULT_MAX_SESSIONS = null; static final Integer DEFAULT_NUM_CHANNELS = null; + static final Boolean DEFAULT_ENABLE_DYNAMIC_CHANNEL_POOL = null; + static final Integer DEFAULT_DCP_MIN_CHANNELS = null; + static final Integer DEFAULT_DCP_MAX_CHANNELS = null; + static final Integer DEFAULT_DCP_INITIAL_CHANNELS = null; static final String DEFAULT_ENDPOINT = null; static final String DEFAULT_CHANNEL_PROVIDER = null; static final String DEFAULT_DATABASE_ROLE = null; @@ -252,6 +260,18 @@ public class ConnectionOptions { /** Name of the 'numChannels' connection property. */ public static final String NUM_CHANNELS_PROPERTY_NAME = "numChannels"; + /** Name of the 'enableDynamicChannelPool' connection property. */ + public static final String ENABLE_DYNAMIC_CHANNEL_POOL_PROPERTY_NAME = "enableDynamicChannelPool"; + + /** Name of the 'dcpMinChannels' connection property. */ + public static final String DCP_MIN_CHANNELS_PROPERTY_NAME = "dcpMinChannels"; + + /** Name of the 'dcpMaxChannels' connection property. */ + public static final String DCP_MAX_CHANNELS_PROPERTY_NAME = "dcpMaxChannels"; + + /** Name of the 'dcpInitialChannels' connection property. */ + public static final String DCP_INITIAL_CHANNELS_PROPERTY_NAME = "dcpInitialChannels"; + /** Name of the 'endpoint' connection property. */ public static final String ENDPOINT_PROPERTY_NAME = "endpoint"; @@ -991,6 +1011,26 @@ public Integer getNumChannels() { return getInitialConnectionPropertyValue(NUM_CHANNELS); } + /** Whether dynamic channel pooling is enabled for this connection. */ + public Boolean isEnableDynamicChannelPool() { + return getInitialConnectionPropertyValue(ENABLE_DYNAMIC_CHANNEL_POOL); + } + + /** The minimum number of channels in the dynamic channel pool. */ + public Integer getDcpMinChannels() { + return getInitialConnectionPropertyValue(DCP_MIN_CHANNELS); + } + + /** The maximum number of channels in the dynamic channel pool. */ + public Integer getDcpMaxChannels() { + return getInitialConnectionPropertyValue(DCP_MAX_CHANNELS); + } + + /** The initial number of channels in the dynamic channel pool. */ + public Integer getDcpInitialChannels() { + return getInitialConnectionPropertyValue(DCP_INITIAL_CHANNELS); + } + /** Calls the getChannelProvider() method from the supplied class. */ public TransportChannelProvider getChannelProvider() { String channelProvider = getInitialConnectionPropertyValue(CHANNEL_PROVIDER); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperties.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperties.java index b9f495cc321..5fa678afef5 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperties.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperties.java @@ -29,6 +29,9 @@ import static com.google.cloud.spanner.connection.ConnectionOptions.CREDENTIALS_PROVIDER_PROPERTY_NAME; import static com.google.cloud.spanner.connection.ConnectionOptions.DATABASE_ROLE_PROPERTY_NAME; import static com.google.cloud.spanner.connection.ConnectionOptions.DATA_BOOST_ENABLED_PROPERTY_NAME; +import static com.google.cloud.spanner.connection.ConnectionOptions.DCP_INITIAL_CHANNELS_PROPERTY_NAME; +import static com.google.cloud.spanner.connection.ConnectionOptions.DCP_MAX_CHANNELS_PROPERTY_NAME; +import static com.google.cloud.spanner.connection.ConnectionOptions.DCP_MIN_CHANNELS_PROPERTY_NAME; import static com.google.cloud.spanner.connection.ConnectionOptions.DDL_IN_TRANSACTION_MODE_PROPERTY_NAME; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_AUTOCOMMIT; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_AUTO_BATCH_DML; @@ -42,10 +45,14 @@ import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_CREDENTIALS; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_DATABASE_ROLE; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_DATA_BOOST_ENABLED; +import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_DCP_INITIAL_CHANNELS; +import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_DCP_MAX_CHANNELS; +import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_DCP_MIN_CHANNELS; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_DDL_IN_TRANSACTION_MODE; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_DEFAULT_SEQUENCE_KIND; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_DELAY_TRANSACTION_START_UNTIL_FIRST_WRITE; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_ENABLE_API_TRACING; +import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_ENABLE_DYNAMIC_CHANNEL_POOL; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_ENABLE_END_TO_END_TRACING; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_ENABLE_EXTENDED_TRACING; import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_ENDPOINT; @@ -75,6 +82,7 @@ import static com.google.cloud.spanner.connection.ConnectionOptions.DELAY_TRANSACTION_START_UNTIL_FIRST_WRITE_NAME; import static com.google.cloud.spanner.connection.ConnectionOptions.DIALECT_PROPERTY_NAME; import static com.google.cloud.spanner.connection.ConnectionOptions.ENABLE_API_TRACING_PROPERTY_NAME; +import static com.google.cloud.spanner.connection.ConnectionOptions.ENABLE_DYNAMIC_CHANNEL_POOL_PROPERTY_NAME; import static com.google.cloud.spanner.connection.ConnectionOptions.ENABLE_END_TO_END_TRACING_PROPERTY_NAME; import static com.google.cloud.spanner.connection.ConnectionOptions.ENABLE_EXTENDED_TRACING_PROPERTY_NAME; import static com.google.cloud.spanner.connection.ConnectionOptions.ENABLE_GRPC_INTERCEPTOR_PROVIDER_SYSTEM_PROPERTY; @@ -443,6 +451,45 @@ public class ConnectionProperties { DEFAULT_NUM_CHANNELS, NonNegativeIntegerConverter.INSTANCE, Context.STARTUP); + static final ConnectionProperty ENABLE_DYNAMIC_CHANNEL_POOL = + create( + ENABLE_DYNAMIC_CHANNEL_POOL_PROPERTY_NAME, + "Enable dynamic channel pooling for automatic gRPC channel scaling. When enabled, the " + + "client will automatically scale the number of channels based on load. Setting " + + "numChannels will disable dynamic channel pooling even if this is set to true. " + + "The default is currently false (disabled), but this may change to true in a " + + "future version. Set this property explicitly to ensure consistent behavior.", + DEFAULT_ENABLE_DYNAMIC_CHANNEL_POOL, + BOOLEANS, + BooleanConverter.INSTANCE, + Context.STARTUP); + static final ConnectionProperty DCP_MIN_CHANNELS = + create( + DCP_MIN_CHANNELS_PROPERTY_NAME, + "The minimum number of channels in the dynamic channel pool. Only used when " + + "enableDynamicChannelPool is true. The default is " + + "SpannerOptions.DEFAULT_DYNAMIC_POOL_MIN_CHANNELS (2).", + DEFAULT_DCP_MIN_CHANNELS, + NonNegativeIntegerConverter.INSTANCE, + Context.STARTUP); + static final ConnectionProperty DCP_MAX_CHANNELS = + create( + DCP_MAX_CHANNELS_PROPERTY_NAME, + "The maximum number of channels in the dynamic channel pool. Only used when " + + "enableDynamicChannelPool is true. The default is " + + "SpannerOptions.DEFAULT_DYNAMIC_POOL_MAX_CHANNELS (10).", + DEFAULT_DCP_MAX_CHANNELS, + NonNegativeIntegerConverter.INSTANCE, + Context.STARTUP); + static final ConnectionProperty DCP_INITIAL_CHANNELS = + create( + DCP_INITIAL_CHANNELS_PROPERTY_NAME, + "The initial number of channels in the dynamic channel pool. Only used when " + + "enableDynamicChannelPool is true. The default is " + + "SpannerOptions.DEFAULT_DYNAMIC_POOL_INITIAL_SIZE (4).", + DEFAULT_DCP_INITIAL_CHANNELS, + NonNegativeIntegerConverter.INSTANCE, + Context.STARTUP); static final ConnectionProperty CHANNEL_PROVIDER = create( CHANNEL_PROVIDER_PROPERTY_NAME, @@ -766,6 +813,18 @@ public class ConnectionProperties { DEFAULT_BATCH_DML_UPDATE_COUNT, LongConverter.INSTANCE, Context.USER); + public static final ConnectionProperty UNKNOWN_LENGTH = + create( + "unknownLength", + "Spanner does not return the length of the selected columns in query results. When" + + " returning meta-data about these columns through functions like" + + " ResultSetMetaData.getColumnDisplaySize and ResultSetMetaData.getPrecision, we" + + " must provide a value. Various client tools and applications have different ideas" + + " about what they would like to see. This property specifies the length to return" + + " for types of unknown length.", + /* defaultValue= */ 50, + NonNegativeIntegerConverter.INSTANCE, + Context.USER); static final ImmutableMap> CONNECTION_PROPERTIES = CONNECTION_PROPERTIES_BUILDER.build(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java index 31b9d1b3fa9..6e1852298c0 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java @@ -152,6 +152,8 @@ StatementResult statementSetPgSessionCharacteristicsTransactionMode( StatementResult statementShowTransactionIsolationLevel(); + StatementResult statementShowDefaultTransactionIsolation(); + StatementResult statementSetProtoDescriptors(byte[] protoDescriptors); StatementResult statementSetProtoDescriptorsFilePath(String filePath); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java index 5ccd8bce4f9..2340fc4b1aa 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java @@ -64,6 +64,7 @@ import static com.google.cloud.spanner.connection.StatementResult.ClientSideStatementType.SHOW_COMMIT_RESPONSE; import static com.google.cloud.spanner.connection.StatementResult.ClientSideStatementType.SHOW_COMMIT_TIMESTAMP; import static com.google.cloud.spanner.connection.StatementResult.ClientSideStatementType.SHOW_DATA_BOOST_ENABLED; +import static com.google.cloud.spanner.connection.StatementResult.ClientSideStatementType.SHOW_DEFAULT_TRANSACTION_ISOLATION; import static com.google.cloud.spanner.connection.StatementResult.ClientSideStatementType.SHOW_DELAY_TRANSACTION_START_UNTIL_FIRST_WRITE; import static com.google.cloud.spanner.connection.StatementResult.ClientSideStatementType.SHOW_DIRECTED_READ; import static com.google.cloud.spanner.connection.StatementResult.ClientSideStatementType.SHOW_EXCLUDE_TXN_FROM_CHANGE_STREAMS; @@ -647,7 +648,19 @@ public StatementResult statementShowReadLockMode() { @Override public StatementResult statementShowTransactionIsolationLevel() { - return resultSet("transaction_isolation", "serializable", SHOW_TRANSACTION_ISOLATION_LEVEL); + TransactionOptions.IsolationLevel isolationLevel = + getConnection().isInTransaction() + ? getConnection().getTransactionIsolationLevel() + : getConnection().getDefaultIsolationLevel(); + return resultSet("transaction_isolation", isolationLevel, SHOW_TRANSACTION_ISOLATION_LEVEL); + } + + @Override + public StatementResult statementShowDefaultTransactionIsolation() { + return resultSet( + "default_transaction_isolation", + getConnection().getDefaultIsolationLevel(), + SHOW_DEFAULT_TRANSACTION_ISOLATION); } @Override diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/DdlBatch.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/DdlBatch.java index c448695afd2..4a8d643b79c 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/DdlBatch.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/DdlBatch.java @@ -266,7 +266,7 @@ public ApiFuture runBatchAsync(CallType callType) { } catch (SpannerException e) { long[] updateCounts = extractUpdateCounts(operationReference.get()); throw SpannerExceptionFactory.newSpannerBatchUpdateException( - e.getErrorCode(), e.getMessage(), updateCounts, null /* TODO: requestId */); + e.getErrorCode(), e.getMessage(), updateCounts); } } catch (Throwable t) { span.setStatus(StatusCode.ERROR); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/PartitionId.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/PartitionId.java index 2690278f3ab..2adc264dc6d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/PartitionId.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/PartitionId.java @@ -74,7 +74,7 @@ protected Class resolveClass(ObjectStreamClass desc) throw SpannerExceptionFactory.newSpannerException( ErrorCode.INVALID_ARGUMENT, invalidClassException.getMessage(), invalidClassException); } catch (Exception exception) { - throw SpannerExceptionFactory.newSpannerException(exception); + throw SpannerExceptionFactory.asSpannerException(exception); } } @@ -90,7 +90,7 @@ public static String encodeToString(BatchTransactionId transactionId, Partition new ObjectOutputStream(new GZIPOutputStream(byteArrayOutputStream))) { objectOutputStream.writeObject(id); } catch (Exception exception) { - throw SpannerExceptionFactory.newSpannerException(exception); + throw SpannerExceptionFactory.asSpannerException(exception); } return Base64.getUrlEncoder().encodeToString(byteArrayOutputStream.toByteArray()); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ReadWriteTransaction.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ReadWriteTransaction.java index 5b52214d11e..ccb592e3f84 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ReadWriteTransaction.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ReadWriteTransaction.java @@ -350,6 +350,9 @@ private TransactionOption[] extractOptions(Builder builder) { if (this.readLockMode != ReadLockMode.READ_LOCK_MODE_UNSPECIFIED) { numOptions++; } + if (this.clientContext != null) { + numOptions++; + } TransactionOption[] options = new TransactionOption[numOptions]; int index = 0; if (builder.returnCommitStats) { @@ -373,6 +376,9 @@ private TransactionOption[] extractOptions(Builder builder) { if (this.readLockMode != ReadLockMode.READ_LOCK_MODE_UNSPECIFIED) { options[index++] = Options.readLockMode(this.readLockMode); } + if (this.clientContext != null) { + options[index++] = Options.clientContext(this.clientContext); + } return options; } @@ -689,7 +695,19 @@ public ApiFuture executeQueryAsync( InterceptorsUsage.IGNORE_INTERCEPTORS, ImmutableList.of(SpannerGrpc.getExecuteStreamingSqlMethod())); } else { - res = super.executeQueryAsync(callType, statement, analyzeMode, options); + // Handle both SELECT queries and DML with THEN RETURN without delegating to the base class, + // which rejects non-SELECT statements. + res = + executeStatementAsync( + callType, + statement, + () -> { + checkTimedOut(); + checkAborted(); + return DirectExecuteResultSet.ofResultSet( + internalExecuteQuery(statement, analyzeMode, options)); + }, + SpannerGrpc.getExecuteStreamingSqlMethod()); } ApiFutures.addCallback(res, new StatementResultCallback<>(), MoreExecutors.directExecutor()); return res; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SingleUseTransaction.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SingleUseTransaction.java index 370b579e6e2..cfb13cef966 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SingleUseTransaction.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SingleUseTransaction.java @@ -520,6 +520,9 @@ private TransactionRunner createWriteTransaction() { != ReadLockMode.READ_LOCK_MODE_UNSPECIFIED) { numOptions++; } + if (this.clientContext != null) { + numOptions++; + } if (numOptions == 0) { return dbClient.readWriteTransaction(); } @@ -547,6 +550,9 @@ private TransactionRunner createWriteTransaction() { != ReadLockMode.READ_LOCK_MODE_UNSPECIFIED) { options[index++] = Options.readLockMode(connectionState.getValue(READ_LOCK_MODE).getValue()); } + if (this.clientContext != null) { + options[index++] = Options.clientContext(this.clientContext); + } return dbClient.readWriteTransaction(options); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerPool.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerPool.java index e78a646f070..e4912b8e4f2 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerPool.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerPool.java @@ -17,12 +17,14 @@ package com.google.cloud.spanner.connection; import com.google.cloud.NoCredentials; +import com.google.cloud.grpc.GcpManagedChannelOptions.GcpChannelPoolOptions; import com.google.cloud.spanner.DecodeMode; import com.google.cloud.spanner.ErrorCode; import com.google.cloud.spanner.SessionPoolOptions; import com.google.cloud.spanner.Spanner; import com.google.cloud.spanner.SpannerException; import com.google.cloud.spanner.SpannerExceptionFactory; +import com.google.cloud.spanner.SpannerOptions; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; @@ -152,6 +154,10 @@ static class SpannerPoolKey { private final CredentialsKey credentialsKey; private final SessionPoolOptions sessionPoolOptions; private final Integer numChannels; + private final Boolean enableDynamicChannelPool; + private final Integer dcpMinChannels; + private final Integer dcpMaxChannels; + private final Integer dcpInitialChannels; private final boolean usePlainText; private final String userAgent; private final String databaseRole; @@ -190,6 +196,10 @@ private SpannerPoolKey(ConnectionOptions options) throws IOException { ? SessionPoolOptions.newBuilder().build() : options.getSessionPoolOptions(); this.numChannels = options.getNumChannels(); + this.enableDynamicChannelPool = options.isEnableDynamicChannelPool(); + this.dcpMinChannels = options.getDcpMinChannels(); + this.dcpMaxChannels = options.getDcpMaxChannels(); + this.dcpInitialChannels = options.getDcpInitialChannels(); this.usePlainText = options.isUsePlainText(); this.userAgent = options.getUserAgent(); this.routeToLeader = options.isRouteToLeader(); @@ -217,6 +227,10 @@ public boolean equals(Object o) { && Objects.equals(this.credentialsKey, other.credentialsKey) && Objects.equals(this.sessionPoolOptions, other.sessionPoolOptions) && Objects.equals(this.numChannels, other.numChannels) + && Objects.equals(this.enableDynamicChannelPool, other.enableDynamicChannelPool) + && Objects.equals(this.dcpMinChannels, other.dcpMinChannels) + && Objects.equals(this.dcpMaxChannels, other.dcpMaxChannels) + && Objects.equals(this.dcpInitialChannels, other.dcpInitialChannels) && Objects.equals(this.databaseRole, other.databaseRole) && Objects.equals(this.usePlainText, other.usePlainText) && Objects.equals(this.userAgent, other.userAgent) @@ -243,6 +257,10 @@ public int hashCode() { this.credentialsKey, this.sessionPoolOptions, this.numChannels, + this.enableDynamicChannelPool, + this.dcpMinChannels, + this.dcpMaxChannels, + this.dcpInitialChannels, this.usePlainText, this.databaseRole, this.userAgent, @@ -403,6 +421,50 @@ Spanner createSpanner(SpannerPoolKey key, ConnectionOptions options) { if (key.numChannels != null) { builder.setNumChannels(key.numChannels); } + // Configure Dynamic Channel Pooling (DCP) based on explicit user setting. + // Note: Setting numChannels disables DCP even if enableDynamicChannelPool is true. + if (key.enableDynamicChannelPool != null && key.numChannels == null) { + if (Boolean.TRUE.equals(key.enableDynamicChannelPool)) { + builder.enableDynamicChannelPool(); + // Build custom GcpChannelPoolOptions if any DCP-specific options are set. + if (key.dcpMinChannels != null + || key.dcpMaxChannels != null + || key.dcpInitialChannels != null) { + // Build GcpChannelPoolOptions from scratch with custom values or Spanner defaults. + // Note: GcpChannelPoolOptions does not have a toBuilder() method, so we must + // construct from scratch using SpannerOptions defaults for unspecified values. + int minChannels = + key.dcpMinChannels != null + ? key.dcpMinChannels + : SpannerOptions.DEFAULT_DYNAMIC_POOL_MIN_CHANNELS; + int maxChannels = + key.dcpMaxChannels != null + ? key.dcpMaxChannels + : SpannerOptions.DEFAULT_DYNAMIC_POOL_MAX_CHANNELS; + int initChannels = + key.dcpInitialChannels != null + ? key.dcpInitialChannels + : SpannerOptions.DEFAULT_DYNAMIC_POOL_INITIAL_SIZE; + GcpChannelPoolOptions poolOptions = + GcpChannelPoolOptions.newBuilder() + .setMinSize(minChannels) + .setMaxSize(maxChannels) + .setInitSize(initChannels) + .setDynamicScaling( + SpannerOptions.DEFAULT_DYNAMIC_POOL_MIN_RPC, + SpannerOptions.DEFAULT_DYNAMIC_POOL_MAX_RPC, + SpannerOptions.DEFAULT_DYNAMIC_POOL_SCALE_DOWN_INTERVAL) + .setAffinityKeyLifetime(SpannerOptions.DEFAULT_DYNAMIC_POOL_AFFINITY_KEY_LIFETIME) + .setCleanupInterval(SpannerOptions.DEFAULT_DYNAMIC_POOL_CLEANUP_INTERVAL) + .build(); + builder.setGcpChannelPoolOptions(poolOptions); + } + } else { + // Explicitly disable DCP when enableDynamicChannelPool=false. + // This ensures consistent behavior even if the default changes in the future. + builder.disableDynamicChannelPool(); + } + } if (options.getChannelProvider() != null) { builder.setChannelProvider(options.getChannelProvider()); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerStatementParser.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerStatementParser.java index 2689145b7ac..3e70170389c 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerStatementParser.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SpannerStatementParser.java @@ -145,7 +145,7 @@ String removeCommentsAndTrimInternal(String sql) { startQuote = 0; } } else if (c == '\\') { - lastCharWasEscapeChar = true; + lastCharWasEscapeChar = !lastCharWasEscapeChar; } else { lastCharWasEscapeChar = false; } @@ -294,7 +294,7 @@ protected boolean checkReturningClauseInternal(String rawSql) { startQuote = 0; } } else if (c == '\\') { - lastCharWasEscapeChar = true; + lastCharWasEscapeChar = !lastCharWasEscapeChar; } else { lastCharWasEscapeChar = false; } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementResult.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementResult.java index 240d0264ac6..55f09f46d93 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementResult.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementResult.java @@ -98,6 +98,7 @@ enum ClientSideStatementType { SET_RPC_PRIORITY, SHOW_RPC_PRIORITY, SHOW_TRANSACTION_ISOLATION_LEVEL, + SHOW_DEFAULT_TRANSACTION_ISOLATION, SHOW_SAVEPOINT_SUPPORT, SET_SAVEPOINT_SUPPORT, SHOW_DATA_BOOST_ENABLED, diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelEndpoint.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelEndpoint.java new file mode 100644 index 00000000000..cd6b386dc8a --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelEndpoint.java @@ -0,0 +1,66 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import io.grpc.ManagedChannel; + +/** + * Represents a Spanner server endpoint for location-aware routing. + * + *

Each instance wraps a gRPC {@link ManagedChannel} connected to a specific Spanner server. The + * {@link ChannelEndpointCache} creates and caches these instances. + * + *

Implementations must be thread-safe as instances may be shared across multiple concurrent + * operations. + * + * @see ChannelEndpointCache + */ +@InternalApi +public interface ChannelEndpoint { + + /** + * Returns the network address of this server. + * + * @return the server address in "host:port" format + */ + String getAddress(); + + /** + * Returns whether this server is ready to accept RPCs. + * + *

A server is considered unhealthy if: + * + *

    + *
  • The underlying channel is shutdown or terminated + *
  • The channel is in a transient failure state + *
+ * + * @return true if the server is healthy and ready to accept RPCs + */ + boolean isHealthy(); + + /** + * Returns the gRPC channel for making RPCs to this server. + * + *

The returned channel is managed by the {@link ChannelEndpointCache} and should not be shut + * down directly by callers. + * + * @return the managed channel for this server + */ + ManagedChannel getChannel(); +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelEndpointCache.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelEndpointCache.java new file mode 100644 index 00000000000..879ed546f2c --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelEndpointCache.java @@ -0,0 +1,79 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; + +/** + * Cache for server connections used in location-aware routing. + * + *

Implementations are expected to cache {@link ChannelEndpoint} instances such that repeated + * calls with the same address return the same instance. This allows routing components to + * efficiently manage server references. + * + *

Implementations must be thread-safe. Multiple threads may concurrently call {@link + * #get(String)} with different addresses. + */ +@InternalApi +public interface ChannelEndpointCache { + + /** + * Returns the default channel endpoint. + * + *

The default channel is the original endpoint configured in {@link + * com.google.cloud.spanner.SpannerOptions}. It is used as a fallback when the location cache does + * not have routing information for a request. + * + * @return the default channel, never null + */ + ChannelEndpoint defaultChannel(); + + /** + * Returns a cached channel for the given address, creating it if needed. + * + *

If a channel for this address already exists in the cache, the cached instance is returned. + * Otherwise, a new server connection is created and cached. + * + * @param address the server address in "host:port" format + * @return a channel instance for the address, never null + * @throws com.google.cloud.spanner.SpannerException if the channel cannot be created + */ + ChannelEndpoint get(String address); + + /** + * Evicts a server connection from the cache and gracefully shuts down its channel. + * + *

This method should be called when a server becomes unhealthy or is no longer needed. The + * channel shutdown is graceful: existing RPCs are allowed to complete, but new RPCs will not be + * accepted on this channel. + * + *

If the address is not in the cache, this method does nothing. + * + * @param address the server address to evict + */ + void evict(String address); + + /** + * Shuts down all cached server connections. + * + *

This method should be called when the Spanner client is closed to release all resources. + * Each channel is shut down gracefully, allowing in-flight RPCs to complete. + * + *

After calling this method, the cache should not be used to create new connections. + */ + void shutdown(); +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelEndpointCacheFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelEndpointCacheFactory.java new file mode 100644 index 00000000000..0f122e4b765 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelEndpointCacheFactory.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import java.io.IOException; + +/** Factory for creating {@link ChannelEndpointCache} instances. */ +@InternalApi +public interface ChannelEndpointCacheFactory { + ChannelEndpointCache create(InstantiatingGrpcChannelProvider baseProvider) throws IOException; +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelFinder.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelFinder.java new file mode 100644 index 00000000000..4ced18eb920 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/ChannelFinder.java @@ -0,0 +1,191 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import com.google.spanner.v1.BeginTransactionRequest; +import com.google.spanner.v1.CacheUpdate; +import com.google.spanner.v1.CommitRequest; +import com.google.spanner.v1.DirectedReadOptions; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.Mutation; +import com.google.spanner.v1.ReadRequest; +import com.google.spanner.v1.RoutingHint; +import com.google.spanner.v1.TransactionOptions; +import com.google.spanner.v1.TransactionSelector; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.atomic.AtomicLong; + +/** + * Finds a server for a request using location-aware routing metadata. + * + *

This component is per-database and maintains both recipe and range caches. + */ +@InternalApi +public final class ChannelFinder { + private final Object updateLock = new Object(); + private final AtomicLong databaseId = new AtomicLong(); + private final KeyRecipeCache recipeCache = new KeyRecipeCache(); + private final KeyRangeCache rangeCache; + + public ChannelFinder(ChannelEndpointCache endpointCache) { + this.rangeCache = new KeyRangeCache(Objects.requireNonNull(endpointCache)); + } + + void useDeterministicRandom() { + rangeCache.useDeterministicRandom(); + } + + public void update(CacheUpdate update) { + synchronized (updateLock) { + long currentId = databaseId.get(); + if (currentId != update.getDatabaseId()) { + if (currentId != 0) { + recipeCache.clear(); + rangeCache.clear(); + } + databaseId.set(update.getDatabaseId()); + } + if (update.hasKeyRecipes()) { + recipeCache.addRecipes(update.getKeyRecipes()); + } + rangeCache.addRanges(update); + } + } + + public ChannelEndpoint findServer(ReadRequest.Builder reqBuilder) { + return findServer(reqBuilder, preferLeader(reqBuilder.getTransaction())); + } + + public ChannelEndpoint findServer(ReadRequest.Builder reqBuilder, boolean preferLeader) { + recipeCache.computeKeys(reqBuilder); + return fillRoutingHint( + preferLeader, + KeyRangeCache.RangeMode.COVERING_SPLIT, + reqBuilder.getDirectedReadOptions(), + reqBuilder.getRoutingHintBuilder()); + } + + public ChannelEndpoint findServer(ExecuteSqlRequest.Builder reqBuilder) { + return findServer(reqBuilder, preferLeader(reqBuilder.getTransaction())); + } + + public ChannelEndpoint findServer(ExecuteSqlRequest.Builder reqBuilder, boolean preferLeader) { + recipeCache.computeKeys(reqBuilder); + return fillRoutingHint( + preferLeader, + KeyRangeCache.RangeMode.PICK_RANDOM, + reqBuilder.getDirectedReadOptions(), + reqBuilder.getRoutingHintBuilder()); + } + + public ChannelEndpoint findServer(BeginTransactionRequest.Builder reqBuilder) { + if (!reqBuilder.hasMutationKey()) { + return null; + } + return routeMutation( + reqBuilder.getMutationKey(), + preferLeader(reqBuilder.getOptions()), + reqBuilder.getRoutingHintBuilder()); + } + + public ChannelEndpoint fillRoutingHint(CommitRequest.Builder reqBuilder) { + Mutation mutation = selectMutationForRouting(reqBuilder.getMutationsList()); + if (mutation == null) { + return null; + } + return routeMutation(mutation, /* preferLeader= */ true, reqBuilder.getRoutingHintBuilder()); + } + + private static Mutation selectMutationForRouting(List mutations) { + if (mutations.isEmpty()) { + return null; + } + List mutationsExcludingInsert = new ArrayList<>(); + Mutation largestInsertMutation = null; + for (Mutation mutation : mutations) { + if (!mutation.hasInsert()) { + mutationsExcludingInsert.add(mutation); + continue; + } + if (largestInsertMutation == null + || mutation.getInsert().getValuesCount() + > largestInsertMutation.getInsert().getValuesCount()) { + largestInsertMutation = mutation; + } + } + if (!mutationsExcludingInsert.isEmpty()) { + return mutationsExcludingInsert.get( + ThreadLocalRandom.current().nextInt(mutationsExcludingInsert.size())); + } + return largestInsertMutation; + } + + private ChannelEndpoint routeMutation( + Mutation mutation, boolean preferLeader, RoutingHint.Builder hintBuilder) { + recipeCache.applySchemaGeneration(hintBuilder); + TargetRange target = recipeCache.mutationToTargetRange(mutation); + if (target == null) { + return null; + } + recipeCache.applyTargetRange(hintBuilder, target); + return fillRoutingHint( + preferLeader, + KeyRangeCache.RangeMode.COVERING_SPLIT, + DirectedReadOptions.getDefaultInstance(), + hintBuilder); + } + + private ChannelEndpoint fillRoutingHint( + boolean preferLeader, + KeyRangeCache.RangeMode rangeMode, + DirectedReadOptions directedReadOptions, + RoutingHint.Builder hintBuilder) { + long id = databaseId.get(); + if (id == 0) { + return null; + } + hintBuilder.setDatabaseId(id); + return rangeCache.fillRoutingHint(preferLeader, rangeMode, directedReadOptions, hintBuilder); + } + + private static boolean preferLeader(TransactionSelector selector) { + switch (selector.getSelectorCase()) { + case BEGIN: + return !selector.getBegin().hasReadOnly() || selector.getBegin().getReadOnly().getStrong(); + case SINGLE_USE: + if (!selector.getSingleUse().hasReadOnly()) { + return true; + } + return selector.getSingleUse().getReadOnly().getStrong(); + case ID: + case SELECTOR_NOT_SET: + default: + return true; + } + } + + private static boolean preferLeader(TransactionOptions options) { + if (options == null || !options.hasReadOnly()) { + return true; + } + return options.getReadOnly().getStrong(); + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java index 60a99a8bfa3..2faa3a62fb9 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java @@ -16,8 +16,10 @@ package com.google.cloud.spanner.spi.v1; +import static com.google.cloud.spanner.SpannerExceptionFactory.asSpannerException; import static com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException; import static com.google.cloud.spanner.ThreadFactoryUtil.tryCreateVirtualThreadPerTaskExecutor; +import static com.google.cloud.spanner.XGoogSpannerRequestId.REQUEST_ID_CALL_OPTIONS_KEY; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; @@ -49,12 +51,14 @@ import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StatusCode.Code; import com.google.api.gax.rpc.StreamController; +import com.google.api.gax.rpc.TransportChannel; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; import com.google.api.gax.rpc.UnavailableException; import com.google.api.gax.rpc.WatchdogProvider; import com.google.api.pathtemplate.PathTemplate; +import com.google.auth.Credentials; import com.google.cloud.RetryHelper; import com.google.cloud.RetryHelper.RetryHelperException; import com.google.cloud.grpc.GcpManagedChannel; @@ -62,6 +66,9 @@ import com.google.cloud.grpc.GcpManagedChannelOptions; import com.google.cloud.grpc.GcpManagedChannelOptions.GcpMetricsOptions; import com.google.cloud.grpc.GrpcTransportOptions; +import com.google.cloud.grpc.fallback.GcpFallbackChannel; +import com.google.cloud.grpc.fallback.GcpFallbackChannelOptions; +import com.google.cloud.grpc.fallback.GcpFallbackOpenTelemetry; import com.google.cloud.spanner.AdminRequestsPerMinuteExceededException; import com.google.cloud.spanner.BackupId; import com.google.cloud.spanner.ErrorCode; @@ -72,6 +79,7 @@ import com.google.cloud.spanner.SpannerOptions.CallContextConfigurator; import com.google.cloud.spanner.SpannerOptions.CallCredentialsProvider; import com.google.cloud.spanner.XGoogSpannerRequestId; +import com.google.cloud.spanner.XGoogSpannerRequestId.RequestIdCreator; import com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStub; import com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStubSettings; import com.google.cloud.spanner.admin.database.v1.stub.GrpcDatabaseAdminCallableFactory; @@ -87,7 +95,6 @@ import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.io.Resources; import com.google.common.util.concurrent.RateLimiter; @@ -102,6 +109,7 @@ import com.google.longrunning.GetOperationRequest; import com.google.longrunning.Operation; import com.google.longrunning.OperationsGrpc; +import com.google.protobuf.ByteString; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.InvalidProtocolBufferException; @@ -183,16 +191,24 @@ import com.google.spanner.v1.SpannerGrpc; import com.google.spanner.v1.Transaction; import io.grpc.CallCredentials; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; import io.grpc.Context; +import io.grpc.ForwardingChannelBuilder2; +import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.MethodDescriptor; -import io.opencensus.metrics.Metrics; +import io.grpc.auth.MoreCallCredentials; +import io.opentelemetry.api.OpenTelemetry; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; +import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; @@ -213,6 +229,7 @@ import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.Nullable; @@ -222,6 +239,8 @@ public class GapicSpannerRpc implements SpannerRpc { private static final PathTemplate PROJECT_NAME_TEMPLATE = PathTemplate.create("projects/{project}"); + public static final String EXPERIMENTAL_LOCATION_API_ENV_VAR = + "GOOGLE_SPANNER_EXPERIMENTAL_LOCATION_API"; private static final PathTemplate OPERATION_NAME_TEMPLATE = PathTemplate.create("{database=projects/*/instances/*/databases/*}/operations/{operation}"); private static final int MAX_MESSAGE_SIZE = 256 * 1024 * 1024; @@ -240,6 +259,7 @@ public class GapicSpannerRpc implements SpannerRpc { public static boolean DIRECTPATH_CHANNEL_CREATED = false; private static final String API_FILE = "grpc-gcp-apiconfig.json"; + private final RequestIdCreator requestIdCreator = new RequestIdCreatorImpl(); private boolean rpcIsClosed; private final SpannerStub spannerStub; private final RetrySettings executeQueryRetrySettings; @@ -279,6 +299,8 @@ public class GapicSpannerRpc implements SpannerRpc { private final boolean endToEndTracingEnabled; private final int numChannels; private final boolean isGrpcGcpExtensionEnabled; + private final boolean isDynamicChannelPoolEnabled; + @Nullable private final KeyAwareChannel keyAwareChannel; private final GrpcCallContext baseGrpcCallContext; @@ -335,64 +357,40 @@ public GapicSpannerRpc(final SpannerOptions options) { this.endToEndTracingEnabled = options.isEndToEndTracingEnabled(); this.numChannels = options.getNumChannels(); this.isGrpcGcpExtensionEnabled = options.isGrpcGcpExtensionEnabled(); + this.isDynamicChannelPoolEnabled = options.isDynamicChannelPoolEnabled(); this.baseGrpcCallContext = createBaseCallContext(); + boolean isEnableDirectAccess = options.isEnableDirectAccess(); + if (initializeStubs) { - // First check if SpannerOptions provides a TransportChannelProvider. Create one - // with information gathered from SpannerOptions if none is provided - InstantiatingGrpcChannelProvider.Builder defaultChannelProviderBuilder = - InstantiatingGrpcChannelProvider.newBuilder() - .setChannelConfigurator(options.getChannelConfigurator()) - .setEndpoint(options.getEndpoint()) - .setMaxInboundMessageSize(MAX_MESSAGE_SIZE) - .setMaxInboundMetadataSize(MAX_METADATA_SIZE) - .setPoolSize(options.getNumChannels()) - - // Set a keepalive time of 120 seconds to help long running - // commit GRPC calls succeed - .setKeepAliveTimeDuration(Duration.ofSeconds(GRPC_KEEPALIVE_SECONDS)) - - // Then check if SpannerOptions provides an InterceptorProvider. Create a default - // SpannerInterceptorProvider if none is provided - .setInterceptorProvider( - SpannerInterceptorProvider.create( - MoreObjects.firstNonNull( - options.getInterceptorProvider(), - SpannerInterceptorProvider.createDefault(options.getOpenTelemetry()))) - // This sets the trace context headers. - .withTraceContext(endToEndTracingEnabled, options.getOpenTelemetry()) - // This sets the response compressor (Server -> Client). - .withEncoding(compressorName)) - .setHeaderProvider(headerProviderWithUserAgent) - .setAllowNonDefaultServiceAccount(true); - boolean isEnableDirectAccess = options.isEnableDirectAccess(); - if (isEnableDirectAccess) { - defaultChannelProviderBuilder.setAttemptDirectPath(true); - // This will let the credentials try to fetch a hard-bound access token if the runtime - // environment supports it. - defaultChannelProviderBuilder.setAllowHardBoundTokenTypes( - Collections.singletonList(InstantiatingGrpcChannelProvider.HardBoundTokenTypes.ALTS)); - defaultChannelProviderBuilder.setAttemptDirectPathXds(); - } + CredentialsProvider credentialsProvider = + GrpcTransportOptions.setUpCredentialsProvider(options); - options.enablegRPCMetrics(defaultChannelProviderBuilder); + InstantiatingGrpcChannelProvider.Builder defaultChannelProviderBuilder = + createChannelProviderBuilder(options, headerProviderWithUserAgent, isEnableDirectAccess); - if (options.isUseVirtualThreads()) { - ExecutorService executor = - tryCreateVirtualThreadPerTaskExecutor("spanner-virtual-grpc-executor"); - if (executor != null) { - defaultChannelProviderBuilder.setExecutor(executor); - } + if (options.getChannelProvider() == null + && isEnableDirectAccess + && options.isEnableGcpFallback()) { + setupGcpFallback( + defaultChannelProviderBuilder, + options, + headerProviderWithUserAgent, + credentialsProvider); } - // If it is enabled in options uses the channel pool provided by the gRPC-GCP extension. - maybeEnableGrpcGcpExtension(defaultChannelProviderBuilder, options); - TransportChannelProvider channelProvider = + boolean enableLocationApi = options.isEnableLocationApi(); + // First check if SpannerOptions provides a TransportChannelProvider. Create one + // with information gathered from SpannerOptions if none is provided + TransportChannelProvider baseChannelProvider = MoreObjects.firstNonNull( options.getChannelProvider(), defaultChannelProviderBuilder.build()); - - CredentialsProvider credentialsProvider = - GrpcTransportOptions.setUpCredentialsProvider(options); + TransportChannelProvider channelProvider = + enableLocationApi && baseChannelProvider instanceof InstantiatingGrpcChannelProvider + ? new KeyAwareTransportChannelProvider( + (InstantiatingGrpcChannelProvider) baseChannelProvider, + options.getChannelEndpointCacheFactory()) + : baseChannelProvider; spannerWatchdog = Executors.newSingleThreadScheduledExecutor( @@ -421,6 +419,7 @@ public GapicSpannerRpc(final SpannerOptions options) { /* isAdminClient= */ false, isEmulatorEnabled(options, emulatorHost))) .build(); ClientContext clientContext = ClientContext.create(spannerStubSettings); + this.keyAwareChannel = extractKeyAwareChannel(clientContext.getTransportChannel()); this.spannerStub = GrpcSpannerStubWithStubSettingsAndClientContext.create( spannerStubSettings, clientContext); @@ -471,7 +470,8 @@ public GapicSpannerRpc(final SpannerOptions options) { .withCheckInterval(pdmlSettings.getStreamWatchdogCheckInterval())); } this.partitionedDmlStub = - GrpcSpannerStubWithStubSettingsAndClientContext.create(pdmlSettings.build()); + GrpcSpannerStubWithStubSettingsAndClientContext.create( + pdmlSettings.build(), clientContext); this.instanceAdminStubSettings = options.getInstanceAdminStubSettings().toBuilder() .setTransportChannelProvider(channelProvider) @@ -536,9 +536,10 @@ public UnaryCallable createUnaryCalla // is actually running. checkEmulatorConnection(options, channelProvider, credentialsProvider, emulatorHost); } catch (Exception e) { - throw newSpannerException(e); + throw asSpannerException(e); } } else { + this.keyAwareChannel = null; this.databaseAdminStub = null; this.instanceAdminStub = null; this.spannerStub = null; @@ -556,6 +557,45 @@ public UnaryCallable createUnaryCalla } } + @VisibleForTesting + GcpFallbackChannelOptions createFallbackChannelOptions( + GcpFallbackOpenTelemetry fallbackTelemetry, int minFailedCalls) { + return GcpFallbackChannelOptions.newBuilder() + .setPrimaryChannelName("directpath") + .setFallbackChannelName("cloudpath") + .setMinFailedCalls(minFailedCalls) + .setGcpFallbackOpenTelemetry(fallbackTelemetry) + .build(); + } + + @VisibleForTesting + OpenTelemetry getFallbackOpenTelemetry(SpannerOptions options) { + if (options.isEnableBuiltInMetrics()) { + OpenTelemetry builtInOtel = options.getBuiltInOpenTelemetry(); + if (builtInOtel != null) { + return builtInOtel; + } + } + return OpenTelemetry.noop(); + } + + private static KeyAwareChannel extractKeyAwareChannel(TransportChannel transportChannel) { + if (transportChannel instanceof GrpcTransportChannel) { + Channel channel = ((GrpcTransportChannel) transportChannel).getChannel(); + if (channel instanceof KeyAwareChannel) { + return (KeyAwareChannel) channel; + } + } + return null; + } + + @Override + public void clearTransactionAffinity(ByteString transactionId) { + if (keyAwareChannel != null) { + keyAwareChannel.clearTransactionAffinity(transactionId); + } + } + private static String parseGrpcGcpApiConfig() { try { return Resources.toString( @@ -565,24 +605,181 @@ private static String parseGrpcGcpApiConfig() { } } - // Enhance metric options for gRPC-GCP extension. Adds metric registry if not specified. - private static GcpManagedChannelOptions grpcGcpOptionsWithMetrics(SpannerOptions options) { + private void setupGcpFallback( + InstantiatingGrpcChannelProvider.Builder defaultChannelProviderBuilder, + final SpannerOptions options, + final HeaderProvider headerProviderWithUserAgent, + final CredentialsProvider credentialsProvider) { + InstantiatingGrpcChannelProvider.Builder cloudPathProviderBuilder = + createChannelProviderBuilder( + options, headerProviderWithUserAgent, /* isEnableDirectAccess= */ false); + + final ApiFunction existingCloudPathConfigurator = + cloudPathProviderBuilder.getChannelConfigurator(); + final AtomicReference cloudPathBuilderRef = new AtomicReference<>(); + cloudPathProviderBuilder.setChannelConfigurator( + builder -> { + ManagedChannelBuilder effectiveBuilder = builder; + if (existingCloudPathConfigurator != null) { + effectiveBuilder = existingCloudPathConfigurator.apply(effectiveBuilder); + } + cloudPathBuilderRef.set(effectiveBuilder); + return effectiveBuilder; + }); + + // Build the cloudPathProvider to extract the builder which will be provided to + // FallbackChannelBuilder. + try (TransportChannel ignored = cloudPathProviderBuilder.build().getTransportChannel()) { + } catch (Exception e) { + throw asSpannerException(e); + } + + ManagedChannelBuilder cloudPathBuilder = cloudPathBuilderRef.get(); + if (cloudPathBuilder == null) { + throw new IllegalStateException("CloudPath builder was not captured."); + } + + try { + Credentials credentials = credentialsProvider.getCredentials(); + if (credentials != null) { + cloudPathBuilder.intercept( + new ClientInterceptor() { + @Override + public ClientCall interceptCall( + MethodDescriptor method, CallOptions callOptions, Channel next) { + return next.newCall( + method, callOptions.withCallCredentials(MoreCallCredentials.from(credentials))); + } + }); + } + } catch (Exception e) { + throw asSpannerException(e); + } + + final ApiFunction existingConfigurator = + defaultChannelProviderBuilder.getChannelConfigurator(); + defaultChannelProviderBuilder.setChannelConfigurator( + directPathBuilder -> { + ManagedChannelBuilder builder = directPathBuilder; + if (existingConfigurator != null) { + builder = existingConfigurator.apply(builder); + } + + String jsonApiConfig = parseGrpcGcpApiConfig(); + GcpManagedChannelOptions gcpOptions = grpcGcpOptionsWithMetricsAndDcp(options); + if (gcpOptions == null) { + gcpOptions = GcpManagedChannelOptions.newBuilder().build(); + } + + GcpManagedChannelBuilder primaryGcpBuilder = + GcpManagedChannelBuilder.forDelegateBuilder(builder) + .withApiConfigJsonString(jsonApiConfig) + .withOptions(gcpOptions); + + GcpManagedChannelBuilder fallbackGcpBuilder = + GcpManagedChannelBuilder.forDelegateBuilder(cloudPathBuilder) + .withApiConfigJsonString(jsonApiConfig) + .withOptions(gcpOptions); + + GcpFallbackOpenTelemetry fallbackTelemetry = + GcpFallbackOpenTelemetry.newBuilder() + .withSdk(getFallbackOpenTelemetry(options)) + .disableAllMetrics() + .enableMetrics(Arrays.asList("fallback_count", "call_status")) + .build(); + + return new FallbackChannelBuilder( + primaryGcpBuilder, + fallbackGcpBuilder, + createFallbackChannelOptions(fallbackTelemetry, 1)); + }); + } + + private InstantiatingGrpcChannelProvider.Builder createChannelProviderBuilder( + final SpannerOptions options, + final HeaderProvider headerProviderWithUserAgent, + boolean isEnableDirectAccess) { + InstantiatingGrpcChannelProvider.Builder defaultChannelProviderBuilder = + InstantiatingGrpcChannelProvider.newBuilder() + .setChannelConfigurator(options.getChannelConfigurator()) + .setEndpoint(options.getEndpoint()) + .setMaxInboundMessageSize(MAX_MESSAGE_SIZE) + .setMaxInboundMetadataSize(MAX_METADATA_SIZE) + .setPoolSize(options.getNumChannels()) + + // Set a keepalive time of 120 seconds to help long running + // commit GRPC calls succeed + .setKeepAliveTimeDuration(Duration.ofSeconds(GRPC_KEEPALIVE_SECONDS)) + + // Then check if SpannerOptions provides an InterceptorProvider. Create a default + // SpannerInterceptorProvider if none is provided + .setInterceptorProvider( + SpannerInterceptorProvider.create( + MoreObjects.firstNonNull( + options.getInterceptorProvider(), + SpannerInterceptorProvider.createDefault(options.getOpenTelemetry()))) + // This sets the trace context headers. + .withTraceContext(endToEndTracingEnabled, options.getOpenTelemetry()) + // This sets the response compressor (Server -> Client). + .withEncoding(compressorName)) + .setHeaderProvider(headerProviderWithUserAgent) + .setAllowNonDefaultServiceAccount(true); + if (isEnableDirectAccess) { + defaultChannelProviderBuilder.setAttemptDirectPath(true); + if (isEnableDirectPathBoundToken()) { + // This will let the credentials try to fetch a hard-bound access token if the runtime + // environment supports it. + defaultChannelProviderBuilder.setAllowHardBoundTokenTypes( + Collections.singletonList(InstantiatingGrpcChannelProvider.HardBoundTokenTypes.ALTS)); + } + defaultChannelProviderBuilder.setAttemptDirectPathXds(); + } + + options.enablegRPCMetrics(defaultChannelProviderBuilder); + + if (options.isUseVirtualThreads()) { + ExecutorService executor = + tryCreateVirtualThreadPerTaskExecutor("spanner-virtual-grpc-executor"); + if (executor != null) { + defaultChannelProviderBuilder.setExecutor(executor); + } + } + // If it is enabled in options uses the channel pool provided by the gRPC-GCP extension. + maybeEnableGrpcGcpExtension(defaultChannelProviderBuilder, options); + return defaultChannelProviderBuilder; + } + + // Enhance gRPC-GCP options with metrics and dynamic channel pool configuration. + private static GcpManagedChannelOptions grpcGcpOptionsWithMetricsAndDcp(SpannerOptions options) { GcpManagedChannelOptions grpcGcpOptions = MoreObjects.firstNonNull(options.getGrpcGcpOptions(), new GcpManagedChannelOptions()); + GcpManagedChannelOptions.Builder optionsBuilder = + GcpManagedChannelOptions.newBuilder(grpcGcpOptions); + + // Configure metrics options with OpenTelemetry meter GcpMetricsOptions metricsOptions = MoreObjects.firstNonNull( grpcGcpOptions.getMetricsOptions(), GcpMetricsOptions.newBuilder().build()); GcpMetricsOptions.Builder metricsOptionsBuilder = GcpMetricsOptions.newBuilder(metricsOptions); - if (metricsOptions.getMetricRegistry() == null) { - metricsOptionsBuilder.withMetricRegistry(Metrics.getMetricRegistry()); - } // TODO: Add default labels with values: client_id, database, instance_id. if (metricsOptions.getNamePrefix().equals("")) { metricsOptionsBuilder.withNamePrefix("cloud.google.com/java/spanner/gcp-channel-pool/"); } - return GcpManagedChannelOptions.newBuilder(grpcGcpOptions) - .withMetricsOptions(metricsOptionsBuilder.build()) - .build(); + // Pass OpenTelemetry meter to grpc-gcp for channel pool metrics + if (metricsOptions.getOpenTelemetryMeter() == null && options.isGrpcGcpOtelMetricsEnabled()) { + metricsOptionsBuilder.withOpenTelemetryMeter( + options.getOpenTelemetry().getMeter("com.google.cloud.spanner")); + } + optionsBuilder.withMetricsOptions(metricsOptionsBuilder.build()); + + // Configure dynamic channel pool options if enabled. + // Uses the GcpChannelPoolOptions from SpannerOptions, which contains Spanner-specific defaults + // or user-provided configuration. + if (options.isDynamicChannelPoolEnabled()) { + optionsBuilder.withChannelPoolOptions(options.getGcpChannelPoolOptions()); + } + + return optionsBuilder.build(); } @SuppressWarnings("rawtypes") @@ -594,17 +791,23 @@ private static void maybeEnableGrpcGcpExtension( } final String jsonApiConfig = parseGrpcGcpApiConfig(); - final GcpManagedChannelOptions grpcGcpOptions = grpcGcpOptionsWithMetrics(options); + final GcpManagedChannelOptions grpcGcpOptions = grpcGcpOptionsWithMetricsAndDcp(options); + // When dynamic channel pool is enabled, use the DCP initial size as the pool size. + // When disabled, use the explicitly configured numChannels. + final int poolSize = options.isDynamicChannelPoolEnabled() ? 0 : options.getNumChannels(); + + ApiFunction baseConfigurator = + defaultChannelProviderBuilder.getChannelConfigurator(); ApiFunction apiFunction = channelBuilder -> { - if (options.getChannelConfigurator() != null) { - channelBuilder = options.getChannelConfigurator().apply(channelBuilder); + if (baseConfigurator != null) { + channelBuilder = baseConfigurator.apply(channelBuilder); } return GcpManagedChannelBuilder.forDelegateBuilder(channelBuilder) .withApiConfigJsonString(jsonApiConfig) .withOptions(grpcGcpOptions) - .setPoolSize(options.getNumChannels()); + .setPoolSize(poolSize); }; // Disable the GAX channel pooling functionality by setting the GAX channel pool size to 1. @@ -687,6 +890,10 @@ public static boolean isEnableDirectPathXdsEnv() { return Boolean.parseBoolean(System.getenv("GOOGLE_SPANNER_ENABLE_DIRECT_ACCESS")); } + public static boolean isEnableDirectPathBoundToken() { + return !Boolean.parseBoolean(System.getenv("GOOGLE_SPANNER_DISABLE_DIRECT_ACCESS_BOUND_TOKEN")); + } + private static final RetrySettings ADMIN_REQUESTS_LIMIT_EXCEEDED_RETRY_SETTINGS = RetrySettings.newBuilder() .setInitialRetryDelayDuration(Duration.ofSeconds(5L)) @@ -720,7 +927,7 @@ private T runWithRetryOnAdministrativeRequestsExceeded(Callable callable) new AdminRequestsLimitExceededRetryAlgorithm<>(), NanoClock.getDefaultClock()); } catch (RetryHelperException e) { - throw SpannerExceptionFactory.asSpannerException(e.getCause()); + throw asSpannerException(e.getCause()); } } @@ -818,7 +1025,7 @@ public OperationFuture call() { isRetry = true; if (operationName == null) { - GrpcCallContext context = newCallContext(null, instanceName, initialRequest, method); + GrpcCallContext context = newAdminCallContext(instanceName, initialRequest, method); return operationCallable.futureCall(initialRequest, context); } else { return operationCallable.resumeFutureCall(operationName); @@ -909,8 +1116,7 @@ public Paginated listInstanceConfigs(int pageSize, @Nullable Str ListInstanceConfigsRequest request = requestBuilder.build(); GrpcCallContext context = - newCallContext( - null, projectName, request, InstanceAdminGrpc.getListInstanceConfigsMethod()); + newAdminCallContext(projectName, request, InstanceAdminGrpc.getListInstanceConfigsMethod()); ListInstanceConfigsResponse response = get(instanceAdminStub.listInstanceConfigsCallable().futureCall(request, context)); return new Paginated<>(response.getInstanceConfigsList(), response.getNextPageToken()); @@ -933,7 +1139,7 @@ public OperationFuture createInsta } CreateInstanceConfigRequest request = builder.build(); GrpcCallContext context = - newCallContext(null, parent, request, InstanceAdminGrpc.getCreateInstanceConfigMethod()); + newAdminCallContext(parent, request, InstanceAdminGrpc.getCreateInstanceConfigMethod()); return instanceAdminStub.createInstanceConfigOperationCallable().futureCall(request, context); } @@ -950,11 +1156,8 @@ public OperationFuture updateInsta } UpdateInstanceConfigRequest request = builder.build(); GrpcCallContext context = - newCallContext( - null, - instanceConfig.getName(), - request, - InstanceAdminGrpc.getUpdateInstanceConfigMethod()); + newAdminCallContext( + instanceConfig.getName(), request, InstanceAdminGrpc.getUpdateInstanceConfigMethod()); return instanceAdminStub.updateInstanceConfigOperationCallable().futureCall(request, context); } @@ -964,7 +1167,7 @@ public InstanceConfig getInstanceConfig(String instanceConfigName) throws Spanne GetInstanceConfigRequest.newBuilder().setName(instanceConfigName).build(); GrpcCallContext context = - newCallContext(null, projectName, request, InstanceAdminGrpc.getGetInstanceConfigMethod()); + newAdminCallContext(projectName, request, InstanceAdminGrpc.getGetInstanceConfigMethod()); return get(instanceAdminStub.getInstanceConfigCallable().futureCall(request, context)); } @@ -983,8 +1186,8 @@ public void deleteInstanceConfig( } DeleteInstanceConfigRequest request = requestBuilder.build(); GrpcCallContext context = - newCallContext( - null, instanceConfigName, request, InstanceAdminGrpc.getDeleteInstanceConfigMethod()); + newAdminCallContext( + instanceConfigName, request, InstanceAdminGrpc.getDeleteInstanceConfigMethod()); get(instanceAdminStub.deleteInstanceConfigCallable().futureCall(request, context)); } @@ -1005,8 +1208,8 @@ public Paginated listInstanceConfigOperations( final ListInstanceConfigOperationsRequest request = requestBuilder.build(); final GrpcCallContext context = - newCallContext( - null, projectName, request, InstanceAdminGrpc.getListInstanceConfigOperationsMethod()); + newAdminCallContext( + projectName, request, InstanceAdminGrpc.getListInstanceConfigOperationsMethod()); ListInstanceConfigOperationsResponse response = runWithRetryOnAdministrativeRequestsExceeded( () -> @@ -1031,7 +1234,7 @@ public Paginated listInstances( ListInstancesRequest request = requestBuilder.build(); GrpcCallContext context = - newCallContext(null, projectName, request, InstanceAdminGrpc.getListInstancesMethod()); + newAdminCallContext(projectName, request, InstanceAdminGrpc.getListInstancesMethod()); ListInstancesResponse response = get(instanceAdminStub.listInstancesCallable().futureCall(request, context)); return new Paginated<>(response.getInstancesList(), response.getNextPageToken()); @@ -1047,7 +1250,7 @@ public OperationFuture createInstance( .setInstance(instance) .build(); GrpcCallContext context = - newCallContext(null, parent, request, InstanceAdminGrpc.getCreateInstanceMethod()); + newAdminCallContext(parent, request, InstanceAdminGrpc.getCreateInstanceMethod()); return instanceAdminStub.createInstanceOperationCallable().futureCall(request, context); } @@ -1057,8 +1260,8 @@ public OperationFuture updateInstance( UpdateInstanceRequest request = UpdateInstanceRequest.newBuilder().setInstance(instance).setFieldMask(fieldMask).build(); GrpcCallContext context = - newCallContext( - null, instance.getName(), request, InstanceAdminGrpc.getUpdateInstanceMethod()); + newAdminCallContext( + instance.getName(), request, InstanceAdminGrpc.getUpdateInstanceMethod()); return instanceAdminStub.updateInstanceOperationCallable().futureCall(request, context); } @@ -1067,7 +1270,7 @@ public Instance getInstance(String instanceName) throws SpannerException { GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(instanceName).build(); GrpcCallContext context = - newCallContext(null, instanceName, request, InstanceAdminGrpc.getGetInstanceMethod()); + newAdminCallContext(instanceName, request, InstanceAdminGrpc.getGetInstanceMethod()); return get(instanceAdminStub.getInstanceCallable().futureCall(request, context)); } @@ -1077,7 +1280,7 @@ public void deleteInstance(String instanceName) throws SpannerException { DeleteInstanceRequest.newBuilder().setName(instanceName).build(); GrpcCallContext context = - newCallContext(null, instanceName, request, InstanceAdminGrpc.getDeleteInstanceMethod()); + newAdminCallContext(instanceName, request, InstanceAdminGrpc.getDeleteInstanceMethod()); get(instanceAdminStub.deleteInstanceCallable().futureCall(request, context)); } @@ -1096,8 +1299,8 @@ public Paginated listBackupOperations( final ListBackupOperationsRequest request = requestBuilder.build(); final GrpcCallContext context = - newCallContext( - null, instanceName, request, DatabaseAdminGrpc.getListBackupOperationsMethod()); + newAdminCallContext( + instanceName, request, DatabaseAdminGrpc.getListBackupOperationsMethod()); ListBackupOperationsResponse response = runWithRetryOnAdministrativeRequestsExceeded( () -> @@ -1121,8 +1324,8 @@ public Paginated listDatabaseOperations( final ListDatabaseOperationsRequest request = requestBuilder.build(); final GrpcCallContext context = - newCallContext( - null, instanceName, request, DatabaseAdminGrpc.getListDatabaseOperationsMethod()); + newAdminCallContext( + instanceName, request, DatabaseAdminGrpc.getListDatabaseOperationsMethod()); ListDatabaseOperationsResponse response = runWithRetryOnAdministrativeRequestsExceeded( () -> @@ -1147,7 +1350,7 @@ public Paginated listDatabaseRoles( final ListDatabaseRolesRequest request = requestBuilder.build(); final GrpcCallContext context = - newCallContext(null, databaseName, request, DatabaseAdminGrpc.getListDatabaseRolesMethod()); + newAdminCallContext(databaseName, request, DatabaseAdminGrpc.getListDatabaseRolesMethod()); ListDatabaseRolesResponse response = runWithRetryOnAdministrativeRequestsExceeded( () -> get(databaseAdminStub.listDatabaseRolesCallable().futureCall(request, context))); @@ -1171,7 +1374,7 @@ public Paginated listBackups( final ListBackupsRequest request = requestBuilder.build(); final GrpcCallContext context = - newCallContext(null, instanceName, request, DatabaseAdminGrpc.getListBackupsMethod()); + newAdminCallContext(instanceName, request, DatabaseAdminGrpc.getListBackupsMethod()); ListBackupsResponse response = runWithRetryOnAdministrativeRequestsExceeded( () -> get(databaseAdminStub.listBackupsCallable().futureCall(request, context))); @@ -1191,7 +1394,7 @@ public Paginated listDatabases( final ListDatabasesRequest request = requestBuilder.build(); final GrpcCallContext context = - newCallContext(null, instanceName, request, DatabaseAdminGrpc.getListDatabasesMethod()); + newAdminCallContext(instanceName, request, DatabaseAdminGrpc.getListDatabasesMethod()); ListDatabasesResponse response = runWithRetryOnAdministrativeRequestsExceeded( () -> get(databaseAdminStub.listDatabasesCallable().futureCall(request, context))); @@ -1293,8 +1496,7 @@ public OperationFuture updateDatabaseDdl( } final UpdateDatabaseDdlRequest request = requestBuilder.build(); final GrpcCallContext context = - newCallContext( - null, + newAdminCallContext( databaseInfo.getId().getName(), request, DatabaseAdminGrpc.getUpdateDatabaseDdlMethod()); @@ -1311,7 +1513,7 @@ public OperationFuture updateDatabaseDdl( throw newSpannerException(e); } catch (ExecutionException e) { Throwable t = e.getCause(); - SpannerException se = SpannerExceptionFactory.asSpannerException(t); + SpannerException se = asSpannerException(t); if (se instanceof AdminRequestsPerMinuteExceededException) { // Propagate this to trigger a retry. throw se; @@ -1334,7 +1536,7 @@ public void dropDatabase(String databaseName) throws SpannerException { DropDatabaseRequest.newBuilder().setDatabase(databaseName).build(); final GrpcCallContext context = - newCallContext(null, databaseName, request, DatabaseAdminGrpc.getDropDatabaseMethod()); + newAdminCallContext(databaseName, request, DatabaseAdminGrpc.getDropDatabaseMethod()); runWithRetryOnAdministrativeRequestsExceeded( () -> { get(databaseAdminStub.dropDatabaseCallable().futureCall(request, context)); @@ -1349,7 +1551,7 @@ public Database getDatabase(String databaseName) throws SpannerException { GetDatabaseRequest.newBuilder().setName(databaseName).build(); final GrpcCallContext context = - newCallContext(null, databaseName, request, DatabaseAdminGrpc.getGetDatabaseMethod()); + newAdminCallContext(databaseName, request, DatabaseAdminGrpc.getGetDatabaseMethod()); return runWithRetryOnAdministrativeRequestsExceeded( () -> get(databaseAdminStub.getDatabaseCallable().futureCall(request, context))); } @@ -1360,8 +1562,8 @@ public OperationFuture updateDatabase( UpdateDatabaseRequest request = UpdateDatabaseRequest.newBuilder().setDatabase(database).setUpdateMask(updateMask).build(); GrpcCallContext context = - newCallContext( - null, database.getName(), request, DatabaseAdminGrpc.getUpdateDatabaseMethod()); + newAdminCallContext( + database.getName(), request, DatabaseAdminGrpc.getUpdateDatabaseMethod()); return databaseAdminStub.updateDatabaseOperationCallable().futureCall(request, context); } @@ -1372,7 +1574,7 @@ public GetDatabaseDdlResponse getDatabaseDdl(String databaseName) throws Spanner GetDatabaseDdlRequest.newBuilder().setDatabase(databaseName).build(); final GrpcCallContext context = - newCallContext(null, databaseName, request, DatabaseAdminGrpc.getGetDatabaseDdlMethod()); + newAdminCallContext(databaseName, request, DatabaseAdminGrpc.getGetDatabaseDdlMethod()); return runWithRetryOnAdministrativeRequestsExceeded( () -> get(databaseAdminStub.getDatabaseDdlCallable().futureCall(request, context))); } @@ -1556,7 +1758,7 @@ public Backup updateBackup(Backup backup, FieldMask updateMask) { final UpdateBackupRequest request = UpdateBackupRequest.newBuilder().setBackup(backup).setUpdateMask(updateMask).build(); final GrpcCallContext context = - newCallContext(null, backup.getName(), request, DatabaseAdminGrpc.getUpdateBackupMethod()); + newAdminCallContext(backup.getName(), request, DatabaseAdminGrpc.getUpdateBackupMethod()); return runWithRetryOnAdministrativeRequestsExceeded( () -> databaseAdminStub.updateBackupCallable().call(request, context)); } @@ -1567,7 +1769,7 @@ public void deleteBackup(String backupName) { final DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(backupName).build(); final GrpcCallContext context = - newCallContext(null, backupName, request, DatabaseAdminGrpc.getDeleteBackupMethod()); + newAdminCallContext(backupName, request, DatabaseAdminGrpc.getDeleteBackupMethod()); runWithRetryOnAdministrativeRequestsExceeded( () -> { databaseAdminStub.deleteBackupCallable().call(request, context); @@ -1580,7 +1782,7 @@ public Backup getBackup(String backupName) throws SpannerException { acquireAdministrativeRequestsRateLimiter(); final GetBackupRequest request = GetBackupRequest.newBuilder().setName(backupName).build(); final GrpcCallContext context = - newCallContext(null, backupName, request, DatabaseAdminGrpc.getGetBackupMethod()); + newAdminCallContext(backupName, request, DatabaseAdminGrpc.getGetBackupMethod()); return runWithRetryOnAdministrativeRequestsExceeded( () -> get(databaseAdminStub.getBackupCallable().futureCall(request, context))); } @@ -1590,7 +1792,7 @@ public Operation getOperation(String name) throws SpannerException { acquireAdministrativeRequestsRateLimiter(); final GetOperationRequest request = GetOperationRequest.newBuilder().setName(name).build(); final GrpcCallContext context = - newCallContext(null, name, request, OperationsGrpc.getGetOperationMethod()); + newAdminCallContext(name, request, OperationsGrpc.getGetOperationMethod()); return runWithRetryOnAdministrativeRequestsExceeded( () -> get( @@ -1606,7 +1808,7 @@ public void cancelOperation(String name) throws SpannerException { final CancelOperationRequest request = CancelOperationRequest.newBuilder().setName(name).build(); final GrpcCallContext context = - newCallContext(null, name, request, OperationsGrpc.getCancelOperationMethod()); + newAdminCallContext(name, request, OperationsGrpc.getCancelOperationMethod()); runWithRetryOnAdministrativeRequestsExceeded( () -> { get( @@ -1711,10 +1913,16 @@ public StreamingCall read( ReadRequest request, ResultStreamConsumer consumer, @Nullable Map options, + XGoogSpannerRequestId requestId, boolean routeToLeader) { GrpcCallContext context = newCallContext( - options, request.getSession(), request, SpannerGrpc.getReadMethod(), routeToLeader); + options, + requestId, + request.getSession(), + request, + SpannerGrpc.getReadMethod(), + routeToLeader); SpannerResponseObserver responseObserver = new SpannerResponseObserver(consumer); spannerStub.streamingReadCallable().call(request, responseObserver, context); return new GrpcStreamingCall(context, responseObserver.getController()); @@ -1765,10 +1973,14 @@ public RetrySettings getPartitionedDmlRetrySettings() { @Override public ServerStream executeStreamingPartitionedDml( - ExecuteSqlRequest request, Map options, Duration timeout) { + ExecuteSqlRequest request, + Map options, + XGoogSpannerRequestId requestId, + Duration timeout) { GrpcCallContext context = newCallContext( options, + requestId, request.getSession(), request, SpannerGrpc.getExecuteStreamingSqlMethod(), @@ -1791,10 +2003,12 @@ public StreamingCall executeQuery( ExecuteSqlRequest request, ResultStreamConsumer consumer, @Nullable Map options, + XGoogSpannerRequestId requestId, boolean routeToLeader) { GrpcCallContext context = newCallContext( options, + requestId, request.getSession(), request, SpannerGrpc.getExecuteStreamingSqlMethod(), @@ -1977,8 +2191,12 @@ private static T get(final Future future) throws SpannerException { // We are the sole consumer of the future, so cancel it. future.cancel(true); throw SpannerExceptionFactory.propagateInterrupt(e); - } catch (Exception e) { - throw newSpannerException(context, e, null); + } catch (ExecutionException e) { + throw asSpannerException(e.getCause()); + } catch (CancellationException e) { + throw newSpannerException(context, e); + } catch (Exception exception) { + throw asSpannerException(exception); } } @@ -2007,6 +2225,11 @@ GrpcCallContext newCallContext(@Nullable Map options, String resource return newCallContext(options, resource, null, null); } + private GrpcCallContext newAdminCallContext( + String resource, ReqT request, MethodDescriptor method) { + return newCallContext(null, resource, request, method, false); + } + @VisibleForTesting GrpcCallContext newCallContext( @Nullable Map options, @@ -2023,28 +2246,58 @@ GrpcCallContext newCallContext( ReqT request, MethodDescriptor method, boolean routeToLeader) { + return newCallContext(options, /* requestId= */ null, resource, request, method, routeToLeader); + } + + @VisibleForTesting + GrpcCallContext newCallContext( + @Nullable Map options, + @Nullable XGoogSpannerRequestId requestId, + String resource, + ReqT request, + MethodDescriptor method, + boolean routeToLeader) { GrpcCallContext context = this.baseGrpcCallContext; Long affinity = options == null ? null : Option.CHANNEL_HINT.getLong(options); if (affinity != null) { if (this.isGrpcGcpExtensionEnabled) { // Set channel affinity in gRPC-GCP. - // Compute bounded channel hint to prevent gRPC-GCP affinity map from getting unbounded. - int boundedChannelHint = affinity.intValue() % this.numChannels; + String affinityKey; + if (this.isDynamicChannelPoolEnabled) { + // When dynamic channel pooling is enabled, we use the raw affinity value as the key. + // This allows grpc-gcp to use round-robin for new keys, enabling new channels + // (created during scale-up) to receive requests. The affinity key lifetime setting + // ensures the affinity map doesn't grow unbounded. + affinityKey = String.valueOf(affinity); + } else { + // When DCP is disabled, compute bounded channel hint to prevent + // gRPC-GCP affinity map from getting unbounded. + int boundedChannelHint = affinity.intValue() % this.numChannels; + affinityKey = String.valueOf(boundedChannelHint); + } context = context.withCallOptions( - context - .getCallOptions() - .withOption( - GcpManagedChannel.AFFINITY_KEY, String.valueOf(boundedChannelHint))); + context.getCallOptions().withOption(GcpManagedChannel.AFFINITY_KEY, affinityKey)); } else { // Set channel affinity in GAX. context = context.withChannelAffinity(affinity.intValue()); } } - if (options != null) { - // TODO(@odeke-em): Infer the affinity if it doesn't match up with in the request-id. - context = withRequestId(context, options); + // When grpc-gcp extension with dynamic channel pooling is enabled, the actual channel ID + // will be set by RequestIdInterceptor after grpc-gcp selects the channel. + // Set to 0 (unknown) here as a placeholder. + int requestIdChannel = + (this.isGrpcGcpExtensionEnabled && this.isDynamicChannelPoolEnabled) + ? 0 + : convertToRequestIdChannelNumber(affinity); + if (requestId == null) { + requestId = requestIdCreator.nextRequestId(requestIdChannel); + } else { + requestId.setChannelId(requestIdChannel); } + context = + context.withCallOptions( + context.getCallOptions().withOption(REQUEST_ID_CALL_OPTIONS_KEY, requestId)); context = context.withExtraHeaders(metadataProvider.newExtraHeaders(resource, projectName)); if (routeToLeader && leaderAwareRoutingEnabled) { context = context.withExtraHeaders(metadataProvider.newRouteToLeaderHeader()); @@ -2064,17 +2317,19 @@ GrpcCallContext newCallContext( return (GrpcCallContext) context.merge(apiCallContextFromContext); } - GrpcCallContext withRequestId(GrpcCallContext context, Map options) { - XGoogSpannerRequestId reqId = (XGoogSpannerRequestId) options.get(Option.REQUEST_ID); - if (reqId == null) { - return context; - } + @Override + public RequestIdCreator getRequestIdCreator() { + return this.requestIdCreator; + } - Map> withReqId = - ImmutableMap.of( - XGoogSpannerRequestId.REQUEST_HEADER_KEY.name(), - Collections.singletonList(reqId.toString())); - return context.withExtraHeaders(withReqId); + private int convertToRequestIdChannelNumber(@Nullable Long affinity) { + if (affinity == null) { + return 0; + } + int requestIdChannel = affinity.intValue(); + requestIdChannel = requestIdChannel == Integer.MAX_VALUE ? 0 : Math.abs(requestIdChannel); + // Start counting at 1, to distinguish between '0 == Unknown and >0 == known'. + return requestIdChannel % this.numChannels + 1; } void registerResponseObserver(SpannerResponseObserver responseObserver) { @@ -2216,7 +2471,7 @@ public void onError(Throwable t) { if (this.consumer.cancelQueryWhenClientIsClosed()) { unregisterResponseObserver(this); } - consumer.onError(newSpannerException(t)); + consumer.onError(asSpannerException(t)); } @Override @@ -2237,4 +2492,40 @@ private static Duration systemProperty(String name, int defaultValue) { String stringValue = System.getProperty(name, ""); return Duration.ofSeconds(stringValue.isEmpty() ? defaultValue : Integer.parseInt(stringValue)); } + + // Wrapper class to build the GcpFallbackChannel using GAX's configuration + private static class FallbackChannelBuilder + extends ForwardingChannelBuilder2 { + private final GcpFallbackChannelOptions options; + + private final GcpManagedChannelBuilder primaryGcpBuilder; + private final GcpManagedChannelBuilder fallbackGcpBuilder; + + private FallbackChannelBuilder( + GcpManagedChannelBuilder primary, + GcpManagedChannelBuilder fallback, + GcpFallbackChannelOptions options) { + this.primaryGcpBuilder = primary; + this.fallbackGcpBuilder = fallback; + this.options = options; + } + + /** + * Delegates all configuration calls (e.g., interceptors, userAgent) to the primary builder. + * This ensures the primary channel receives all of GAX's standard configuration. + */ + @Override + protected ManagedChannelBuilder delegate() { + return primaryGcpBuilder; + } + + /** + * Overrides the build method to return our custom GcpFallbackChannel instead of a standard gRPC + * channel. + */ + @Override + public ManagedChannel build() { + return new GcpFallbackChannel(options, primaryGcpBuilder, fallbackGcpBuilder); + } + } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GrpcChannelEndpointCache.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GrpcChannelEndpointCache.java new file mode 100644 index 00000000000..3ee4d789592 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GrpcChannelEndpointCache.java @@ -0,0 +1,228 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.Builder; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.cloud.spanner.ErrorCode; +import com.google.cloud.spanner.SpannerExceptionFactory; +import com.google.common.annotations.VisibleForTesting; +import io.grpc.ConnectivityState; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import java.io.IOException; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; + +/** + * gRPC implementation of {@link ChannelEndpointCache}. + * + *

This cache creates and caches gRPC channels per address. It uses {@link + * InstantiatingGrpcChannelProvider#withEndpoint(String)} to create new channels with the same + * configuration but different endpoints, avoiding race conditions. + */ +@InternalApi +class GrpcChannelEndpointCache implements ChannelEndpointCache { + + /** Timeout for graceful channel shutdown. */ + private static final long SHUTDOWN_TIMEOUT_SECONDS = 5; + + private final InstantiatingGrpcChannelProvider baseProvider; + private final Map servers = new ConcurrentHashMap<>(); + private final GrpcChannelEndpoint defaultEndpoint; + private final String defaultAuthority; + private final AtomicBoolean isShutdown = new AtomicBoolean(false); + + /** + * Creates a new cache with the given channel provider. + * + * @param channelProvider the base provider used to create channels. New channels for different + * endpoints are created using {@link InstantiatingGrpcChannelProvider#withEndpoint(String)}. + * @throws IOException if the default channel cannot be created + */ + public GrpcChannelEndpointCache(InstantiatingGrpcChannelProvider channelProvider) + throws IOException { + this.baseProvider = channelProvider; + String defaultEndpoint = channelProvider.getEndpoint(); + this.defaultEndpoint = new GrpcChannelEndpoint(defaultEndpoint, channelProvider); + this.defaultAuthority = this.defaultEndpoint.getChannel().authority(); + this.servers.put(defaultEndpoint, this.defaultEndpoint); + } + + @Override + public ChannelEndpoint defaultChannel() { + return defaultEndpoint; + } + + @Override + public ChannelEndpoint get(String address) { + if (isShutdown.get()) { + throw SpannerExceptionFactory.newSpannerException( + ErrorCode.FAILED_PRECONDITION, "ChannelEndpointCache has been shut down"); + } + + return servers.computeIfAbsent( + address, + addr -> { + try { + // Create a new provider with the same config but different endpoint. + // This is thread-safe as withEndpoint() returns a new provider instance. + TransportChannelProvider newProvider = createProviderWithAuthorityOverride(addr); + return new GrpcChannelEndpoint(addr, newProvider); + } catch (IOException e) { + throw SpannerExceptionFactory.newSpannerException( + ErrorCode.INTERNAL, "Failed to create channel for address: " + addr, e); + } + }); + } + + private TransportChannelProvider createProviderWithAuthorityOverride(String address) { + InstantiatingGrpcChannelProvider endpointProvider = + (InstantiatingGrpcChannelProvider) baseProvider.withEndpoint(address); + if (Objects.equals(defaultAuthority, address)) { + return endpointProvider; + } + Builder builder = endpointProvider.toBuilder(); + final com.google.api.core.ApiFunction + baseConfigurator = builder.getChannelConfigurator(); + builder.setChannelConfigurator( + channelBuilder -> { + ManagedChannelBuilder effectiveBuilder = channelBuilder; + if (baseConfigurator != null) { + effectiveBuilder = baseConfigurator.apply(effectiveBuilder); + } + return effectiveBuilder.overrideAuthority(defaultAuthority); + }); + return builder.build(); + } + + @Override + public void evict(String address) { + if (defaultEndpoint.getAddress().equals(address)) { + return; + } + GrpcChannelEndpoint server = servers.remove(address); + if (server != null) { + shutdownChannel(server, false); + } + } + + @Override + public void shutdown() { + if (!isShutdown.compareAndSet(false, true)) { + return; + } + for (GrpcChannelEndpoint server : servers.values()) { + shutdownChannel(server, true); + } + servers.clear(); + } + + /** + * Shuts down a server's channel. + * + *

First attempts a graceful shutdown. When awaitTermination is true, waits for in-flight RPCs + * to complete and forces shutdown on timeout. + */ + private void shutdownChannel(GrpcChannelEndpoint server, boolean awaitTermination) { + ManagedChannel channel = server.getChannel(); + if (channel.isShutdown()) { + return; + } + + channel.shutdown(); + if (!awaitTermination) { + return; + } + try { + if (!channel.awaitTermination(SHUTDOWN_TIMEOUT_SECONDS, TimeUnit.SECONDS)) { + channel.shutdownNow(); + } + } catch (InterruptedException e) { + channel.shutdownNow(); + Thread.currentThread().interrupt(); + } + } + + /** gRPC implementation of {@link ChannelEndpoint}. */ + static class GrpcChannelEndpoint implements ChannelEndpoint { + private final String address; + private final ManagedChannel channel; + + /** + * Creates a server from a channel provider. + * + * @param address the server address + * @param provider the channel provider (must be a gRPC provider) + * @throws IOException if the channel cannot be created + */ + GrpcChannelEndpoint(String address, TransportChannelProvider provider) throws IOException { + this.address = address; + TransportChannelProvider readyProvider = provider; + if (provider.needsHeaders()) { + readyProvider = provider.withHeaders(java.util.Collections.emptyMap()); + } + GrpcTransportChannel transportChannel = + (GrpcTransportChannel) readyProvider.getTransportChannel(); + this.channel = (ManagedChannel) transportChannel.getChannel(); + } + + /** + * Creates a server with an existing channel. Primarily for testing. + * + * @param address the server address + * @param channel the managed channel + */ + @VisibleForTesting + GrpcChannelEndpoint(String address, ManagedChannel channel) { + this.address = address; + this.channel = channel; + } + + @Override + public String getAddress() { + return address; + } + + @Override + public boolean isHealthy() { + if (channel.isShutdown() || channel.isTerminated()) { + return false; + } + // Check connectivity state without triggering a connection attempt. + // Some channel implementations don't support getState(), in which case + // we assume the channel is healthy if it's not shutdown/terminated. + try { + ConnectivityState state = channel.getState(false); + return state != ConnectivityState.SHUTDOWN && state != ConnectivityState.TRANSIENT_FAILURE; + } catch (UnsupportedOperationException ignore) { + return true; + } + } + + @Override + public ManagedChannel getChannel() { + return channel; + } + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/HeaderInterceptor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/HeaderInterceptor.java index bec062db907..861e839a036 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/HeaderInterceptor.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/HeaderInterceptor.java @@ -28,15 +28,10 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.spanner.admin.database.v1.DatabaseName; -import io.grpc.CallOptions; -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.ClientInterceptor; +import io.grpc.*; import io.grpc.ForwardingClientCall.SimpleForwardingClientCall; import io.grpc.ForwardingClientCallListener.SimpleForwardingClientCallListener; -import io.grpc.Grpc; -import io.grpc.Metadata; -import io.grpc.MethodDescriptor; +import io.grpc.alts.AltsContextUtil; import io.opencensus.stats.MeasureMap; import io.opencensus.stats.Stats; import io.opencensus.stats.StatsRecorder; @@ -47,9 +42,6 @@ import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; import io.opentelemetry.api.trace.Span; -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.net.SocketAddress; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ExecutionException; @@ -94,6 +86,8 @@ class HeaderInterceptor implements ClientInterceptor { private static final Logger LOGGER = Logger.getLogger(HeaderInterceptor.class.getName()); private static final Level LEVEL = Level.INFO; private final SpannerRpcMetrics spannerRpcMetrics; + private Float gfeLatency; + private Float afeLatency; HeaderInterceptor(SpannerRpcMetrics spannerRpcMetrics) { this.spannerRpcMetrics = spannerRpcMetrics; @@ -112,26 +106,50 @@ public void start(Listener responseListener, Metadata headers) { Span span = Span.current(); DatabaseName databaseName = extractDatabaseName(headers); String key = extractKey(databaseName, method.getFullMethodName()); + String requestId = extractRequestId(headers); TagContext tagContext = getTagContext(key, method.getFullMethodName(), databaseName); Attributes attributes = getMetricAttributes(key, method.getFullMethodName(), databaseName); - Map builtInMetricsAttributes = - getBuiltInMetricAttributes(key, databaseName); - builtInMetricsAttributes.put( - BuiltInMetricsConstant.REQUEST_ID_KEY.getKey(), extractRequestId(headers)); - addBuiltInMetricAttributes(compositeTracer, builtInMetricsAttributes); + super.start( new SimpleForwardingClientCallListener(responseListener) { @Override public void onHeaders(Metadata metadata) { - Boolean isDirectPathUsed = - isDirectPathUsed(getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR)); - addDirectPathUsedAttribute(compositeTracer, isDirectPathUsed); + String serverTiming = metadata.get(SERVER_TIMING_HEADER_KEY); + try { + // Get gfe and afe Latency value + Map serverTimingMetrics = parseServerTimingHeader(serverTiming); + gfeLatency = serverTimingMetrics.get(GFE_TIMING_HEADER); + afeLatency = serverTimingMetrics.get(AFE_TIMING_HEADER); + } catch (NumberFormatException e) { + LOGGER.log(LEVEL, "Invalid server-timing object in header: {}", serverTiming); + } - processHeader( - metadata, tagContext, attributes, span, compositeTracer, isDirectPathUsed); super.onHeaders(metadata); } + + @Override + public void onClose(Status status, Metadata trailers) { + // Record Built-in Metrics + boolean isDirectPathUsed = AltsContextUtil.check(getAttributes()); + boolean isAfeEnabled = GapicSpannerRpc.isEnableAFEServerTiming(); + recordSpan(span, requestId); + recordCustomMetrics(tagContext, attributes, isDirectPathUsed); + Map builtInMetricsAttributes = new HashMap<>(); + try { + builtInMetricsAttributes = getBuiltInMetricAttributes(key, databaseName); + } catch (ExecutionException e) { + LOGGER.log( + LEVEL, "Unable to get built-in metric attributes {}", e.getMessage()); + } + recordBuiltInMetrics( + compositeTracer, + builtInMetricsAttributes, + requestId, + isDirectPathUsed, + isAfeEnabled); + super.onClose(status, trailers); + } }, headers); } catch (ExecutionException executionException) { @@ -142,60 +160,51 @@ public void onHeaders(Metadata metadata) { }; } - private void processHeader( - Metadata metadata, - TagContext tagContext, - Attributes attributes, - Span span, - CompositeTracer compositeTracer, - boolean isDirectPathUsed) { + private void recordCustomMetrics( + TagContext tagContext, Attributes attributes, Boolean isDirectPathUsed) { + // Record OpenCensus and Custom OpenTelemetry Metrics MeasureMap measureMap = STATS_RECORDER.newMeasureMap(); - String serverTiming = metadata.get(SERVER_TIMING_HEADER_KEY); - try { - // Previous implementation parsed the GFE latency directly using: - // long latency = Long.parseLong(serverTiming.substring("gfet4t7; dur=".length())); - // This approach assumed the serverTiming header contained exactly one metric "gfet4t7". - // If additional metrics were introduced in the header, older versions of the library - // would fail to parse it correctly. To make the parsing more robust, the logic has been - // updated to handle multiple metrics gracefully. - Map serverTimingMetrics = parseServerTimingHeader(serverTiming); - if (serverTimingMetrics.containsKey(GFE_TIMING_HEADER)) { - float gfeLatency = serverTimingMetrics.get(GFE_TIMING_HEADER); - - measureMap.put(SPANNER_GFE_LATENCY, (long) gfeLatency); + if (!isDirectPathUsed) { + if (gfeLatency != null) { + long gfeVal = gfeLatency.longValue(); + measureMap.put(SPANNER_GFE_LATENCY, gfeVal); measureMap.put(SPANNER_GFE_HEADER_MISSING_COUNT, 0L); - measureMap.record(tagContext); - - spannerRpcMetrics.recordGfeLatency((long) gfeLatency, attributes); + spannerRpcMetrics.recordGfeLatency(gfeVal, attributes); spannerRpcMetrics.recordGfeHeaderMissingCount(0L, attributes); - if (compositeTracer != null && !isDirectPathUsed) { - compositeTracer.recordGFELatency(gfeLatency); - } - if (span != null) { - span.setAttribute("gfe_latency", String.valueOf(gfeLatency)); - } } else { - measureMap.put(SPANNER_GFE_HEADER_MISSING_COUNT, 1L).record(tagContext); + measureMap.put(SPANNER_GFE_HEADER_MISSING_COUNT, 1L); spannerRpcMetrics.recordGfeHeaderMissingCount(1L, attributes); - if (compositeTracer != null && !isDirectPathUsed) { - compositeTracer.recordGfeHeaderMissingCount(1L); - } } + } + measureMap.record(tagContext); + } - // Record AFE metrics - if (compositeTracer != null && GapicSpannerRpc.isEnableAFEServerTiming()) { - if (serverTimingMetrics.containsKey(AFE_TIMING_HEADER)) { - float afeLatency = serverTimingMetrics.get(AFE_TIMING_HEADER); - compositeTracer.recordAFELatency(afeLatency); - } else { - // Disable afe_connectivity_error_count metric as AFE header is disabled in backend - // currently. - // compositeTracer.recordAfeHeaderMissingCount(1L); - } + private void recordSpan(Span span, String requestId) { + if (span != null) { + if (gfeLatency != null) { + span.setAttribute("gfe_latency", gfeLatency.toString()); } - } catch (NumberFormatException e) { - LOGGER.log(LEVEL, "Invalid server-timing object in header: {}", serverTiming); + if (afeLatency != null) { + span.setAttribute("afe_latency", afeLatency.toString()); + } + span.setAttribute(XGoogSpannerRequestId.REQUEST_ID_HEADER_NAME, requestId); + } + } + + private void recordBuiltInMetrics( + CompositeTracer compositeTracer, + Map builtInMetricsAttributes, + String requestId, + Boolean isDirectPathUsed, + Boolean isAfeEnabled) { + if (compositeTracer != null) { + builtInMetricsAttributes.put(BuiltInMetricsConstant.REQUEST_ID_KEY.getKey(), requestId); + builtInMetricsAttributes.put( + BuiltInMetricsConstant.DIRECT_PATH_USED_KEY.getKey(), Boolean.toString(isDirectPathUsed)); + compositeTracer.addAttributes(builtInMetricsAttributes); + compositeTracer.recordServerTimingHeaderMetrics( + gfeLatency, afeLatency, isDirectPathUsed, isAfeEnabled); } } @@ -251,7 +260,7 @@ private DatabaseName extractDatabaseName(Metadata headers) throws ExecutionExcep } private String extractRequestId(Metadata headers) throws ExecutionException { - return headers.get(XGoogSpannerRequestId.REQUEST_HEADER_KEY); + return headers.get(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY); } private TagContext getTagContext(String key, String method, DatabaseName databaseName) @@ -298,29 +307,4 @@ private Map getBuiltInMetricAttributes(String key, DatabaseName return attributes; }); } - - private void addBuiltInMetricAttributes( - CompositeTracer compositeTracer, Map builtInMetricsAttributes) { - if (compositeTracer != null) { - compositeTracer.addAttributes(builtInMetricsAttributes); - } - } - - private void addDirectPathUsedAttribute( - CompositeTracer compositeTracer, Boolean isDirectPathUsed) { - if (compositeTracer != null) { - compositeTracer.addAttributes( - BuiltInMetricsConstant.DIRECT_PATH_USED_KEY.getKey(), Boolean.toString(isDirectPathUsed)); - } - } - - private Boolean isDirectPathUsed(SocketAddress remoteAddr) { - if (remoteAddr instanceof InetSocketAddress) { - InetAddress inetAddress = ((InetSocketAddress) remoteAddr).getAddress(); - String addr = inetAddress.getHostAddress(); - return addr.startsWith(BuiltInMetricsConstant.DP_IPV4_PREFIX) - || addr.startsWith(BuiltInMetricsConstant.DP_IPV6_PREFIX); - } - return false; - } } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyAwareChannel.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyAwareChannel.java new file mode 100644 index 00000000000..59fc03dfd80 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyAwareChannel.java @@ -0,0 +1,662 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.google.protobuf.ByteString; +import com.google.spanner.v1.BeginTransactionRequest; +import com.google.spanner.v1.CommitRequest; +import com.google.spanner.v1.CommitResponse; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.PartialResultSet; +import com.google.spanner.v1.ReadRequest; +import com.google.spanner.v1.ResultSet; +import com.google.spanner.v1.RollbackRequest; +import com.google.spanner.v1.Transaction; +import com.google.spanner.v1.TransactionSelector; +import io.grpc.CallOptions; +import io.grpc.ClientCall; +import io.grpc.ForwardingClientCall; +import io.grpc.ForwardingClientCallListener.SimpleForwardingClientCallListener; +import io.grpc.ManagedChannel; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import java.io.IOException; +import java.lang.ref.SoftReference; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; + +/** + * ManagedChannel that routes eligible requests using location-aware routing hints. + * + *

Routing hints are applied to streaming read/query and unary ExecuteSql. Mutation-based + * BeginTransaction and Commit requests also carry routing hints when recipes are available. + * Commit/Rollback use transaction affinity when available. BeginTransaction is routed only when a + * mutation key is provided. + */ +@InternalApi +final class KeyAwareChannel extends ManagedChannel { + private static final long MAX_TRACKED_READ_ONLY_TRANSACTIONS = 100_000L; + private static final String STREAMING_READ_METHOD = "google.spanner.v1.Spanner/StreamingRead"; + private static final String STREAMING_SQL_METHOD = + "google.spanner.v1.Spanner/ExecuteStreamingSql"; + private static final String UNARY_SQL_METHOD = "google.spanner.v1.Spanner/ExecuteSql"; + private static final String BEGIN_TRANSACTION_METHOD = + "google.spanner.v1.Spanner/BeginTransaction"; + private static final String COMMIT_METHOD = "google.spanner.v1.Spanner/Commit"; + private static final String ROLLBACK_METHOD = "google.spanner.v1.Spanner/Rollback"; + + private final ManagedChannel defaultChannel; + private final ChannelEndpointCache endpointCache; + private final String authority; + private final String defaultEndpointAddress; + private final Map> channelFinders = + new ConcurrentHashMap<>(); + private final Map transactionAffinities = new ConcurrentHashMap<>(); + // Maps read-only transaction IDs to their preferLeader value. + // Strong reads → true (prefer leader), Stale reads → false (any replica). + // Bounded to prevent unbounded growth if application code does not close read-only transactions. + private final Cache readOnlyTxPreferLeader = + CacheBuilder.newBuilder().maximumSize(MAX_TRACKED_READ_ONLY_TRANSACTIONS).build(); + + private KeyAwareChannel( + InstantiatingGrpcChannelProvider channelProvider, + @Nullable ChannelEndpointCacheFactory endpointCacheFactory) + throws IOException { + if (endpointCacheFactory == null) { + this.endpointCache = new GrpcChannelEndpointCache(channelProvider); + } else { + this.endpointCache = endpointCacheFactory.create(channelProvider); + } + this.defaultChannel = endpointCache.defaultChannel().getChannel(); + this.defaultEndpointAddress = endpointCache.defaultChannel().getAddress(); + this.authority = this.defaultChannel.authority(); + } + + static KeyAwareChannel create( + InstantiatingGrpcChannelProvider channelProvider, + @Nullable ChannelEndpointCacheFactory endpointCacheFactory) + throws IOException { + return new KeyAwareChannel(channelProvider, endpointCacheFactory); + } + + private String extractDatabaseIdFromSession(String session) { + if (session == null || session.isEmpty()) { + return null; + } + int sessionsIndex = session.indexOf("/sessions/"); + if (sessionsIndex == -1) { + return null; + } + return session.substring(0, sessionsIndex); + } + + private ChannelFinder getOrCreateChannelFinder(String databaseId) { + SoftReference ref = channelFinders.get(databaseId); + ChannelFinder finder = (ref != null) ? ref.get() : null; + if (finder == null) { + synchronized (channelFinders) { + ref = channelFinders.get(databaseId); + finder = (ref != null) ? ref.get() : null; + if (finder == null) { + finder = new ChannelFinder(endpointCache); + channelFinders.put(databaseId, new SoftReference<>(finder)); + } + } + } + return finder; + } + + @Override + public ManagedChannel shutdown() { + endpointCache.shutdown(); + return this; + } + + @Override + public ManagedChannel shutdownNow() { + endpointCache.shutdown(); + return this; + } + + @Override + public boolean isTerminated() { + return defaultChannel.isTerminated(); + } + + @Override + public boolean isShutdown() { + return defaultChannel.isShutdown(); + } + + @Override + public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { + return defaultChannel.awaitTermination(timeout, unit); + } + + @Override + public String authority() { + return authority; + } + + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + if (isKeyAware(methodDescriptor)) { + return new KeyAwareClientCall<>(this, methodDescriptor, callOptions); + } + return defaultChannel.newCall(methodDescriptor, callOptions); + } + + private static boolean isKeyAware(MethodDescriptor methodDescriptor) { + String method = methodDescriptor.getFullMethodName(); + return STREAMING_READ_METHOD.equals(method) + || STREAMING_SQL_METHOD.equals(method) + || UNARY_SQL_METHOD.equals(method) + || BEGIN_TRANSACTION_METHOD.equals(method) + || COMMIT_METHOD.equals(method) + || ROLLBACK_METHOD.equals(method); + } + + @Nullable + private ChannelEndpoint affinityEndpoint(ByteString transactionId) { + if (transactionId == null || transactionId.isEmpty()) { + return null; + } + String address = transactionAffinities.get(transactionId); + if (address == null) { + return null; + } + return endpointCache.get(address); + } + + private void clearAffinity(ByteString transactionId) { + if (transactionId == null || transactionId.isEmpty()) { + return; + } + transactionAffinities.remove(transactionId); + readOnlyTxPreferLeader.invalidate(transactionId); + } + + void clearTransactionAffinity(ByteString transactionId) { + clearAffinity(transactionId); + } + + private boolean isReadOnlyTransaction(ByteString transactionId) { + return transactionId != null + && !transactionId.isEmpty() + && readOnlyTxPreferLeader.getIfPresent(transactionId) != null; + } + + @Nullable + private Boolean readOnlyPreferLeader(ByteString transactionId) { + if (transactionId == null || transactionId.isEmpty()) { + return null; + } + return readOnlyTxPreferLeader.getIfPresent(transactionId); + } + + private void trackReadOnlyTransaction(ByteString transactionId, boolean preferLeader) { + if (transactionId == null || transactionId.isEmpty()) { + return; + } + readOnlyTxPreferLeader.put(transactionId, preferLeader); + } + + private void recordAffinity( + ByteString transactionId, @Nullable ChannelEndpoint endpoint, boolean allowDefault) { + if (transactionId == null || transactionId.isEmpty() || endpoint == null) { + return; + } + String address = endpoint.getAddress(); + if (!allowDefault && defaultEndpointAddress.equals(address)) { + return; + } + transactionAffinities.put(transactionId, address); + } + + private static ByteString transactionIdFromSelector(TransactionSelector selector) { + if (selector.getSelectorCase() == TransactionSelector.SelectorCase.ID) { + return selector.getId(); + } + return ByteString.EMPTY; + } + + @Nullable + private static ByteString transactionIdFromMetadata(PartialResultSet result) { + if (result.hasMetadata()) { + return transactionIdFromTransaction(result.getMetadata().getTransaction()); + } + return null; + } + + @Nullable + private static ByteString transactionIdFromMetadata(ResultSet result) { + if (result.hasMetadata()) { + return transactionIdFromTransaction(result.getMetadata().getTransaction()); + } + return null; + } + + @Nullable + private static ByteString transactionIdFromTransaction(Transaction transaction) { + if (transaction != null && !transaction.getId().isEmpty()) { + return transaction.getId(); + } + return null; + } + + static final class KeyAwareClientCall + extends ForwardingClientCall { + private final KeyAwareChannel parentChannel; + private final MethodDescriptor methodDescriptor; + private final CallOptions callOptions; + private Listener responseListener; + private Metadata headers; + @Nullable private ClientCall delegate; + private ChannelFinder channelFinder; + @Nullable private ChannelEndpoint selectedEndpoint; + @Nullable private ByteString transactionIdToClear; + private boolean allowDefaultAffinity; + private long pendingRequests; + private boolean pendingHalfClose; + @Nullable private Boolean pendingMessageCompression; + @Nullable private io.grpc.Status cancelledStatus; + @Nullable private Metadata cancelledTrailers; + private boolean isReadOnlyBegin; + private boolean readOnlyIsStrong; + private final Object lock = new Object(); + + KeyAwareClientCall( + KeyAwareChannel parentChannel, + MethodDescriptor methodDescriptor, + CallOptions callOptions) { + this.parentChannel = parentChannel; + this.methodDescriptor = methodDescriptor; + this.callOptions = callOptions; + } + + @Override + protected ClientCall delegate() { + synchronized (lock) { + if (delegate == null) { + throw new IllegalStateException( + "Delegate call not initialized before use. sendMessage was likely not called."); + } + return delegate; + } + } + + @Override + public void start(Listener responseListener, Metadata headers) { + Listener listenerToClose = null; + io.grpc.Status statusToClose = null; + Metadata trailersToClose = null; + synchronized (lock) { + this.responseListener = new KeyAwareClientCallListener<>(responseListener, this); + this.headers = headers; + if (this.cancelledStatus != null) { + listenerToClose = this.responseListener; + statusToClose = this.cancelledStatus; + trailersToClose = + this.cancelledTrailers == null ? new Metadata() : this.cancelledTrailers; + } + } + if (listenerToClose != null) { + listenerToClose.onClose(statusToClose, trailersToClose); + } + } + + @Override + @SuppressWarnings("unchecked") + public void sendMessage(RequestT message) { + synchronized (lock) { + if (this.cancelledStatus != null) { + return; + } + if (responseListener == null || headers == null) { + throw new IllegalStateException("start must be called before sendMessage"); + } + ChannelEndpoint endpoint = null; + ChannelFinder finder = null; + + if (message instanceof ReadRequest) { + ReadRequest.Builder reqBuilder = ((ReadRequest) message).toBuilder(); + maybeTrackReadOnlyBegin(reqBuilder.getTransaction()); + RoutingDecision routing = routeFromRequest(reqBuilder); + finder = routing.finder; + endpoint = routing.endpoint; + message = (RequestT) reqBuilder.build(); + } else if (message instanceof ExecuteSqlRequest) { + ExecuteSqlRequest.Builder reqBuilder = ((ExecuteSqlRequest) message).toBuilder(); + maybeTrackReadOnlyBegin(reqBuilder.getTransaction()); + RoutingDecision routing = routeFromRequest(reqBuilder); + finder = routing.finder; + endpoint = routing.endpoint; + message = (RequestT) reqBuilder.build(); + } else if (message instanceof BeginTransactionRequest) { + BeginTransactionRequest.Builder reqBuilder = + ((BeginTransactionRequest) message).toBuilder(); + String databaseId = parentChannel.extractDatabaseIdFromSession(reqBuilder.getSession()); + if (databaseId != null) { + finder = parentChannel.getOrCreateChannelFinder(databaseId); + } + if (finder != null && reqBuilder.hasMutationKey()) { + endpoint = finder.findServer(reqBuilder); + } + if (reqBuilder.hasOptions() && reqBuilder.getOptions().hasReadOnly()) { + isReadOnlyBegin = true; + readOnlyIsStrong = reqBuilder.getOptions().getReadOnly().getStrong(); + } else { + allowDefaultAffinity = true; + } + message = (RequestT) reqBuilder.build(); + } else if (message instanceof CommitRequest) { + CommitRequest request = (CommitRequest) message; + String databaseId = parentChannel.extractDatabaseIdFromSession(request.getSession()); + if (databaseId != null) { + finder = parentChannel.getOrCreateChannelFinder(databaseId); + } + CommitRequest.Builder reqBuilder = null; + if (finder != null && request.getMutationsCount() > 0) { + reqBuilder = request.toBuilder(); + endpoint = finder.fillRoutingHint(reqBuilder); + request = reqBuilder.build(); + } + if (!request.getTransactionId().isEmpty()) { + ChannelEndpoint affinityEndpoint = + parentChannel.affinityEndpoint(request.getTransactionId()); + if (affinityEndpoint != null) { + endpoint = affinityEndpoint; + } + transactionIdToClear = request.getTransactionId(); + } + if (reqBuilder != null) { + message = (RequestT) request; + } + } else if (message instanceof RollbackRequest) { + RollbackRequest request = (RollbackRequest) message; + if (!request.getTransactionId().isEmpty()) { + endpoint = parentChannel.affinityEndpoint(request.getTransactionId()); + transactionIdToClear = request.getTransactionId(); + } + } else { + throw new IllegalStateException( + "Only read, query, begin transaction, commit, and rollback requests are supported for" + + " key-aware calls."); + } + + if (endpoint == null) { + endpoint = parentChannel.endpointCache.defaultChannel(); + } + selectedEndpoint = endpoint; + this.channelFinder = finder; + + delegate = endpoint.getChannel().newCall(methodDescriptor, callOptions); + if (pendingMessageCompression != null) { + delegate.setMessageCompression(pendingMessageCompression); + pendingMessageCompression = null; + } + delegate.start(responseListener, headers); + drainPendingRequests(); + delegate.sendMessage(message); + if (pendingHalfClose) { + delegate.halfClose(); + } + } + } + + @Override + public void halfClose() { + ClientCall currentDelegate; + synchronized (lock) { + if (this.cancelledStatus != null) { + return; + } + if (delegate == null) { + pendingHalfClose = true; + return; + } + currentDelegate = delegate; + } + currentDelegate.halfClose(); + } + + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) { + ClientCall currentDelegate; + Listener listenerToClose = null; + io.grpc.Status statusToClose = null; + Metadata trailersToClose = null; + synchronized (lock) { + currentDelegate = delegate; + if (currentDelegate == null) { + cancelledStatus = io.grpc.Status.CANCELLED.withDescription(message).withCause(cause); + Metadata trailers = + cause == null ? new Metadata() : io.grpc.Status.trailersFromThrowable(cause); + cancelledTrailers = trailers == null ? new Metadata() : trailers; + if (responseListener != null) { + listenerToClose = responseListener; + statusToClose = cancelledStatus; + trailersToClose = cancelledTrailers; + } + } + } + if (currentDelegate != null) { + currentDelegate.cancel(message, cause); + } else if (listenerToClose != null) { + listenerToClose.onClose(statusToClose, trailersToClose); + } + } + + @Override + public void request(int numMessages) { + ClientCall currentDelegate; + synchronized (lock) { + if (cancelledStatus != null) { + return; + } + if (delegate != null) { + currentDelegate = delegate; + } else { + if (numMessages <= 0) { + return; + } + long updated = pendingRequests + numMessages; + if (updated < 0L) { + updated = Long.MAX_VALUE; + } + pendingRequests = updated; + return; + } + } + currentDelegate.request(numMessages); + } + + @Override + public boolean isReady() { + ClientCall currentDelegate; + synchronized (lock) { + currentDelegate = delegate; + } + if (currentDelegate == null) { + return false; + } + return currentDelegate.isReady(); + } + + @Override + public void setMessageCompression(boolean enabled) { + ClientCall currentDelegate; + synchronized (lock) { + if (cancelledStatus != null) { + return; + } + if (delegate != null) { + currentDelegate = delegate; + } else { + pendingMessageCompression = enabled; + return; + } + } + currentDelegate.setMessageCompression(enabled); + } + + private void drainPendingRequests() { + ClientCall currentDelegate = delegate; + if (currentDelegate == null) { + return; + } + long requests = pendingRequests; + pendingRequests = 0L; + while (requests > 0) { + int batch = requests > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) requests; + currentDelegate.request(batch); + requests -= batch; + } + } + + void maybeRecordAffinity(ByteString transactionId) { + parentChannel.recordAffinity(transactionId, selectedEndpoint, allowDefaultAffinity); + } + + void maybeClearAffinity() { + parentChannel.clearAffinity(transactionIdToClear); + } + + private void maybeTrackReadOnlyBegin(TransactionSelector selector) { + if (selector.getSelectorCase() == TransactionSelector.SelectorCase.BEGIN + && selector.getBegin().hasReadOnly()) { + isReadOnlyBegin = true; + readOnlyIsStrong = selector.getBegin().getReadOnly().getStrong(); + } + } + + private RoutingDecision routeFromRequest(ReadRequest.Builder reqBuilder) { + String databaseId = parentChannel.extractDatabaseIdFromSession(reqBuilder.getSession()); + ByteString transactionId = transactionIdFromSelector(reqBuilder.getTransaction()); + // Skip affinity for read-only transactions so each read routes independently. + boolean isReadOnly = parentChannel.isReadOnlyTransaction(transactionId); + ChannelEndpoint endpoint = isReadOnly ? null : parentChannel.affinityEndpoint(transactionId); + ChannelFinder finder = null; + if (databaseId != null) { + finder = parentChannel.getOrCreateChannelFinder(databaseId); + } + if (databaseId != null && endpoint == null) { + Boolean preferLeaderOverride = parentChannel.readOnlyPreferLeader(transactionId); + ChannelEndpoint routed = + preferLeaderOverride != null + ? finder.findServer(reqBuilder, preferLeaderOverride) + : finder.findServer(reqBuilder); + endpoint = routed; + } + return new RoutingDecision(finder, endpoint); + } + + private RoutingDecision routeFromRequest(ExecuteSqlRequest.Builder reqBuilder) { + String databaseId = parentChannel.extractDatabaseIdFromSession(reqBuilder.getSession()); + ByteString transactionId = transactionIdFromSelector(reqBuilder.getTransaction()); + // Skip affinity for read-only transactions so each query routes independently. + boolean isReadOnly = parentChannel.isReadOnlyTransaction(transactionId); + ChannelEndpoint endpoint = isReadOnly ? null : parentChannel.affinityEndpoint(transactionId); + ChannelFinder finder = null; + if (databaseId != null) { + finder = parentChannel.getOrCreateChannelFinder(databaseId); + } + if (databaseId != null && endpoint == null) { + Boolean preferLeaderOverride = parentChannel.readOnlyPreferLeader(transactionId); + ChannelEndpoint routed = + preferLeaderOverride != null + ? finder.findServer(reqBuilder, preferLeaderOverride) + : finder.findServer(reqBuilder); + endpoint = routed; + } + return new RoutingDecision(finder, endpoint); + } + } + + private static final class RoutingDecision { + @Nullable private final ChannelFinder finder; + @Nullable private final ChannelEndpoint endpoint; + + private RoutingDecision(@Nullable ChannelFinder finder, @Nullable ChannelEndpoint endpoint) { + this.finder = finder; + this.endpoint = endpoint; + } + } + + static final class KeyAwareClientCallListener + extends SimpleForwardingClientCallListener { + private final KeyAwareClientCall call; + + KeyAwareClientCallListener( + ClientCall.Listener responseListener, KeyAwareClientCall call) { + super(responseListener); + this.call = call; + } + + @Override + public void onMessage(ResponseT message) { + ByteString transactionId = null; + if (message instanceof PartialResultSet) { + PartialResultSet response = (PartialResultSet) message; + if (response.hasCacheUpdate() && call.channelFinder != null) { + call.channelFinder.update(response.getCacheUpdate()); + } + transactionId = transactionIdFromMetadata(response); + } else if (message instanceof ResultSet) { + ResultSet response = (ResultSet) message; + if (response.hasCacheUpdate() && call.channelFinder != null) { + call.channelFinder.update(response.getCacheUpdate()); + } + transactionId = transactionIdFromMetadata(response); + } else if (message instanceof Transaction) { + Transaction response = (Transaction) message; + if (response.hasCacheUpdate() && call.channelFinder != null) { + call.channelFinder.update(response.getCacheUpdate()); + } + transactionId = transactionIdFromTransaction(response); + } else if (message instanceof CommitResponse) { + CommitResponse response = (CommitResponse) message; + if (response.hasCacheUpdate() && call.channelFinder != null) { + call.channelFinder.update(response.getCacheUpdate()); + } + } + if (transactionId != null) { + if (call.isReadOnlyBegin) { + // Track the read-only transaction so subsequent reads skip affinity + // and route independently based on key-based routing. + call.parentChannel.trackReadOnlyTransaction(transactionId, call.readOnlyIsStrong); + } else if (!call.parentChannel.isReadOnlyTransaction(transactionId)) { + call.maybeRecordAffinity(transactionId); + } + } + super.onMessage(message); + } + + @Override + public void onClose(io.grpc.Status status, Metadata trailers) { + call.maybeClearAffinity(); + super.onClose(status, trailers); + } + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyAwareTransportChannelProvider.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyAwareTransportChannelProvider.java new file mode 100644 index 00000000000..438717c3c98 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyAwareTransportChannelProvider.java @@ -0,0 +1,129 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.auth.Credentials; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.Executor; +import java.util.concurrent.ScheduledExecutorService; +import javax.annotation.Nullable; + +final class KeyAwareTransportChannelProvider implements TransportChannelProvider { + private final InstantiatingGrpcChannelProvider baseProvider; + @Nullable private final ChannelEndpointCacheFactory endpointCacheFactory; + + KeyAwareTransportChannelProvider( + InstantiatingGrpcChannelProvider.Builder builder, + @Nullable ChannelEndpointCacheFactory endpointCacheFactory) { + this.baseProvider = builder.build(); + this.endpointCacheFactory = endpointCacheFactory; + } + + KeyAwareTransportChannelProvider( + InstantiatingGrpcChannelProvider baseProvider, + @Nullable ChannelEndpointCacheFactory endpointCacheFactory) { + this.baseProvider = baseProvider; + this.endpointCacheFactory = endpointCacheFactory; + } + + @Override + public GrpcTransportChannel getTransportChannel() throws IOException { + return GrpcTransportChannel.newBuilder() + .setManagedChannel(KeyAwareChannel.create(baseProvider, endpointCacheFactory)) + .build(); + } + + @Override + public String getTransportName() { + return baseProvider.getTransportName(); + } + + @Override + public boolean needsEndpoint() { + return baseProvider.needsEndpoint(); + } + + @Override + public boolean needsCredentials() { + return baseProvider.needsCredentials(); + } + + @Override + public boolean needsExecutor() { + return baseProvider.needsExecutor(); + } + + @Override + public boolean needsHeaders() { + return baseProvider.needsHeaders(); + } + + @Override + public boolean shouldAutoClose() { + return baseProvider.shouldAutoClose(); + } + + @Override + public TransportChannelProvider withEndpoint(String endpoint) { + return new KeyAwareTransportChannelProvider( + (InstantiatingGrpcChannelProvider) baseProvider.withEndpoint(endpoint), + endpointCacheFactory); + } + + @Override + public TransportChannelProvider withCredentials(Credentials credentials) { + return new KeyAwareTransportChannelProvider( + (InstantiatingGrpcChannelProvider) baseProvider.withCredentials(credentials), + endpointCacheFactory); + } + + @Override + public TransportChannelProvider withHeaders(Map headers) { + return new KeyAwareTransportChannelProvider( + (InstantiatingGrpcChannelProvider) baseProvider.withHeaders(headers), endpointCacheFactory); + } + + @Override + public TransportChannelProvider withPoolSize(int poolSize) { + return new KeyAwareTransportChannelProvider( + (InstantiatingGrpcChannelProvider) baseProvider.withPoolSize(poolSize), + endpointCacheFactory); + } + + @Override + public TransportChannelProvider withExecutor(ScheduledExecutorService executor) { + return new KeyAwareTransportChannelProvider( + (InstantiatingGrpcChannelProvider) baseProvider.withExecutor(executor), + endpointCacheFactory); + } + + @Override + public TransportChannelProvider withExecutor(Executor executor) { + return new KeyAwareTransportChannelProvider( + (InstantiatingGrpcChannelProvider) baseProvider.withExecutor(executor), + endpointCacheFactory); + } + + @Override + public boolean acceptsPoolSize() { + return baseProvider.acceptsPoolSize(); + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRangeCache.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRangeCache.java new file mode 100644 index 00000000000..bdbd495aa58 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRangeCache.java @@ -0,0 +1,688 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.hash.Hashing; +import com.google.protobuf.ByteString; +import com.google.spanner.v1.CacheUpdate; +import com.google.spanner.v1.DirectedReadOptions; +import com.google.spanner.v1.Group; +import com.google.spanner.v1.Range; +import com.google.spanner.v1.RoutingHint; +import com.google.spanner.v1.Tablet; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.NavigableMap; +import java.util.Objects; +import java.util.TreeMap; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.IntStream; + +/** Cache for routing information used by location-aware routing. */ +@InternalApi +public final class KeyRangeCache { + + private static final int MAX_LOCAL_REPLICA_DISTANCE = 5; + private static final int DEFAULT_MIN_ENTRIES_FOR_RANDOM_PICK = 1000; + + /** Determines how to handle ranges that span multiple splits. */ + public enum RangeMode { + /** Consider it a cache miss if the whole range is not in a single split. */ + COVERING_SPLIT, + /** If the range spans multiple splits, pick a random split when possible. */ + PICK_RANDOM + } + + private final ChannelEndpointCache endpointCache; + private final NavigableMap ranges = + new TreeMap<>(ByteString.unsignedLexicographicalComparator()); + private final Map groups = new HashMap<>(); + private final Object lock = new Object(); + private final AtomicLong accessCounter = new AtomicLong(); + + private volatile boolean deterministicRandom = false; + private volatile int minCacheEntriesForRandomPick = DEFAULT_MIN_ENTRIES_FOR_RANDOM_PICK; + + public KeyRangeCache(ChannelEndpointCache endpointCache) { + this.endpointCache = Objects.requireNonNull(endpointCache); + } + + @VisibleForTesting + void useDeterministicRandom() { + deterministicRandom = true; + } + + @VisibleForTesting + void setMinCacheEntriesForRandomPick(int value) { + minCacheEntriesForRandomPick = value; + } + + /** Applies cache updates. Tablets are processed inside group updates. */ + public void addRanges(CacheUpdate cacheUpdate) { + List newGroups = new ArrayList<>(); + synchronized (lock) { + for (Group groupIn : cacheUpdate.getGroupList()) { + newGroups.add(findOrInsertGroup(groupIn)); + } + for (Range rangeIn : cacheUpdate.getRangeList()) { + replaceRangeIfNewer(rangeIn); + } + for (CachedGroup group : newGroups) { + unref(group); + } + } + } + + /** + * Fills routing hint and returns the server to use, or null if no routing decision can be made. + */ + public ChannelEndpoint fillRoutingHint( + boolean preferLeader, + RangeMode rangeMode, + DirectedReadOptions directedReadOptions, + RoutingHint.Builder hintBuilder) { + ByteString key = hintBuilder.getKey(); + if (key.isEmpty()) { + return null; + } + + CachedRange targetRange; + synchronized (lock) { + targetRange = findRangeLocked(key, hintBuilder.getLimitKey(), rangeMode); + } + + if (targetRange == null || targetRange.group == null) { + return null; + } + + hintBuilder.setGroupUid(targetRange.group.groupUid); + hintBuilder.setSplitId(targetRange.splitId); + hintBuilder.setKey(targetRange.startKey); + hintBuilder.setLimitKey(targetRange.limitKey); + + return targetRange.group.fillRoutingHint(preferLeader, directedReadOptions, hintBuilder); + } + + public void clear() { + synchronized (lock) { + for (CachedRange range : ranges.values()) { + unref(range.group); + } + ranges.clear(); + groups.clear(); + } + } + + public int size() { + synchronized (lock) { + return ranges.size(); + } + } + + public void shrinkTo(int newSize) { + synchronized (lock) { + if (newSize <= 0) { + clear(); + return; + } + if (newSize >= ranges.size()) { + return; + } + + int numToShrink = ranges.size() - newSize; + int numToSample = Math.min(numToShrink * 2, ranges.size()); + List allRanges = new ArrayList<>(ranges.values()); + int[] sampleIndexes = sampleWithoutReplacement(allRanges.size(), numToSample); + Arrays.sort(sampleIndexes); + + List sampled = new ArrayList<>(numToSample); + for (int index : sampleIndexes) { + sampled.add(allRanges.get(index)); + } + sampled.sort(Comparator.comparingLong(range -> range.lastAccess)); + + for (int i = 0; i < numToShrink; i++) { + CachedRange range = sampled.get(i); + ranges.remove(range.limitKey); + unref(range.group); + } + } + } + + public String debugString() { + StringBuilder sb = new StringBuilder(); + synchronized (lock) { + for (Map.Entry entry : ranges.entrySet()) { + CachedRange cachedRange = entry.getValue(); + sb.append("Range[") + .append(cachedRange.startKey.toStringUtf8()) + .append("-") + .append(entry.getKey().toStringUtf8()) + .append("]: ") + .append(cachedRange.debugString()) + .append("\n"); + } + for (CachedGroup g : groups.values()) { + sb.append(g.debugString()).append("\n"); + } + } + return sb.toString(); + } + + private long accessTimeNow() { + return accessCounter.incrementAndGet(); + } + + private CachedRange findRangeLocked(ByteString key, ByteString limit, RangeMode mode) { + Map.Entry entry = ranges.higherEntry(key); + if (entry == null) { + return null; + } + + CachedRange firstRange = entry.getValue(); + boolean startInRange = compare(key, firstRange.startKey) >= 0; + if (limit.isEmpty()) { + if (startInRange) { + firstRange.lastAccess = accessTimeNow(); + return firstRange; + } + return null; + } + + boolean limitInRange = compare(limit, entry.getKey()) <= 0; + if (startInRange && limitInRange) { + firstRange.lastAccess = accessTimeNow(); + return firstRange; + } + if (mode == RangeMode.COVERING_SPLIT) { + return null; + } + + int total = 0; + boolean foundGap = !startInRange; + boolean hitEnd = false; + Map.Entry sampled = entry; + ByteString lastLimit = firstRange.startKey; + + Map.Entry current = entry; + while (current != null) { + CachedRange range = current.getValue(); + if (!lastLimit.equals(range.startKey)) { + foundGap = true; + if (compare(range.startKey, limit) >= 0) { + break; + } + } + total++; + if (uniformRandom(total, key, limit, range.startKey) == 0) { + sampled = current; + } + lastLimit = range.limitKey; + if (compare(lastLimit, limit) >= 0 || total >= minCacheEntriesForRandomPick) { + break; + } + Map.Entry next = ranges.higherEntry(current.getKey()); + if (next == null) { + hitEnd = true; + break; + } + current = next; + } + + if (hitEnd) { + foundGap = true; + } + + if (!foundGap || total >= minCacheEntriesForRandomPick) { + CachedRange selected = sampled.getValue(); + selected.lastAccess = accessTimeNow(); + return selected; + } + return null; + } + + private int uniformRandom(int n, ByteString seed1, ByteString seed2, ByteString seed3) { + if (deterministicRandom) { + ByteString combined = seed1.concat(seed2).concat(seed3); + int hash = Hashing.crc32c().hashBytes(combined.toByteArray()).asInt(); + long unsigned = Integer.toUnsignedLong(hash); + return (int) (unsigned % n); + } + return ThreadLocalRandom.current().nextInt(n); + } + + private int[] sampleWithoutReplacement(int populationSize, int sampleSize) { + int[] indexes = IntStream.range(0, populationSize).toArray(); + for (int i = 0; i < sampleSize; i++) { + int j = i + ThreadLocalRandom.current().nextInt(populationSize - i); + int tmp = indexes[i]; + indexes[i] = indexes[j]; + indexes[j] = tmp; + } + return Arrays.copyOf(indexes, sampleSize); + } + + private void replaceRangeIfNewer(Range rangeIn) { + ByteString startKey = rangeIn.getStartKey(); + ByteString limitKey = rangeIn.getLimitKey(); + + Map.Entry startEntry = ranges.higherEntry(startKey); + if (startEntry == null || compare(startEntry.getValue().startKey, limitKey) >= 0) { + CachedRange newRange = + new CachedRange( + startKey, + limitKey, + findAndRefGroup(rangeIn.getGroupUid()), + rangeIn.getSplitId(), + rangeIn.getGeneration(), + accessTimeNow()); + ranges.put(limitKey, newRange); + return; + } + + List overlapping = new ArrayList<>(); + for (Map.Entry entry = startEntry; + entry != null && compare(entry.getValue().startKey, limitKey) < 0; + entry = ranges.higherEntry(entry.getKey())) { + CachedRange existing = entry.getValue(); + int genCompare = compare(rangeIn.getGeneration(), existing.generation); + if (genCompare < 0 + || (genCompare == 0 + && startKey.equals(existing.startKey) + && limitKey.equals(existing.limitKey))) { + return; + } + overlapping.add(existing); + } + + for (CachedRange range : overlapping) { + ranges.remove(range.limitKey); + } + + CachedRange first = overlapping.get(0); + if (compare(first.startKey, startKey) < 0) { + CachedRange head = + new CachedRange( + first.startKey, + startKey, + refGroup(first.group), + first.splitId, + first.generation, + first.lastAccess); + ranges.put(head.limitKey, head); + } + + CachedRange newRange = + new CachedRange( + startKey, + limitKey, + findAndRefGroup(rangeIn.getGroupUid()), + rangeIn.getSplitId(), + rangeIn.getGeneration(), + accessTimeNow()); + ranges.put(limitKey, newRange); + + CachedRange last = overlapping.get(overlapping.size() - 1); + if (compare(last.limitKey, limitKey) > 0) { + CachedRange tail = + new CachedRange( + limitKey, + last.limitKey, + refGroup(last.group), + last.splitId, + last.generation, + last.lastAccess); + ranges.put(tail.limitKey, tail); + } + + for (CachedRange range : overlapping) { + unref(range.group); + } + } + + private CachedGroup findAndRefGroup(long groupUid) { + CachedGroup group = groups.get(groupUid); + if (group != null) { + group.refs++; + } + return group; + } + + private CachedGroup findOrInsertGroup(Group groupIn) { + CachedGroup group = groups.get(groupIn.getGroupUid()); + if (group == null) { + group = new CachedGroup(groupIn.getGroupUid()); + groups.put(groupIn.getGroupUid(), group); + } else { + group.refs++; + } + group.update(groupIn); + return group; + } + + private CachedGroup refGroup(CachedGroup group) { + if (group != null) { + group.refs++; + } + return group; + } + + private void unref(CachedGroup group) { + if (group == null) { + return; + } + if (--group.refs == 0) { + groups.remove(group.groupUid); + } + } + + private int compare(ByteString left, ByteString right) { + return ByteString.unsignedLexicographicalComparator().compare(left, right); + } + + /** Represents a single tablet within a group. */ + private class CachedTablet { + long tabletUid = 0; + ByteString incarnation = ByteString.EMPTY; + String serverAddress = ""; + int distance = 0; + boolean skip = false; + Tablet.Role role = Tablet.Role.ROLE_UNSPECIFIED; + String location = ""; + + ChannelEndpoint endpoint = null; + + void update(Tablet tabletIn) { + if (tabletUid > 0 && compare(incarnation, tabletIn.getIncarnation()) > 0) { + return; + } + + tabletUid = tabletIn.getTabletUid(); + incarnation = tabletIn.getIncarnation(); + distance = tabletIn.getDistance(); + skip = tabletIn.getSkip(); + role = tabletIn.getRole(); + location = tabletIn.getLocation(); + + if (!serverAddress.equals(tabletIn.getServerAddress())) { + serverAddress = tabletIn.getServerAddress(); + endpoint = null; + } + } + + boolean matches(DirectedReadOptions directedReadOptions) { + switch (directedReadOptions.getReplicasCase()) { + case INCLUDE_REPLICAS: + for (DirectedReadOptions.ReplicaSelection rs : + directedReadOptions.getIncludeReplicas().getReplicaSelectionsList()) { + if (matches(rs)) { + return true; + } + } + return false; + case EXCLUDE_REPLICAS: + for (DirectedReadOptions.ReplicaSelection rs : + directedReadOptions.getExcludeReplicas().getReplicaSelectionsList()) { + if (matches(rs)) { + return false; + } + } + return true; + case REPLICAS_NOT_SET: + default: + return distance <= MAX_LOCAL_REPLICA_DISTANCE; + } + } + + private boolean matches(DirectedReadOptions.ReplicaSelection selection) { + if (!selection.getLocation().isEmpty() && !selection.getLocation().equals(location)) { + return false; + } + switch (selection.getType()) { + case READ_WRITE: + return role == Tablet.Role.READ_WRITE || role == Tablet.Role.ROLE_UNSPECIFIED; + case READ_ONLY: + return role == Tablet.Role.READ_ONLY; + default: + return true; + } + } + + boolean shouldSkip(RoutingHint.Builder hintBuilder) { + if (skip || serverAddress.isEmpty() || (endpoint != null && !endpoint.isHealthy())) { + RoutingHint.SkippedTablet.Builder skipped = hintBuilder.addSkippedTabletUidBuilder(); + skipped.setTabletUid(tabletUid); + skipped.setIncarnation(incarnation); + return true; + } + return false; + } + + ChannelEndpoint pick(RoutingHint.Builder hintBuilder) { + hintBuilder.setTabletUid(tabletUid); + if (endpoint == null && !serverAddress.isEmpty()) { + endpoint = endpointCache.get(serverAddress); + } + return endpoint; + } + + String debugString() { + return tabletUid + + ":" + + serverAddress + + "@" + + incarnation + + "(location=" + + location + + ",role=" + + role + + ",distance=" + + distance + + (skip ? ",skip" : "") + + ")"; + } + } + + /** Represents a paxos group with its tablets. */ + private class CachedGroup { + final long groupUid; + ByteString generation = ByteString.EMPTY; + List tablets = new ArrayList<>(); + int leaderIndex = -1; + int refs = 1; + + CachedGroup(long groupUid) { + this.groupUid = groupUid; + } + + synchronized void update(Group groupIn) { + if (compare(groupIn.getGeneration(), generation) > 0) { + generation = groupIn.getGeneration(); + if (groupIn.getLeaderIndex() >= 0 && groupIn.getLeaderIndex() < groupIn.getTabletsCount()) { + leaderIndex = groupIn.getLeaderIndex(); + } else { + leaderIndex = -1; + } + } + + if (tablets.size() == groupIn.getTabletsCount()) { + boolean mismatch = false; + for (int t = 0; t < groupIn.getTabletsCount(); t++) { + if (tablets.get(t).tabletUid != groupIn.getTablets(t).getTabletUid()) { + mismatch = true; + break; + } + } + if (!mismatch) { + for (int t = 0; t < groupIn.getTabletsCount(); t++) { + tablets.get(t).update(groupIn.getTablets(t)); + } + return; + } + } + + Map tabletsByUid = new HashMap<>(tablets.size()); + for (CachedTablet tablet : tablets) { + tabletsByUid.put(tablet.tabletUid, tablet); + } + List newTablets = new ArrayList<>(groupIn.getTabletsCount()); + for (int t = 0; t < groupIn.getTabletsCount(); t++) { + Tablet tabletIn = groupIn.getTablets(t); + CachedTablet tablet = tabletsByUid.get(tabletIn.getTabletUid()); + if (tablet == null) { + tablet = new CachedTablet(); + } + tablet.update(tabletIn); + newTablets.add(tablet); + } + tablets = newTablets; + } + + ChannelEndpoint fillRoutingHint( + boolean preferLeader, + DirectedReadOptions directedReadOptions, + RoutingHint.Builder hintBuilder) { + boolean hasDirectedReadOptions = + directedReadOptions.getReplicasCase() + != DirectedReadOptions.ReplicasCase.REPLICAS_NOT_SET; + + // Fast path: pick a tablet while holding the lock. If the endpoint is already + // cached on the tablet, return it immediately without releasing the lock. + // If the endpoint needs to be created (blocking network dial), release the + // lock first so other threads are not blocked during channel creation. + CachedTablet selected; + synchronized (this) { + selected = + selectTabletLocked( + preferLeader, hasDirectedReadOptions, hintBuilder, directedReadOptions); + if (selected == null) { + return null; + } + if (selected.endpoint != null || selected.serverAddress.isEmpty()) { + return selected.pick(hintBuilder); + } + // Slow path: endpoint not yet created. Capture the address and release the + // lock before calling endpointCache.get(), which may block on network dial. + hintBuilder.setTabletUid(selected.tabletUid); + } + + String serverAddress = selected.serverAddress; + ChannelEndpoint endpoint = endpointCache.get(serverAddress); + + synchronized (this) { + // Only update if the tablet's address hasn't changed since we released the lock. + if (selected.endpoint == null && selected.serverAddress.equals(serverAddress)) { + selected.endpoint = endpoint; + } + // Re-set tabletUid with the latest value in case update() ran concurrently. + hintBuilder.setTabletUid(selected.tabletUid); + return selected.endpoint; + } + } + + private CachedTablet selectTabletLocked( + boolean preferLeader, + boolean hasDirectedReadOptions, + RoutingHint.Builder hintBuilder, + DirectedReadOptions directedReadOptions) { + if (preferLeader + && !hasDirectedReadOptions + && hasLeader() + && leader().distance <= MAX_LOCAL_REPLICA_DISTANCE + && !leader().shouldSkip(hintBuilder)) { + return leader(); + } + for (CachedTablet tablet : tablets) { + if (!tablet.matches(directedReadOptions)) { + continue; + } + if (tablet.shouldSkip(hintBuilder)) { + continue; + } + return tablet; + } + return null; + } + + boolean hasLeader() { + return leaderIndex >= 0 && leaderIndex < tablets.size(); + } + + CachedTablet leader() { + return tablets.get(leaderIndex); + } + + String debugString() { + StringBuilder sb = new StringBuilder(); + sb.append(groupUid).append(":["); + for (int i = 0; i < tablets.size(); i++) { + sb.append(tablets.get(i).debugString()); + if (hasLeader() && i == leaderIndex) { + sb.append(" (leader)"); + } + if (i < tablets.size() - 1) { + sb.append(", "); + } + } + sb.append("]@").append(generation.toStringUtf8()); + sb.append("#").append(refs); + return sb.toString(); + } + } + + /** Represents a cached range with its group and split information. */ + private static class CachedRange { + final ByteString startKey; + final ByteString limitKey; + final CachedGroup group; + final long splitId; + final ByteString generation; + long lastAccess; + + CachedRange( + ByteString startKey, + ByteString limitKey, + CachedGroup group, + long splitId, + ByteString generation, + long lastAccess) { + this.startKey = startKey; + this.limitKey = limitKey; + this.group = group; + this.splitId = splitId; + this.generation = generation; + this.lastAccess = lastAccess; + } + + String debugString() { + return (group != null ? group.groupUid : "null_group") + + "," + + splitId + + "@" + + (generation.isEmpty() ? "" : generation.toStringUtf8()) + + ",last_access=" + + lastAccess; + } + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRecipe.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRecipe.java new file mode 100644 index 00000000000..1e15b69bf97 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRecipe.java @@ -0,0 +1,865 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import com.google.protobuf.ByteString; +import com.google.protobuf.ListValue; +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import com.google.spanner.v1.KeyRange; +import com.google.spanner.v1.KeySet; +import com.google.spanner.v1.Mutation; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; +import java.time.format.ResolverStyle; +import java.util.ArrayList; +import java.util.Base64; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.concurrent.ThreadLocalRandom; +import java.util.function.BiFunction; +import java.util.stream.Collectors; + +@InternalApi +public final class KeyRecipe { + + // kInfinity is "\xff" - the largest single byte, used as a sentinel for ranges + private static final ByteString K_INFINITY = ByteString.copyFrom(new byte[] {(byte) 0xFF}); + + private enum Kind { + TAG, + VALUE, + INVALID + } + + private enum KeyType { + FULL_KEY, + PREFIX, + PREFIX_SUCCESSOR, + INDEX_KEY + } + + private enum EncodeState { + OK, + FAILED, + END_OF_KEYS + } + + private static final class Part { + private final Kind kind; + private final int tag; // if kind == TAG + private final com.google.spanner.v1.Type type; // if kind == VALUE + private final com.google.spanner.v1.KeyRecipe.Part.Order order; // if kind == VALUE + private final com.google.spanner.v1.KeyRecipe.Part.NullOrder nullOrder; // if kind == VALUE + private final String identifier; // if kind == VALUE + private final List structIdentifiers; // if kind == VALUE + private final Value constantValue; // if kind == VALUE and value is set + private final boolean random; // if kind == VALUE and random: true + + private Value constantValue() { + return constantValue; + } + + private boolean hasConstantValue() { + return constantValue != null; + } + + private Part( + Kind kind, + int tag, + com.google.spanner.v1.Type type, + com.google.spanner.v1.KeyRecipe.Part.Order order, + com.google.spanner.v1.KeyRecipe.Part.NullOrder nullOrder, + String identifier, + List structIdentifiers, + Value constantValue, + boolean random) { + this.kind = kind; + this.tag = tag; + this.type = type; + this.order = order; + this.nullOrder = nullOrder; + this.identifier = identifier; + this.structIdentifiers = structIdentifiers; + this.constantValue = constantValue; + this.random = random; + } + + private ResolvedValue resolveValue(BiFunction valueFinder, int index) { + if (hasConstantValue()) { + return ResolvedValue.ofValue(constantValue()); + } + Value value = valueFinder.apply(index, identifier == null ? "" : identifier); + if (value == null) { + return ResolvedValue.missing(); + } + if (structIdentifiers.isEmpty()) { + return ResolvedValue.ofValue(value); + } + Value current = value; + // structIdentifiers is a path of list indices into nested STRUCT values. + // STRUCT values are represented as ListValue in field order. + for (int structIndex : structIdentifiers) { + if (current.getKindCase() != Value.KindCase.LIST_VALUE + || structIndex < 0 + || structIndex >= current.getListValue().getValuesCount()) { + return ResolvedValue.failed(); + } + current = current.getListValue().getValues(structIndex); + } + return ResolvedValue.ofValue(current); + } + + private boolean shouldConsumeValueIndex() { + return !hasConstantValue() && !random; + } + + static Part fromProto(com.google.spanner.v1.KeyRecipe.Part partProto) { + if (partProto.getTag() != 0) { + if (partProto.getTag() < 0) { + return new Part(Kind.INVALID, 0, null, null, null, null, null, null, false); + } + return new Part(Kind.TAG, partProto.getTag(), null, null, null, null, null, null, false); + } + if (!partProto.hasType()) { + return new Part(Kind.INVALID, 0, null, null, null, null, null, null, false); + } + if (partProto.getOrder() != com.google.spanner.v1.KeyRecipe.Part.Order.ASCENDING + && partProto.getOrder() != com.google.spanner.v1.KeyRecipe.Part.Order.DESCENDING) { + return new Part(Kind.INVALID, 0, null, null, null, null, null, null, false); + } + if (partProto.getNullOrder() != com.google.spanner.v1.KeyRecipe.Part.NullOrder.NULLS_FIRST + && partProto.getNullOrder() != com.google.spanner.v1.KeyRecipe.Part.NullOrder.NULLS_LAST + && partProto.getNullOrder() != com.google.spanner.v1.KeyRecipe.Part.NullOrder.NOT_NULL) { + return new Part(Kind.INVALID, 0, null, null, null, null, null, null, false); + } + if (partProto.hasRandom() + && partProto.getType().getCode() != com.google.spanner.v1.TypeCode.INT64) { + return new Part(Kind.INVALID, 0, null, null, null, null, null, null, false); + } + + String identifier = partProto.hasIdentifier() ? partProto.getIdentifier() : null; + List structIdentifiers = new ArrayList<>(partProto.getStructIdentifiersList()); + + Value constantValue = partProto.hasValue() ? partProto.getValue() : null; + + return new Part( + Kind.VALUE, + 0, + partProto.getType(), + partProto.getOrder(), + partProto.getNullOrder(), + identifier, + structIdentifiers, + constantValue, + partProto.hasRandom()); + } + } + + private static void encodeRandomValuePart(Part part, UnsynchronizedByteArrayOutputStream out) { + long value = ThreadLocalRandom.current().nextLong(0, Long.MAX_VALUE); + boolean ascending = part.order == com.google.spanner.v1.KeyRecipe.Part.Order.ASCENDING; + if (ascending) { + SsFormat.appendInt64Increasing(out, value); + } else { + SsFormat.appendInt64Decreasing(out, value); + } + } + + private static final class ResolvedValue { + private final Value value; + private final boolean found; + private final boolean failed; + + private ResolvedValue(Value value, boolean found, boolean failed) { + this.value = value; + this.found = found; + this.failed = failed; + } + + private static ResolvedValue ofValue(Value value) { + return new ResolvedValue(value, true, false); + } + + private static ResolvedValue missing() { + return new ResolvedValue(null, false, false); + } + + private static ResolvedValue failed() { + return new ResolvedValue(null, false, true); + } + } + + private final List parts; + private final boolean isIndex; + + private KeyRecipe(List parts, boolean isIndex) { + this.parts = parts; + this.isIndex = isIndex; + } + + public static KeyRecipe create(com.google.spanner.v1.KeyRecipe in) { + if (in.getPartCount() == 0) { + throw new IllegalArgumentException("KeyRecipe must have at least one part."); + } + boolean isIndex = in.hasIndexName(); + List partsList = + in.getPartList().stream().map(Part::fromProto).collect(Collectors.toList()); + if (partsList.get(0).kind != Kind.TAG) { + throw new IllegalArgumentException("KeyRecipe must start with a tag."); + } + return new KeyRecipe(partsList, isIndex); + } + + private static void encodeNull(Part part, UnsynchronizedByteArrayOutputStream out) { + switch (part.nullOrder) { + case NULLS_FIRST: + SsFormat.appendNullOrderedFirst(out); + break; + case NULLS_LAST: + SsFormat.appendNullOrderedLast(out); + break; + case NOT_NULL: + throw new IllegalArgumentException("Key part cannot be NULL"); + default: + throw new IllegalArgumentException("Unknown null order: " + part.nullOrder); + } + } + + private static void encodeNotNull(Part part, UnsynchronizedByteArrayOutputStream out) { + switch (part.nullOrder) { + case NULLS_FIRST: + SsFormat.appendNotNullMarkerNullOrderedFirst(out); + break; + case NULLS_LAST: + SsFormat.appendNotNullMarkerNullOrderedLast(out); + break; + case NOT_NULL: + // No marker needed for NOT_NULL + break; + default: + throw new IllegalArgumentException("Unknown null order: " + part.nullOrder); + } + } + + private static void encodeSingleValuePart( + Part part, Value value, UnsynchronizedByteArrayOutputStream out) { + if (value.getKindCase() == Value.KindCase.NULL_VALUE) { + encodeNull(part, out); + return; + } + + // Validate type compatibility BEFORE encoding anything + validateValueType(part, value); + + // Now safe to encode the NOT_NULL marker + encodeNotNull(part, out); + + boolean isAscending = (part.order == com.google.spanner.v1.KeyRecipe.Part.Order.ASCENDING); + + switch (part.type.getCode()) { + case BOOL: + if (isAscending) { + SsFormat.appendBoolIncreasing(out, value.getBoolValue()); + } else { + SsFormat.appendBoolDecreasing(out, value.getBoolValue()); + } + break; + case INT64: + long intVal = Long.parseLong(value.getStringValue()); + if (isAscending) { + SsFormat.appendInt64Increasing(out, intVal); + } else { + SsFormat.appendInt64Decreasing(out, intVal); + } + break; + case FLOAT64: + double dblVal; + if (value.getKindCase() == Value.KindCase.STRING_VALUE) { + // Handle special float values like Infinity, -Infinity, NaN + String strVal = value.getStringValue(); + if ("Infinity".equals(strVal)) { + dblVal = Double.POSITIVE_INFINITY; + } else if ("-Infinity".equals(strVal)) { + dblVal = Double.NEGATIVE_INFINITY; + } else if ("NaN".equals(strVal)) { + dblVal = Double.NaN; + } else { + throw new IllegalArgumentException("Invalid FLOAT64 string: " + strVal); + } + } else { + dblVal = value.getNumberValue(); + } + if (isAscending) { + SsFormat.appendDoubleIncreasing(out, dblVal); + } else { + SsFormat.appendDoubleDecreasing(out, dblVal); + } + break; + case STRING: + if (isAscending) { + SsFormat.appendStringIncreasing(out, value.getStringValue()); + } else { + SsFormat.appendStringDecreasing(out, value.getStringValue()); + } + break; + case BYTES: + byte[] bytesDecoded = Base64.getDecoder().decode(value.getStringValue()); + if (isAscending) { + SsFormat.appendBytesIncreasing(out, bytesDecoded); + } else { + SsFormat.appendBytesDecreasing(out, bytesDecoded); + } + break; + case TIMESTAMP: + String tsStr = value.getStringValue(); + long[] parsed = parseTimestamp(tsStr); + byte[] encoded = SsFormat.encodeTimestamp(parsed[0], (int) parsed[1]); + if (isAscending) { + SsFormat.appendBytesIncreasing(out, encoded); + } else { + SsFormat.appendBytesDecreasing(out, encoded); + } + break; + case DATE: + String dateStr = value.getStringValue(); + int daysSinceEpoch = parseDate(dateStr); + if (isAscending) { + SsFormat.appendInt64Increasing(out, daysSinceEpoch); + } else { + SsFormat.appendInt64Decreasing(out, daysSinceEpoch); + } + break; + case UUID: + String uuidStr = value.getStringValue(); + long[] parsedUuid = parseUuid(uuidStr); + byte[] encodedUuid = SsFormat.encodeUuid(parsedUuid[0], parsedUuid[1]); + if (isAscending) { + SsFormat.appendBytesIncreasing(out, encodedUuid); + } else { + SsFormat.appendBytesDecreasing(out, encodedUuid); + } + break; + case ENUM: + // ENUM values are sent as string representation of the enum number + long enumVal = Long.parseLong(value.getStringValue()); + if (isAscending) { + SsFormat.appendInt64Increasing(out, enumVal); + } else { + SsFormat.appendInt64Decreasing(out, enumVal); + } + break; + case NUMERIC: + case TYPE_CODE_UNSPECIFIED: + case ARRAY: + case STRUCT: + case PROTO: + case UNRECOGNIZED: + default: + throw new IllegalArgumentException( + "Unsupported type code for ssformat encoding: " + part.type.getCode()); + } + } + + private static void validateValueType(Part part, Value value) { + switch (part.type.getCode()) { + case BOOL: + if (value.getKindCase() != Value.KindCase.BOOL_VALUE) { + throw new IllegalArgumentException("Type mismatch for BOOL."); + } + break; + case INT64: + if (value.getKindCase() != Value.KindCase.STRING_VALUE) { + throw new IllegalArgumentException("Type mismatch for INT64, expecting decimal string."); + } + // Also validate it's a valid integer + try { + Long.parseLong(value.getStringValue()); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("Invalid INT64 string: " + value.getStringValue(), e); + } + break; + case FLOAT64: + if (value.getKindCase() != Value.KindCase.NUMBER_VALUE + && value.getKindCase() != Value.KindCase.STRING_VALUE) { + throw new IllegalArgumentException("Type mismatch for FLOAT64."); + } + if (value.getKindCase() == Value.KindCase.STRING_VALUE) { + String strVal = value.getStringValue(); + if (!"Infinity".equals(strVal) && !"-Infinity".equals(strVal) && !"NaN".equals(strVal)) { + throw new IllegalArgumentException("Invalid FLOAT64 string: " + strVal); + } + } + break; + case STRING: + if (value.getKindCase() != Value.KindCase.STRING_VALUE) { + throw new IllegalArgumentException("Type mismatch for STRING."); + } + break; + case BYTES: + if (value.getKindCase() != Value.KindCase.STRING_VALUE) { + throw new IllegalArgumentException("Type mismatch for BYTES, expecting base64 string."); + } + // Validate base64 + try { + Base64.getDecoder().decode(value.getStringValue()); + } catch (IllegalArgumentException e) { + throw new IllegalArgumentException("Invalid base64 for BYTES type.", e); + } + break; + case TIMESTAMP: + if (value.getKindCase() != Value.KindCase.STRING_VALUE) { + throw new IllegalArgumentException("Type mismatch for TIMESTAMP."); + } + // Validate timestamp format: must end with Z (UTC) and be RFC3339 + validateTimestamp(value.getStringValue()); + break; + case DATE: + if (value.getKindCase() != Value.KindCase.STRING_VALUE) { + throw new IllegalArgumentException("Type mismatch for DATE."); + } + // Validate date format: YYYY-MM-DD, exactly 10 chars + validateDate(value.getStringValue()); + break; + case UUID: + if (value.getKindCase() != Value.KindCase.STRING_VALUE) { + throw new IllegalArgumentException("Type mismatch for UUID."); + } + // Validate UUID format + validateUuid(value.getStringValue()); + break; + case ENUM: + if (value.getKindCase() != Value.KindCase.STRING_VALUE) { + throw new IllegalArgumentException("Type mismatch for ENUM, expecting string."); + } + // Validate it's a valid integer string + try { + Long.parseLong(value.getStringValue()); + } catch (NumberFormatException e) { + throw new IllegalArgumentException( + "Invalid ENUM string (expecting number): " + value.getStringValue(), e); + } + break; + case NUMERIC: + case TYPE_CODE_UNSPECIFIED: + case ARRAY: + case STRUCT: + case PROTO: + case UNRECOGNIZED: + default: + throw new IllegalArgumentException( + "Unsupported type code for ssformat encoding: " + part.type.getCode()); + } + } + + private static void validateTimestamp(String ts) { + parseTimestamp(ts); + } + + private static long[] parseTimestamp(String ts) { + if (!ts.endsWith("Z")) { + throw new IllegalArgumentException("Invalid TIMESTAMP string: " + ts); + } + String withoutZ = ts.substring(0, ts.length() - 1); + int tIndex = withoutZ.indexOf('T'); + if (tIndex <= 0 || tIndex == withoutZ.length() - 1) { + throw new IllegalArgumentException("Invalid TIMESTAMP string: " + ts); + } + + String datePart = withoutZ.substring(0, tIndex); + String timePart = withoutZ.substring(tIndex + 1); + LocalDate date; + try { + date = LocalDate.parse(datePart, DATE_FORMATTER); + } catch (DateTimeParseException e) { + throw new IllegalArgumentException("Invalid TIMESTAMP string: " + ts, e); + } + + int nanos = 0; + String timeMain = timePart; + int dotIndex = timePart.indexOf('.'); + if (dotIndex >= 0) { + timeMain = timePart.substring(0, dotIndex); + String fracStr = timePart.substring(dotIndex + 1); + if (fracStr.isEmpty()) { + throw new IllegalArgumentException("Invalid TIMESTAMP string: " + ts); + } + for (int i = 0; i < fracStr.length(); i++) { + char c = fracStr.charAt(i); + if (c < '0' || c > '9') { + throw new IllegalArgumentException("Invalid TIMESTAMP string: " + ts); + } + } + while (fracStr.length() < 9) { + fracStr = fracStr + "0"; + } + if (fracStr.length() > 9) { + fracStr = fracStr.substring(0, 9); + } + nanos = Integer.parseInt(fracStr); + } + + String[] timeParts = timeMain.split(":"); + if (timeParts.length != 3) { + throw new IllegalArgumentException("Invalid TIMESTAMP string: " + ts); + } + int hour; + int minute; + int second; + try { + hour = Integer.parseInt(timeParts[0]); + minute = Integer.parseInt(timeParts[1]); + second = Integer.parseInt(timeParts[2]); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("Invalid TIMESTAMP string: " + ts, e); + } + if (hour < 0 || hour > 23 || minute < 0 || minute > 59 || second < 0 || second > 59) { + throw new IllegalArgumentException("Invalid TIMESTAMP string: " + ts); + } + + long seconds = date.toEpochDay() * 86400L + hour * 3600L + minute * 60L + second; + return new long[] {seconds, nanos}; + } + + private static final DateTimeFormatter DATE_FORMATTER = + DateTimeFormatter.ofPattern("uuuu-MM-dd").withResolverStyle(ResolverStyle.STRICT); + + private static void validateDate(String dateStr) { + parseDate(dateStr); + } + + private static int parseDate(String dateStr) { + try { + LocalDate date = LocalDate.parse(dateStr, DATE_FORMATTER); + return (int) date.toEpochDay(); + } catch (DateTimeParseException e) { + throw new IllegalArgumentException("Invalid DATE string: " + dateStr, e); + } + } + + private static void validateUuid(String uuid) { + parseUuid(uuid); + // parseUuid throws if invalid + } + + private static long[] parseUuid(String uuid) { + String originalUuid = uuid; + + // Handle optional braces + if (uuid.startsWith("{")) { + if (!uuid.endsWith("}")) { + throw new IllegalArgumentException("Invalid UUID string: " + originalUuid); + } + uuid = uuid.substring(1, uuid.length() - 1); + } + + // Minimum 36 characters required (standard UUID format: 8-4-4-4-12) + if (uuid.length() < 36) { + throw new IllegalArgumentException("Invalid UUID string: " + originalUuid); + } + + // Check for leading hyphen + if (uuid.startsWith("-")) { + throw new IllegalArgumentException("Invalid UUID string: " + originalUuid); + } + + // Parse 32 hex digits (ignoring hyphens in between) + long high = 0; + long low = 0; + int hexCount = 0; + + for (int i = 0; i < uuid.length(); i++) { + char c = uuid.charAt(i); + if (c == '-') { + continue; // Skip hyphens + } + int digit = hexDigit(c); + if (digit < 0) { + throw new IllegalArgumentException("Invalid UUID string: " + originalUuid); + } + if (hexCount < 16) { + high = (high << 4) | digit; + } else { + low = (low << 4) | digit; + } + hexCount++; + } + + if (hexCount != 32) { + throw new IllegalArgumentException("Invalid UUID string: " + originalUuid); + } + + // After parsing, verify there are no trailing characters + // (uuid must be exactly consumed) + if (uuid.length() > 36) { + throw new IllegalArgumentException("Invalid UUID string: " + originalUuid); + } + + return new long[] {high, low}; + } + + private static int hexDigit(char c) { + if (c >= '0' && c <= '9') return c - '0'; + if (c >= 'a' && c <= 'f') return 10 + (c - 'a'); + if (c >= 'A' && c <= 'F') return 10 + (c - 'A'); + return -1; + } + + private TargetRange encodeKeyInternal( + BiFunction valueFinder, KeyType keyType) { + UnsynchronizedByteArrayOutputStream ssKey = new UnsynchronizedByteArrayOutputStream(); + int valueIdx = 0; + EncodeState state = EncodeState.OK; + int p = 0; + for (; p < parts.size(); ++p) { + final Part part = parts.get(p); + if (part.kind == Kind.TAG) { + SsFormat.appendCompositeTag(ssKey, part.tag); + } else if (part.kind == Kind.VALUE) { + if (part.random) { + encodeRandomValuePart(part, ssKey); + continue; + } + + int currentIndex = valueIdx; + if (part.shouldConsumeValueIndex()) { + valueIdx++; + } + ResolvedValue resolved = part.resolveValue(valueFinder, currentIndex); + if (resolved.failed) { + state = EncodeState.FAILED; + break; + } + if (!resolved.found) { + state = part.shouldConsumeValueIndex() ? EncodeState.END_OF_KEYS : EncodeState.FAILED; + break; + } + try { + encodeSingleValuePart(part, resolved.value, ssKey); + } catch (IllegalArgumentException e) { + state = EncodeState.FAILED; + break; + } + } else { + state = EncodeState.FAILED; + break; + } + } + + ByteString start = ByteString.copyFrom(ssKey.toByteArray()); + ByteString limit = ByteString.EMPTY; + boolean approximate = false; + + if (p == parts.size() || (keyType != KeyType.FULL_KEY && state == EncodeState.END_OF_KEYS)) { + if (keyType == KeyType.PREFIX_SUCCESSOR) { + start = SsFormat.makePrefixSuccessor(start); + } else if (keyType == KeyType.INDEX_KEY) { + limit = SsFormat.makePrefixSuccessor(start); + } + } else { + approximate = true; + limit = SsFormat.makePrefixSuccessor(start); + } + return new TargetRange(start, limit, approximate); + } + + public TargetRange keyToTargetRange(ListValue in) { + return encodeKeyInternal( + (index, identifier) -> { + if (index < 0 || index >= in.getValuesCount()) { + return null; + } + return in.getValues(index); + }, + isIndex ? KeyType.INDEX_KEY : KeyType.FULL_KEY); + } + + public TargetRange keyRangeToTargetRange(KeyRange in) { + TargetRange start; + switch (in.getStartKeyTypeCase()) { + case START_CLOSED: + start = + encodeKeyInternal( + (index, id) -> { + if (index < 0 || index >= in.getStartClosed().getValuesCount()) { + return null; + } + return in.getStartClosed().getValues(index); + }, + KeyType.PREFIX); + break; + case START_OPEN: + start = + encodeKeyInternal( + (index, id) -> { + if (index < 0 || index >= in.getStartOpen().getValuesCount()) { + return null; + } + return in.getStartOpen().getValues(index); + }, + KeyType.PREFIX_SUCCESSOR); + break; + default: + start = encodeKeyInternal((index, id) -> null, KeyType.PREFIX); + start.approximate = true; + break; + } + + TargetRange limit; + switch (in.getEndKeyTypeCase()) { + case END_CLOSED: + limit = + encodeKeyInternal( + (index, id) -> { + if (index < 0 || index >= in.getEndClosed().getValuesCount()) { + return null; + } + return in.getEndClosed().getValues(index); + }, + KeyType.PREFIX_SUCCESSOR); + break; + case END_OPEN: + limit = + encodeKeyInternal( + (index, id) -> { + if (index < 0 || index >= in.getEndOpen().getValuesCount()) { + return null; + } + return in.getEndOpen().getValues(index); + }, + KeyType.PREFIX); + break; + default: + limit = encodeKeyInternal((index, id) -> null, KeyType.PREFIX_SUCCESSOR); + limit.approximate = true; + break; + } + ByteString limitKey = limit.approximate ? limit.limit : limit.start; + return new TargetRange(start.start, limitKey, start.approximate || limit.approximate); + } + + public TargetRange keySetToTargetRange(KeySet in) { + if (in.getAll()) { + return keyRangeToTargetRange( + KeyRange.newBuilder() + .setStartClosed(ListValue.getDefaultInstance()) + .setEndClosed(ListValue.getDefaultInstance()) + .build()); + } + if (in.getRangesCount() == 0) { + if (in.getKeysCount() == 0) { + return new TargetRange(ByteString.EMPTY, K_INFINITY, true); + } else if (in.getKeysCount() == 1) { + return keyToTargetRange(in.getKeys(0)); + } + } + + TargetRange target = new TargetRange(K_INFINITY, ByteString.EMPTY, false); + for (ListValue key : in.getKeysList()) { + target.mergeFrom(keyToTargetRange(key)); + } + for (KeyRange range : in.getRangesList()) { + target.mergeFrom(keyRangeToTargetRange(range)); + } + return target; + } + + public TargetRange queryParamsToTargetRange(Struct in) { + // toLowerCase(Locale.ROOT) is safe for query parameter names, even for non-ASCII + // characters such as the Turkish upper-case İ (U+0130). Query parameter names cannot + // be quoted in Spanner SQL (the @paramName syntax imposes an unquoted identifier + // grammar), so both the identifier sent by the server in the KeyRecipe and the + // parameter name bound by the user must follow the same syntax rules. Applying the + // same Locale.ROOT case-folding to both sides guarantees a consistent match. + // If the server were to normalize identifiers differently, the only consequence is + // a routing miss and graceful fallback to the default endpoint — not a query failure. + // + // Sort field names before inserting into the map so that when two param names + // collide after case-folding (e.g. "Id" vs "ID") the winner is deterministic, + // matching the Go implementation. + List fieldNames = new ArrayList<>(in.getFieldsMap().keySet()); + Collections.sort(fieldNames); + final Map lowercaseFields = new HashMap<>(fieldNames.size()); + for (String fieldName : fieldNames) { + lowercaseFields.put(fieldName.toLowerCase(Locale.ROOT), in.getFieldsMap().get(fieldName)); + } + return encodeKeyInternal( + (index, identifier) -> lowercaseFields.get(identifier.toLowerCase(Locale.ROOT)), + KeyType.FULL_KEY); + } + + public TargetRange mutationToTargetRange(Mutation in) { + TargetRange target = new TargetRange(K_INFINITY, ByteString.EMPTY, false); + + switch (in.getOperationCase()) { + case INSERT: + case UPDATE: + case INSERT_OR_UPDATE: + case REPLACE: + final Mutation.Write write = getWrite(in); + for (ListValue values : write.getValuesList()) { + target.mergeFrom( + encodeKeyInternal( + (index, id) -> { + int colIndex = write.getColumnsList().indexOf(id); + if (colIndex == -1 || colIndex >= values.getValuesCount()) { + return null; + } + return values.getValues(colIndex); + }, + KeyType.FULL_KEY)); + } + break; + case DELETE: + target.mergeFrom(keySetToTargetRange(in.getDelete().getKeySet())); + break; + case SEND: + target.mergeFrom(keyToTargetRange(in.getSend().getKey())); + break; + case ACK: + target.mergeFrom(keyToTargetRange(in.getAck().getKey())); + break; + default: + break; + } + + if (target.start.equals(K_INFINITY)) { + target = new TargetRange(ByteString.EMPTY, K_INFINITY, true); + } + return target; + } + + private Mutation.Write getWrite(Mutation in) { + switch (in.getOperationCase()) { + case INSERT: + return in.getInsert(); + case UPDATE: + return in.getUpdate(); + case INSERT_OR_UPDATE: + return in.getInsertOrUpdate(); + case REPLACE: + return in.getReplace(); + default: + throw new IllegalArgumentException("Mutation is not a write operation"); + } + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRecipeCache.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRecipeCache.java new file mode 100644 index 00000000000..1e0857108b2 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRecipeCache.java @@ -0,0 +1,377 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.google.common.collect.ImmutableList; +import com.google.common.hash.Hasher; +import com.google.common.hash.Hashing; +import com.google.protobuf.ByteString; +import com.google.protobuf.Value; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.Mutation; +import com.google.spanner.v1.ReadRequest; +import com.google.spanner.v1.RecipeList; +import com.google.spanner.v1.RoutingHint; +import com.google.spanner.v1.Type; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicLong; +import java.util.logging.Logger; + +@InternalApi +public final class KeyRecipeCache { + // Best-effort routing cache; compute calls are intentionally unsynchronized and may race with + // updates. Requests still succeed without routing hints when data is stale. + private static final Logger logger = Logger.getLogger(KeyRecipeCache.class.getName()); + private static final long DEFAULT_SCHEMA_RECIPE_CACHE_SIZE = 1000; + private static final long DEFAULT_PREPARED_QUERY_CACHE_SIZE = 1000; + private static final long DEFAULT_PREPARED_READ_CACHE_SIZE = 1000; + + @VisibleForTesting + static long fingerprint(ReadRequest req) { + Hasher hasher = Hashing.goodFastHash(64).newHasher(); + hasher.putString(req.getTable(), StandardCharsets.UTF_8); + hasher.putString(req.getIndex(), StandardCharsets.UTF_8); + hasher.putInt(req.getColumnsCount()); + for (String column : req.getColumnsList()) { + hasher.putString(column, StandardCharsets.UTF_8); + } + return hasher.hash().asLong(); + } + + @VisibleForTesting + static long fingerprint(ExecuteSqlRequest req) { + Hasher hasher = Hashing.goodFastHash(64).newHasher(); + hasher.putString(req.getSql(), StandardCharsets.UTF_8); + + List paramNames = new ArrayList<>(req.getParams().getFieldsMap().keySet()); + paramNames.sort(Comparator.naturalOrder()); + for (String name : paramNames) { + hasher.putString(name, StandardCharsets.UTF_8); + if (req.getParamTypesMap().containsKey(name)) { + hasher.putBytes(req.getParamTypesMap().get(name).toByteArray()); + } else { + Value value = req.getParams().getFieldsMap().get(name); + hasher.putInt(value.getKindCase().getNumber()); + } + } + + hasher.putBytes(req.getQueryOptions().toByteArray()); + return hasher.hash().asLong(); + } + + private final AtomicLong nextOperationUid = new AtomicLong(1); + private volatile ByteString schemaGeneration = ByteString.EMPTY; + + private final Cache schemaRecipes = + CacheBuilder.newBuilder().maximumSize(DEFAULT_SCHEMA_RECIPE_CACHE_SIZE).build(); + private final Cache queryRecipes = + CacheBuilder.newBuilder().maximumSize(DEFAULT_PREPARED_QUERY_CACHE_SIZE).build(); + private final Cache preparedReads = + CacheBuilder.newBuilder().maximumSize(DEFAULT_PREPARED_READ_CACHE_SIZE).build(); + private final Cache preparedQueries = + CacheBuilder.newBuilder().maximumSize(DEFAULT_PREPARED_QUERY_CACHE_SIZE).build(); + + public KeyRecipeCache() {} + + private static V getIfPresent(Cache cache, K key) { + return cache.getIfPresent(key); + } + + @VisibleForTesting + static int getPreparedReadCacheSize(KeyRecipeCache cache) { + return (int) cache.preparedReads.size(); + } + + @VisibleForTesting + static int getPreparedQueryCacheSize(KeyRecipeCache cache) { + return (int) cache.preparedQueries.size(); + } + + /** + * Applies recipes from a server CacheUpdate. + * + *

This is expected to be called only when responses include new recipes, not on every request. + * It is synchronized to atomically update schema generation and cache contents. + */ + public synchronized void addRecipes(RecipeList recipeList) { + int cmp = + ByteString.unsignedLexicographicalComparator() + .compare(recipeList.getSchemaGeneration(), schemaGeneration); + if (cmp < 0) { + return; + } + if (cmp > 0) { + schemaGeneration = recipeList.getSchemaGeneration(); + schemaRecipes.invalidateAll(); + queryRecipes.invalidateAll(); + } + + int failedCount = 0; + IllegalArgumentException failureExample = null; + for (com.google.spanner.v1.KeyRecipe recipeProto : recipeList.getRecipeList()) { + try { + KeyRecipe recipe = KeyRecipe.create(recipeProto); + if (recipeProto.hasTableName()) { + schemaRecipes.put(recipeProto.getTableName(), recipe); + } else if (recipeProto.hasIndexName()) { + schemaRecipes.put(recipeProto.getIndexName(), recipe); + } else if (recipeProto.hasOperationUid()) { + queryRecipes.put(recipeProto.getOperationUid(), recipe); + } + } catch (IllegalArgumentException e) { + failedCount++; + if (failureExample == null) { + failureExample = e; + } + } + } + if (failedCount > 0) { + logger.warning( + "Failed to add " + failedCount + " recipes, example: " + failureExample.getMessage()); + } + } + + public void computeKeys(ReadRequest.Builder reqBuilder) { + long reqFp = fingerprint(reqBuilder.buildPartial()); + + RoutingHint.Builder hintBuilder = reqBuilder.getRoutingHintBuilder(); + applySchemaGeneration(hintBuilder); + + PreparedRead preparedRead = getIfPresent(preparedReads, reqFp); + if (preparedRead == null) { + preparedRead = PreparedRead.fromRequest(reqBuilder.buildPartial()); + preparedRead.operationUid = nextOperationUid.getAndIncrement(); + preparedReads.put(reqFp, preparedRead); + } else if (!preparedRead.matches(reqBuilder.buildPartial())) { + logger.fine("Fingerprint collision for ReadRequest: " + reqFp); + return; + } + + hintBuilder.setOperationUid(preparedRead.operationUid); + String recipeKey = reqBuilder.getTable(); + if (!reqBuilder.getIndex().isEmpty()) { + recipeKey = reqBuilder.getIndex(); + } + + KeyRecipe recipe = getIfPresent(schemaRecipes, recipeKey); + if (recipe == null) { + logger.fine("Schema recipe not found for: " + recipeKey); + return; + } + + try { + TargetRange target = recipe.keySetToTargetRange(reqBuilder.getKeySet()); + applyTargetRange(hintBuilder, target); + } catch (IllegalArgumentException e) { + logger.fine("Failed key encoding: " + e.getMessage()); + } + } + + public void computeKeys(ExecuteSqlRequest.Builder reqBuilder) { + long reqFp = fingerprint(reqBuilder.buildPartial()); + + RoutingHint.Builder hintBuilder = reqBuilder.getRoutingHintBuilder(); + applySchemaGeneration(hintBuilder); + + PreparedQuery preparedQuery = getIfPresent(preparedQueries, reqFp); + if (preparedQuery == null) { + preparedQuery = PreparedQuery.fromRequest(reqBuilder.buildPartial()); + preparedQuery.operationUid = nextOperationUid.getAndIncrement(); + preparedQueries.put(reqFp, preparedQuery); + } else if (!preparedQuery.matches(reqBuilder.buildPartial())) { + logger.fine("Fingerprint collision for ExecuteSqlRequest: " + reqFp); + return; + } + + hintBuilder.setOperationUid(preparedQuery.operationUid); + KeyRecipe recipe = getIfPresent(queryRecipes, preparedQuery.operationUid); + if (recipe == null) { + return; + } + + try { + TargetRange target = recipe.queryParamsToTargetRange(reqBuilder.getParams()); + applyTargetRange(hintBuilder, target); + } catch (IllegalArgumentException e) { + logger.fine("Failed query param encoding: " + e.getMessage()); + } + } + + void applySchemaGeneration(RoutingHint.Builder hintBuilder) { + if (!schemaGeneration.isEmpty()) { + hintBuilder.setSchemaGeneration(schemaGeneration); + } + } + + void applyTargetRange(RoutingHint.Builder hintBuilder, TargetRange target) { + hintBuilder.setKey(target.start); + if (!target.limit.isEmpty()) { + hintBuilder.setLimitKey(target.limit); + } + } + + public TargetRange mutationToTargetRange(Mutation mutation) { + if (mutation == null) { + return null; + } + String tableName = tableNameFromMutation(mutation); + if (tableName == null || tableName.isEmpty()) { + return null; + } + + KeyRecipe recipe = getIfPresent(schemaRecipes, tableName); + if (recipe == null) { + logger.fine("Schema recipe not found for mutation table: " + tableName); + return null; + } + + try { + return recipe.mutationToTargetRange(mutation); + } catch (IllegalArgumentException e) { + logger.fine("Failed mutation key encoding: " + e.getMessage()); + return null; + } + } + + private static String tableNameFromMutation(Mutation mutation) { + switch (mutation.getOperationCase()) { + case INSERT: + return mutation.getInsert().getTable(); + case UPDATE: + return mutation.getUpdate().getTable(); + case INSERT_OR_UPDATE: + return mutation.getInsertOrUpdate().getTable(); + case REPLACE: + return mutation.getReplace().getTable(); + case DELETE: + return mutation.getDelete().getTable(); + default: + return null; + } + } + + public synchronized void clear() { + schemaGeneration = ByteString.EMPTY; + preparedReads.invalidateAll(); + preparedQueries.invalidateAll(); + schemaRecipes.invalidateAll(); + queryRecipes.invalidateAll(); + } + + private static class PreparedRead { + final String table; + final ImmutableList columns; + long operationUid; // Not final, assigned after construction + + private PreparedRead(String table, List columns) { + this.table = table; + this.columns = ImmutableList.copyOf(columns); + } + + static PreparedRead fromRequest(ReadRequest req) { + return new PreparedRead(req.getTable(), req.getColumnsList()); + } + + boolean matches(ReadRequest req) { + if (!Objects.equals(table, req.getTable())) { + return false; + } + return columns.equals(req.getColumnsList()); + } + } + + private static final class PreparedQuery { + private final String sql; + private final ImmutableList params; + private final ExecuteSqlRequest.QueryOptions queryOptions; + private long operationUid; + + private PreparedQuery( + String sql, List params, ExecuteSqlRequest.QueryOptions queryOptions) { + this.sql = sql; + this.params = ImmutableList.copyOf(params); + this.queryOptions = queryOptions; + } + + private static PreparedQuery fromRequest(ExecuteSqlRequest req) { + List params = new ArrayList<>(); + for (Map.Entry entry : req.getParams().getFieldsMap().entrySet()) { + String name = entry.getKey(); + if (req.getParamTypesMap().containsKey(name)) { + params.add(Param.ofType(name, req.getParamTypesMap().get(name))); + } else { + params.add(Param.ofKind(name, entry.getValue().getKindCase())); + } + } + params.sort(Comparator.comparing(param -> param.name)); + return new PreparedQuery(req.getSql(), params, req.getQueryOptions()); + } + + private boolean matches(ExecuteSqlRequest req) { + if (!sql.equals(req.getSql())) { + return false; + } + if (params.size() != req.getParams().getFieldsCount()) { + return false; + } + for (Param param : params) { + Value value = req.getParams().getFieldsMap().get(param.name); + if (value == null) { + return false; + } + if (param.type != null) { + Type type = req.getParamTypesMap().get(param.name); + if (type == null || !type.equals(param.type)) { + return false; + } + } else if (param.kindCase != value.getKindCase()) { + return false; + } + } + return Objects.equals(queryOptions, req.getQueryOptions()); + } + } + + private static final class Param { + private final String name; + private final Type type; + private final Value.KindCase kindCase; + + private Param(String name, Type type, Value.KindCase kindCase) { + this.name = name; + this.type = type; + this.kindCase = kindCase; + } + + private static Param ofType(String name, Type type) { + return new Param(name, type, null); + } + + private static Param ofKind(String name, Value.KindCase kindCase) { + return new Param(name, null, kindCase); + } + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/RequestIdCreatorImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/RequestIdCreatorImpl.java new file mode 100644 index 00000000000..5904fa581fd --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/RequestIdCreatorImpl.java @@ -0,0 +1,43 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.cloud.spanner.XGoogSpannerRequestId; +import com.google.cloud.spanner.XGoogSpannerRequestId.RequestIdCreator; +import java.util.concurrent.atomic.AtomicLong; + +class RequestIdCreatorImpl implements RequestIdCreator { + private static final AtomicLong NEXT_CLIENT_ID = new AtomicLong(); + + private final long clientId = NEXT_CLIENT_ID.incrementAndGet(); + private final AtomicLong requestId = new AtomicLong(); + + @Override + public long getClientId() { + return this.clientId; + } + + @Override + public XGoogSpannerRequestId nextRequestId(long channelId) { + return XGoogSpannerRequestId.of(clientId, channelId, requestId.incrementAndGet(), 0); + } + + @Override + public void reset() { + requestId.set(0); + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/RequestIdInterceptor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/RequestIdInterceptor.java new file mode 100644 index 00000000000..ea7204301e3 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/RequestIdInterceptor.java @@ -0,0 +1,67 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static com.google.cloud.spanner.XGoogSpannerRequestId.REQUEST_ID_CALL_OPTIONS_KEY; +import static com.google.cloud.spanner.XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY; + +import com.google.cloud.grpc.GcpManagedChannel; +import com.google.cloud.spanner.XGoogSpannerRequestId; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; +import io.grpc.ForwardingClientCall; +import io.grpc.Metadata; +import io.grpc.Metadata.Key; +import io.grpc.MethodDescriptor; +import java.util.concurrent.atomic.AtomicLong; + +class RequestIdInterceptor implements ClientInterceptor { + static final CallOptions.Key ATTEMPT_KEY = CallOptions.Key.create("Attempt"); + private static final String RESPONSE_ENCODING_KEY_NAME = "x-response-encoding"; + private static final Key RESPONSE_ENCODING_KEY = + Key.of(RESPONSE_ENCODING_KEY_NAME, Metadata.ASCII_STRING_MARSHALLER); + + RequestIdInterceptor() {} + + @Override + public ClientCall interceptCall( + MethodDescriptor method, CallOptions callOptions, Channel next) { + return new ForwardingClientCall.SimpleForwardingClientCall( + next.newCall(method, callOptions)) { + @Override + public void start(Listener responseListener, Metadata headers) { + XGoogSpannerRequestId requestId = callOptions.getOption(REQUEST_ID_CALL_OPTIONS_KEY); + if (requestId != null) { + // If grpc-gcp has set the actual channel ID, use it to update the request ID. + // This provides the real channel ID used after channel selection, especially + // important when dynamic channel pooling is enabled. + Integer gcpChannelId = callOptions.getOption(GcpManagedChannel.CHANNEL_ID_KEY); + if (gcpChannelId != null) { + // Channel IDs from grpc-gcp are 0-based, add 1 to match request ID convention + // where 0 means unknown and >0 means a known channel. + requestId.setChannelId(gcpChannelId + 1); + } + requestId.incrementAttempt(); + headers.put(REQUEST_ID_HEADER_KEY, requestId.getHeaderValue()); + } + super.start(responseListener, headers); + } + }; + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerErrorInterceptor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerErrorInterceptor.java index 549ea18a97f..9c3b2af2b06 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerErrorInterceptor.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerErrorInterceptor.java @@ -17,6 +17,8 @@ package com.google.cloud.spanner.spi.v1; import com.google.cloud.spanner.IsRetryableInternalError; +import com.google.cloud.spanner.XGoogSpannerRequestId; +import com.google.common.base.Strings; import com.google.rpc.BadRequest; import com.google.rpc.Help; import com.google.rpc.LocalizedMessage; @@ -35,6 +37,7 @@ import io.grpc.Status; import io.grpc.Status.Code; import io.grpc.protobuf.ProtoUtils; +import java.util.Objects; import java.util.logging.Level; import java.util.logging.Logger; @@ -70,7 +73,23 @@ public void start(Listener responseListener, Metadata headers) { new SimpleForwardingClientCallListener(responseListener) { @Override public void onClose(Status status, Metadata trailers) { + // Return quickly if there is no error. + if (status.isOk()) { + super.onClose(status, trailers); + return; + } try { + if (headers.containsKey(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY)) { + String requestId = headers.get(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY); + if (!Strings.isNullOrEmpty(requestId)) { + if (!trailers.containsKey(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY)) { + trailers.put( + XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY, + Objects.requireNonNull( + headers.get(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY))); + } + } + } // Translate INTERNAL errors that should be retried to a retryable error code. if (IsRetryableInternalError.INSTANCE.isRetryableInternalError(status)) { status = diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerInterceptorProvider.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerInterceptorProvider.java index ec7a4e54a03..e8d6c3ebddb 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerInterceptorProvider.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerInterceptorProvider.java @@ -64,6 +64,7 @@ public static SpannerInterceptorProvider createDefault( defaultInterceptorList.add( new LoggingInterceptor(Logger.getLogger(GapicSpannerRpc.class.getName()), Level.FINER)); defaultInterceptorList.add(new HeaderInterceptor(new SpannerRpcMetrics(openTelemetry))); + defaultInterceptorList.add(new RequestIdInterceptor()); return new SpannerInterceptorProvider(ImmutableList.copyOf(defaultInterceptorList)); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java index 4b5682bb2b0..7fd50f41c2d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java @@ -27,6 +27,8 @@ import com.google.cloud.spanner.BackupId; import com.google.cloud.spanner.Restore; import com.google.cloud.spanner.SpannerException; +import com.google.cloud.spanner.XGoogSpannerRequestId; +import com.google.cloud.spanner.XGoogSpannerRequestId.RequestIdCreator; import com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStub; import com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStubSettings; import com.google.cloud.spanner.admin.instance.v1.stub.InstanceAdminStub; @@ -37,6 +39,7 @@ import com.google.iam.v1.Policy; import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; +import com.google.protobuf.ByteString; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.spanner.admin.database.v1.Backup; @@ -78,8 +81,7 @@ public interface SpannerRpc extends ServiceRpc { /** Options passed in {@link SpannerRpc} methods to control how an RPC is issued. */ enum Option { - CHANNEL_HINT("Channel Hint"), - REQUEST_ID("Request Id"); + CHANNEL_HINT("Channel Hint"); private final String value; @@ -189,6 +191,13 @@ interface StreamingCall { void cancel(@Nullable String message); } + default RequestIdCreator getRequestIdCreator() { + throw new UnsupportedOperationException("Not implemented"); + } + + /** Clears any client-side affinity associated with the given transaction id. */ + default void clearTransactionAffinity(ByteString transactionId) {} + // Instance admin APIs. Paginated listInstanceConfigs(int pageSize, @Nullable String pageToken) throws SpannerException; @@ -389,6 +398,7 @@ StreamingCall read( ReadRequest request, ResultStreamConsumer consumer, @Nullable Map options, + XGoogSpannerRequestId requestId, boolean routeToLeader); /** Returns the retry settings for streaming query operations. */ @@ -428,7 +438,10 @@ ApiFuture executeQueryAsync( RetrySettings getPartitionedDmlRetrySettings(); ServerStream executeStreamingPartitionedDml( - ExecuteSqlRequest request, @Nullable Map options, Duration timeout); + ExecuteSqlRequest request, + @Nullable Map options, + XGoogSpannerRequestId requestId, + Duration timeout); ServerStream batchWriteAtLeastOnce( BatchWriteRequest request, @Nullable Map options); @@ -445,6 +458,7 @@ StreamingCall executeQuery( ExecuteSqlRequest request, ResultStreamConsumer consumer, @Nullable Map options, + XGoogSpannerRequestId requestId, boolean routeToLeader); ExecuteBatchDmlResponse executeBatchDml(ExecuteBatchDmlRequest build, Map options); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SsFormat.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SsFormat.java new file mode 100644 index 00000000000..0e2c12dd202 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SsFormat.java @@ -0,0 +1,322 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import com.google.protobuf.ByteString; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.charset.StandardCharsets; + +/** + * Sortable String Format encoding utilities for Spanner keys. + * + *

This class provides methods to encode various data types into a byte format that preserves + * lexicographic ordering. The encoding supports both increasing and decreasing sort orders. + */ +@InternalApi +public final class SsFormat { + + /** + * Makes the given key a prefix successor. This means that the returned key is the smallest + * possible key that is larger than the input key, and that does not have the input key as a + * prefix. + * + *

This is done by flipping the least significant bit of the last byte of the key. + * + * @param key The key to make a prefix successor. + * @return The prefix successor key. + */ + public static ByteString makePrefixSuccessor(ByteString key) { + if (key == null || key.isEmpty()) { + return ByteString.EMPTY; + } + byte[] bytes = key.toByteArray(); + bytes[bytes.length - 1] = (byte) (bytes[bytes.length - 1] | 1); + return ByteString.copyFrom(bytes); + } + + private SsFormat() {} + + private static final int IS_KEY = 0x80; + + // HeaderType enum values + // Unsigned integers (variable length 1-9 bytes) + private static final int TYPE_UINT_1 = 0; + private static final int TYPE_DECREASING_UINT_1 = 40; + + // Signed integers (variable length 1-8 bytes) + private static final int TYPE_NEG_INT_1 = 16; + private static final int TYPE_POS_INT_1 = 17; + private static final int TYPE_DECREASING_NEG_INT_1 = 48; + private static final int TYPE_DECREASING_POS_INT_1 = 49; + + // Strings + private static final int TYPE_STRING = 25; + private static final int TYPE_DECREASING_STRING = 57; + + // Nullable markers + private static final int TYPE_NULL_ORDERED_FIRST = 27; + private static final int TYPE_NULLABLE_NOT_NULL_NULL_ORDERED_FIRST = 28; + private static final int TYPE_NULLABLE_NOT_NULL_NULL_ORDERED_LAST = 59; + private static final int TYPE_NULL_ORDERED_LAST = 60; + + // Doubles (variable length 1-8 bytes, encoded as transformed int64) + private static final int TYPE_NEG_DOUBLE_1 = 73; + private static final int TYPE_POS_DOUBLE_1 = 74; + private static final int TYPE_DECREASING_NEG_DOUBLE_1 = 89; + private static final int TYPE_DECREASING_POS_DOUBLE_1 = 90; + + // EscapeChar enum values + private static final byte ASCENDING_ZERO_ESCAPE = (byte) 0xf0; + private static final byte ASCENDING_FF_ESCAPE = (byte) 0x10; + private static final byte SEP = (byte) 0x78; // 'x' + + // For AppendCompositeTag + private static final int K_OBJECT_EXISTENCE_TAG = 0x7e; + private static final int K_MAX_FIELD_TAG = 0xffff; + + // Offset to make negative timestamp seconds sort correctly + private static final long TIMESTAMP_SECONDS_OFFSET = 1L << 63; + + public static void appendCompositeTag(UnsynchronizedByteArrayOutputStream out, int tag) { + if (tag == K_OBJECT_EXISTENCE_TAG || tag <= 0 || tag > K_MAX_FIELD_TAG) { + throw new IllegalArgumentException("Invalid tag value: " + tag); + } + + if (tag < 16) { + // Short tag: 000 TTTT S (S is LSB of tag, but here tag is original, so S=0) + // Encodes as (tag << 1) + out.write((byte) (tag << 1)); + } else { + // Long tag + int shiftedTag = tag << 1; // LSB is 0 for prefix successor + if (shiftedTag < (1 << (5 + 8))) { // Original tag < 4096 + // Header: num_extra_bytes=1 (01xxxxx), P=payload bits from tag + // (1 << 5) is 00100000 + // (shiftedTag >> 8) are the 5 MSBs of the payload part of the tag + out.write((byte) ((1 << 5) | (shiftedTag >> 8))); + out.write((byte) (shiftedTag & 0xFF)); + } else { // Original tag >= 4096 and <= K_MAX_FIELD_TAG (65535) + // Header: num_extra_bytes=2 (10xxxxx) + // (2 << 5) is 01000000 + out.write((byte) ((2 << 5) | (shiftedTag >> 16))); + out.write((byte) ((shiftedTag >> 8) & 0xFF)); + out.write((byte) (shiftedTag & 0xFF)); + } + } + } + + public static void appendNullOrderedFirst(UnsynchronizedByteArrayOutputStream out) { + out.write((byte) (IS_KEY | TYPE_NULL_ORDERED_FIRST)); + out.write((byte) 0); + } + + public static void appendNullOrderedLast(UnsynchronizedByteArrayOutputStream out) { + out.write((byte) (IS_KEY | TYPE_NULL_ORDERED_LAST)); + out.write((byte) 0); + } + + public static void appendNotNullMarkerNullOrderedFirst(UnsynchronizedByteArrayOutputStream out) { + out.write((byte) (IS_KEY | TYPE_NULLABLE_NOT_NULL_NULL_ORDERED_FIRST)); + } + + public static void appendNotNullMarkerNullOrderedLast(UnsynchronizedByteArrayOutputStream out) { + out.write((byte) (IS_KEY | TYPE_NULLABLE_NOT_NULL_NULL_ORDERED_LAST)); + } + + /** + * Appends a boolean value in ascending (increasing) sort order. + * + *

Boolean values are encoded using unsigned integer encoding where false=0 and true=1. This + * preserves the natural ordering where false < true. + * + * @param out the output stream to append to + * @param value the boolean value to encode + */ + public static void appendBoolIncreasing(UnsynchronizedByteArrayOutputStream out, boolean value) { + // BOOL uses unsigned int encoding: false=0, true=1 + // For values 0 and 1, payload is always 1 byte + int encoded = value ? 1 : 0; + out.write((byte) (IS_KEY | TYPE_UINT_1)); // Header for 1-byte unsigned int + out.write( + (byte) (encoded << 1)); // Payload: value shifted left by 1 (LSB is prefix-successor bit) + } + + /** + * Appends a boolean value in descending (decreasing) sort order. + * + *

Boolean values are encoded using unsigned integer encoding where false=0 and true=1, then + * inverted for descending order. This preserves reverse ordering where true < false. + * + * @param out the output stream to append to + * @param value the boolean value to encode + */ + public static void appendBoolDecreasing(UnsynchronizedByteArrayOutputStream out, boolean value) { + // BOOL uses decreasing unsigned int encoding: false=0, true=1, then inverted + // For values 0 and 1, payload is always 1 byte + int encoded = value ? 1 : 0; + out.write( + (byte) (IS_KEY | TYPE_DECREASING_UINT_1)); // Header for 1-byte decreasing unsigned int + out.write((byte) ((~encoded & 0x7F) << 1)); // Inverted payload + } + + private static void appendInt64Internal( + UnsynchronizedByteArrayOutputStream out, long val, boolean decreasing, boolean isDouble) { + if (decreasing) { + val = ~val; + } + + byte[] buf = new byte[8]; // Max 8 bytes for payload + int len = 0; + long tempVal = val; + + if (tempVal >= 0) { + buf[7 - len] = (byte) ((tempVal & 0x7F) << 1); + tempVal >>= 7; + len++; + while (tempVal > 0) { + buf[7 - len] = (byte) (tempVal & 0xFF); + tempVal >>= 8; + len++; + } + } else { // tempVal < 0 + // For negative numbers, extend sign bit after shifting + buf[7 - len] = (byte) ((tempVal & 0x7F) << 1); + // Simulate sign extension for right shift of negative number + // (x >> 7) | 0xFE00000000000000ULL; (if x has 64 bits) + // In Java, right shift `>>` on negative longs performs sign extension. + tempVal >>= 7; + len++; + while (tempVal != -1L) { // Loop until all remaining bits are 1s (sign extension) + buf[7 - len] = (byte) (tempVal & 0xFF); + tempVal >>= 8; + len++; + if (len > 8) { + // Defensive assertion: unreachable for any valid 64-bit signed integer + throw new AssertionError("Signed int encoding overflow"); + } + } + } + + int type; + if (val >= 0) { // Original val before potential bit-negation for decreasing + if (!decreasing) { + type = isDouble ? (TYPE_POS_DOUBLE_1 + len - 1) : (TYPE_POS_INT_1 + len - 1); + } else { + type = + isDouble + ? (TYPE_DECREASING_POS_DOUBLE_1 + len - 1) + : (TYPE_DECREASING_POS_INT_1 + len - 1); + } + } else { + if (!decreasing) { + type = isDouble ? (TYPE_NEG_DOUBLE_1 - len + 1) : (TYPE_NEG_INT_1 - len + 1); + } else { + type = + isDouble + ? (TYPE_DECREASING_NEG_DOUBLE_1 - len + 1) + : (TYPE_DECREASING_NEG_INT_1 - len + 1); + } + } + out.write((byte) (IS_KEY | type)); + out.write(buf, 8 - len, len); + } + + public static void appendInt64Increasing(UnsynchronizedByteArrayOutputStream out, long value) { + appendInt64Internal(out, value, false, false); + } + + public static void appendInt64Decreasing(UnsynchronizedByteArrayOutputStream out, long value) { + appendInt64Internal(out, value, true, false); + } + + public static void appendDoubleIncreasing(UnsynchronizedByteArrayOutputStream out, double value) { + long enc = Double.doubleToRawLongBits(value); + if (enc < 0) { + // Transform negative doubles to maintain lexicographic sort order + enc = Long.MIN_VALUE - enc; + } + appendInt64Internal(out, enc, false, true); + } + + public static void appendDoubleDecreasing(UnsynchronizedByteArrayOutputStream out, double value) { + long enc = Double.doubleToRawLongBits(value); + if (enc < 0) { + enc = Long.MIN_VALUE - enc; + } + appendInt64Internal(out, enc, true, true); + } + + private static void appendByteSequence( + UnsynchronizedByteArrayOutputStream out, byte[] bytes, boolean decreasing) { + out.write((byte) (IS_KEY | (decreasing ? TYPE_DECREASING_STRING : TYPE_STRING))); + + for (byte b : bytes) { + byte currentByte = decreasing ? (byte) ~b : b; + int unsignedByte = currentByte & 0xFF; + if (unsignedByte == 0x00) { + // Escape sequence for 0x00: write 0x00 followed by 0xF0 + out.write((byte) 0x00); + out.write(ASCENDING_ZERO_ESCAPE); + } else if (unsignedByte == 0xFF) { + // Escape sequence for 0xFF: write 0xFF followed by 0x10 + out.write((byte) 0xFF); + out.write(ASCENDING_FF_ESCAPE); + } else { + out.write((byte) unsignedByte); + } + } + // Terminator + out.write((byte) (decreasing ? 0xFF : 0x00)); + out.write(SEP); + } + + public static void appendStringIncreasing(UnsynchronizedByteArrayOutputStream out, String value) { + appendByteSequence(out, value.getBytes(StandardCharsets.UTF_8), false); + } + + public static void appendStringDecreasing(UnsynchronizedByteArrayOutputStream out, String value) { + appendByteSequence(out, value.getBytes(StandardCharsets.UTF_8), true); + } + + public static void appendBytesIncreasing(UnsynchronizedByteArrayOutputStream out, byte[] value) { + appendByteSequence(out, value, false); + } + + public static void appendBytesDecreasing(UnsynchronizedByteArrayOutputStream out, byte[] value) { + appendByteSequence(out, value, true); + } + + /** + * Encodes a timestamp as 12 bytes: 8 bytes for seconds since epoch (with offset to handle + * negative), 4 bytes for nanoseconds. + */ + public static byte[] encodeTimestamp(long seconds, int nanos) { + long offsetSeconds = seconds + TIMESTAMP_SECONDS_OFFSET; + byte[] buf = new byte[12]; + ByteBuffer.wrap(buf).order(ByteOrder.BIG_ENDIAN).putLong(offsetSeconds).putInt(nanos); + return buf; + } + + /** Encodes a UUID (128-bit) as 16 bytes in big-endian order. */ + public static byte[] encodeUuid(long high, long low) { + byte[] buf = new byte[16]; + ByteBuffer.wrap(buf).order(ByteOrder.BIG_ENDIAN).putLong(high).putLong(low); + return buf; + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TargetRange.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TargetRange.java new file mode 100644 index 00000000000..bfcd2e30a8b --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/TargetRange.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import com.google.protobuf.ByteString; + +/** Represents a key range with start and limit boundaries for routing. */ +@InternalApi +public class TargetRange { + public ByteString start; + public ByteString limit; + public boolean approximate; + + public TargetRange(ByteString start, ByteString limit, boolean approximate) { + this.start = start; + this.limit = limit; + this.approximate = approximate; + } + + public boolean isPoint() { + return limit.isEmpty(); + } + + /** + * Merges another TargetRange into this one. The resulting range will be the union of the two + * ranges, taking the minimum start key and maximum limit key. + */ + public void mergeFrom(TargetRange other) { + if (ByteString.unsignedLexicographicalComparator().compare(other.start, this.start) < 0) { + this.start = other.start; + } + if (other.isPoint() + && ByteString.unsignedLexicographicalComparator().compare(other.start, this.limit) >= 0) { + this.limit = SsFormat.makePrefixSuccessor(other.start); + } else if (ByteString.unsignedLexicographicalComparator().compare(other.limit, this.limit) + > 0) { + this.limit = other.limit; + } + this.approximate |= other.approximate; + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/UnsynchronizedByteArrayOutputStream.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/UnsynchronizedByteArrayOutputStream.java new file mode 100644 index 00000000000..864215c9874 --- /dev/null +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/UnsynchronizedByteArrayOutputStream.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import com.google.api.core.InternalApi; +import java.util.Arrays; + +/** + * A simple, unsynchronized byte array output stream optimized for key encoding. + * + *

Unlike {@link java.io.ByteArrayOutputStream}, this class is not thread-safe and does not incur + * synchronization overhead. This provides better performance for single-threaded key encoding + * operations where synchronization is not required. + */ +@InternalApi +public final class UnsynchronizedByteArrayOutputStream { + + private byte[] buf; + private int count; + + /** Creates a new output stream with a default initial capacity of 32 bytes. */ + public UnsynchronizedByteArrayOutputStream() { + this(32); + } + + /** + * Creates a new output stream with the specified initial capacity. + * + * @param initialCapacity the initial buffer size + * @throws IllegalArgumentException if initialCapacity is negative + */ + public UnsynchronizedByteArrayOutputStream(int initialCapacity) { + if (initialCapacity < 0) { + throw new IllegalArgumentException("Negative initial capacity: " + initialCapacity); + } + this.buf = new byte[initialCapacity]; + } + + private void ensureCapacity(int minCapacity) { + if (minCapacity > buf.length) { + int newCapacity = Math.max(buf.length << 1, minCapacity); + buf = Arrays.copyOf(buf, newCapacity); + } + } + + /** + * Writes the specified byte to this output stream. + * + * @param b the byte to write (only the low 8 bits are used) + */ + public void write(int b) { + ensureCapacity(count + 1); + buf[count++] = (byte) b; + } + + /** + * Writes a portion of a byte array to this output stream. + * + * @param b the source byte array + * @param off the start offset in the array + * @param len the number of bytes to write + */ + public void write(byte[] b, int off, int len) { + ensureCapacity(count + len); + System.arraycopy(b, off, buf, count, len); + count += len; + } + + /** + * Returns a copy of the buffer contents as a new byte array. + * + * @return a new byte array containing the written bytes + */ + public byte[] toByteArray() { + return Arrays.copyOf(buf, count); + } + + /** Resets the buffer so that it can be reused. The underlying buffer is retained. */ + public void reset() { + count = 0; + } + + /** + * Returns the current number of bytes written to this stream. + * + * @return the number of valid bytes in the buffer + */ + public int size() { + return count; + } +} diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/testing/ExperimentalHostHelper.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/testing/ExperimentalHostHelper.java index b79622bce5a..f6387535e4d 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/testing/ExperimentalHostHelper.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/testing/ExperimentalHostHelper.java @@ -16,10 +16,8 @@ package com.google.cloud.spanner.testing; -import com.google.cloud.NoCredentials; import com.google.cloud.spanner.SpannerOptions; import com.google.common.base.Strings; -import io.grpc.ManagedChannelBuilder; public class ExperimentalHostHelper { private static final String EXPERIMENTAL_HOST = "spanner.experimental_host"; @@ -58,9 +56,7 @@ public static void setExperimentalHostSpannerOptions(SpannerOptions.Builder buil builder.setExperimentalHost(experimentalHost); builder.setBuiltInMetricsEnabled(false); if (usePlainText) { - builder - .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) - .setCredentials(NoCredentials.getInstance()); + builder.usePlainText(); } if (isMtlsSetup()) { String clientCertificate = System.getProperty(CLIENT_CERT_PATH, ""); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java index 68b24a9d067..47dc7da50af 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -661,9 +661,10 @@ public final UnaryCallable createSessionCallable( * } * * @param database Required. The database in which the new sessions are created. - * @param sessionCount Required. The number of sessions to be created in this batch call. The API - * can return fewer than the requested number of sessions. If a specific number of sessions - * are desired, the client can make additional calls to `BatchCreateSessions` (adjusting + * @param sessionCount Required. The number of sessions to be created in this batch call. At least + * one session is created. The API can return fewer than the requested number of sessions. If + * a specific number of sessions are desired, the client can make additional calls to + * `BatchCreateSessions` (adjusting * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count] as necessary). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -701,9 +702,10 @@ public final BatchCreateSessionsResponse batchCreateSessions( * } * * @param database Required. The database in which the new sessions are created. - * @param sessionCount Required. The number of sessions to be created in this batch call. The API - * can return fewer than the requested number of sessions. If a specific number of sessions - * are desired, the client can make additional calls to `BatchCreateSessions` (adjusting + * @param sessionCount Required. The number of sessions to be created in this batch call. At least + * one session is created. The API can return fewer than the requested number of sessions. If + * a specific number of sessions are desired, the client can make additional calls to + * `BatchCreateSessions` (adjusting * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count] as necessary). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1216,6 +1218,7 @@ public final UnaryCallable deleteSessionCallable() * .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) * .setDataBoostEnabled(true) * .setLastStatement(true) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * ResultSet response = spannerClient.executeSql(request); * } @@ -1269,6 +1272,7 @@ public final ResultSet executeSql(ExecuteSqlRequest request) { * .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) * .setDataBoostEnabled(true) * .setLastStatement(true) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * ApiFuture future = spannerClient.executeSqlCallable().futureCall(request); * // Do something. @@ -1315,6 +1319,7 @@ public final UnaryCallable executeSqlCallable() { * .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) * .setDataBoostEnabled(true) * .setLastStatement(true) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * ServerStream stream = * spannerClient.executeStreamingSqlCallable().call(request); @@ -1454,6 +1459,7 @@ public final ExecuteBatchDmlResponse executeBatchDml(ExecuteBatchDmlRequest requ * .setRequestOptions(RequestOptions.newBuilder().build()) * .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) * .setDataBoostEnabled(true) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * ResultSet response = spannerClient.read(request); * } @@ -1504,6 +1510,7 @@ public final ResultSet read(ReadRequest request) { * .setRequestOptions(RequestOptions.newBuilder().build()) * .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) * .setDataBoostEnabled(true) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * ApiFuture future = spannerClient.readCallable().futureCall(request); * // Do something. @@ -1546,6 +1553,7 @@ public final UnaryCallable readCallable() { * .setRequestOptions(RequestOptions.newBuilder().build()) * .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) * .setDataBoostEnabled(true) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * ServerStream stream = spannerClient.streamingReadCallable().call(request); * for (PartialResultSet response : stream) { @@ -1646,6 +1654,7 @@ public final Transaction beginTransaction(String session, TransactionOptions opt * .setOptions(TransactionOptions.newBuilder().build()) * .setRequestOptions(RequestOptions.newBuilder().build()) * .setMutationKey(Mutation.newBuilder().build()) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * Transaction response = spannerClient.beginTransaction(request); * } @@ -1680,6 +1689,7 @@ public final Transaction beginTransaction(BeginTransactionRequest request) { * .setOptions(TransactionOptions.newBuilder().build()) * .setRequestOptions(RequestOptions.newBuilder().build()) * .setMutationKey(Mutation.newBuilder().build()) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * ApiFuture future = spannerClient.beginTransactionCallable().futureCall(request); * // Do something. @@ -1930,6 +1940,7 @@ public final CommitResponse commit( * .setMaxCommitDelay(Duration.newBuilder().build()) * .setRequestOptions(RequestOptions.newBuilder().build()) * .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * CommitResponse response = spannerClient.commit(request); * } @@ -1975,6 +1986,7 @@ public final CommitResponse commit(CommitRequest request) { * .setMaxCommitDelay(Duration.newBuilder().build()) * .setRequestOptions(RequestOptions.newBuilder().build()) * .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + * .setRoutingHint(RoutingHint.newBuilder().build()) * .build(); * ApiFuture future = spannerClient.commitCallable().futureCall(request); * // Do something. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java index 908709266cf..49b7de0cd9f 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/SpannerSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -107,8 +107,8 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") public class SpannerSettings extends ClientSettings { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java index 90b765512e8..5379035e913 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerCallableFactory.java index 0fff6d58572..afb24becec4 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java index a78276e55c8..58d8d27c858 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/GrpcSpannerStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerCallableFactory.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerCallableFactory.java index 6168ff0df31..df602575039 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerCallableFactory.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java index 7015f586f9e..767dab584e2 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/HttpJsonSpannerStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java index ce2c4682fcc..aa3c5b0fe15 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java index 4b546159cf2..87a681734b4 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/v1/stub/SpannerStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; @@ -125,10 +126,11 @@ * } * * Please refer to the [Client Side Retry - * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for - * additional support in setting retries. + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. */ @Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") public class SpannerStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -422,6 +424,14 @@ protected SpannerStubSettings(Builder settingsBuilder) throws IOException { batchWriteSettings = settingsBuilder.batchWriteSettings().build(); } + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-spanner") + .setRepository("googleapis/java-spanner") + .build(); + } + /** Builder for SpannerStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json index 9eff2b915a3..2377603cc28 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.database.v1/reflect-config.json @@ -1034,6 +1034,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", "queryAllDeclaredConstructors": true, @@ -1088,6 +1097,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", "queryAllDeclaredConstructors": true, @@ -1205,6 +1241,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", "queryAllDeclaredConstructors": true, @@ -1511,6 +1565,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json index 65363fdf447..489454bd09e 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json @@ -1034,6 +1034,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", "queryAllDeclaredConstructors": true, @@ -1088,6 +1097,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", "queryAllDeclaredConstructors": true, @@ -1205,6 +1241,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", "queryAllDeclaredConstructors": true, @@ -1511,6 +1565,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json index 90fb979315e..71bc0fe83f6 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json @@ -647,6 +647,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", "queryAllDeclaredConstructors": true, @@ -701,6 +710,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", "queryAllDeclaredConstructors": true, @@ -818,6 +854,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", "queryAllDeclaredConstructors": true, @@ -1124,6 +1178,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", "queryAllDeclaredConstructors": true, @@ -1403,6 +1466,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.CacheUpdate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CacheUpdate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.ChangeStreamRecord", "queryAllDeclaredConstructors": true, @@ -1907,6 +1988,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Group", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Group$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.KeyRange", "queryAllDeclaredConstructors": true, @@ -1925,6 +2024,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.KeyRecipe", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Part", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Part$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Part$NullOrder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRecipe$Part$Order", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.KeySet", "queryAllDeclaredConstructors": true, @@ -2006,6 +2159,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Mutation$Ack", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation$Ack$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.Mutation$Builder", "queryAllDeclaredConstructors": true, @@ -2033,6 +2204,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Mutation$Send", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation$Send$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.Mutation$Write", "queryAllDeclaredConstructors": true, @@ -2222,6 +2411,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.QueryAdvisorResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.QueryAdvisorResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.QueryAdvisorResult$IndexAdvice", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.QueryAdvisorResult$IndexAdvice$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.QueryPlan", "queryAllDeclaredConstructors": true, @@ -2240,6 +2465,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Range", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Range$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.ReadRequest", "queryAllDeclaredConstructors": true, @@ -2276,6 +2519,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.RecipeList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RecipeList$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.RequestOptions", "queryAllDeclaredConstructors": true, @@ -2294,6 +2555,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.RequestOptions$ClientContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RequestOptions$ClientContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.RequestOptions$Priority", "queryAllDeclaredConstructors": true, @@ -2375,6 +2654,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.RoutingHint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RoutingHint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RoutingHint$SkippedTablet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RoutingHint$SkippedTablet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.Session", "queryAllDeclaredConstructors": true, @@ -2429,6 +2744,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.Tablet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Tablet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Tablet$Role", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.Transaction", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner/grpc-gcp-reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner/grpc-gcp-reflect-config.json new file mode 100644 index 00000000000..a92f2c29737 --- /dev/null +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner/grpc-gcp-reflect-config.json @@ -0,0 +1,56 @@ +[ + { + "name": "com.google.cloud.grpc.proto.ApiConfig", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.google.cloud.grpc.proto.ApiConfig$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.google.cloud.grpc.proto.ChannelPoolConfig", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.google.cloud.grpc.proto.ChannelPoolConfig$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.google.cloud.grpc.proto.MethodConfig", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.google.cloud.grpc.proto.MethodConfig$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.google.cloud.grpc.proto.AffinityConfig", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.google.cloud.grpc.proto.AffinityConfig$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "name": "com.google.cloud.grpc.proto.AffinityConfig$Command", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + } +] diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/native-image.properties b/google-cloud-spanner/src/main/resources/META-INF/native-image/native-image.properties index 44bcd53941a..566244d3e59 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/native-image.properties +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/native-image.properties @@ -2,4 +2,5 @@ Args = --initialize-at-build-time=com.google.cloud.spanner.IntegrationTestEnv,\ org.junit.experimental.categories.CategoryValidator,\ org.junit.validator.AnnotationValidator,\ java.lang.annotation.Annotation \ + -H:ReflectionConfigurationResources=${.}/com.google.cloud.spanner/grpc-gcp-reflect-config.json \ --features=com.google.cloud.spanner.nativeimage.SpannerFeature diff --git a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json index 7ed3ca3ee40..f5246d5a0cc 100644 --- a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json +++ b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json @@ -248,6 +248,15 @@ "method": "statementShowTransactionIsolationLevel", "exampleStatements": ["show transaction isolation level","show variable transaction isolation level"] }, + { + "name": "SHOW [VARIABLE] DEFAULT_TRANSACTION_ISOLATION", + "executorName": "ClientSideStatementNoParamExecutor", + "resultType": "RESULT_SET", + "statementType": "SHOW_DEFAULT_TRANSACTION_ISOLATION", + "regex": "(?is)\\A\\s*show\\s+(?:variable\\s+)?default_transaction_isolation\\s*\\z", + "method": "statementShowDefaultTransactionIsolation", + "exampleStatements": ["show default_transaction_isolation","show variable default_transaction_isolation"] + }, { "name": "EXPLAIN ", "executorName": "ClientSideStatementExplainExecutor", diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractAsyncTransactionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractAsyncTransactionTest.java index 94c8cb3f251..0474a807d2b 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractAsyncTransactionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractAsyncTransactionTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.cloud.spanner.MockSpannerTestUtil.EMPTY_KEY_VALUE_RESULTSET; import static com.google.cloud.spanner.MockSpannerTestUtil.INVALID_UPDATE_STATEMENT; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_MULTIPLE_KEY_VALUE_RESULTSET; @@ -53,11 +52,9 @@ public abstract class AbstractAsyncTransactionTest { static ExecutorService executor; Spanner spanner; - Spanner spannerWithEmptySessionPool; @BeforeClass public static void setup() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); mockSpanner.putStatementResult( @@ -101,22 +98,11 @@ public void before() { .setSessionPoolOption(SessionPoolOptions.newBuilder().setFailOnSessionLeak().build()) .build() .getService(); - spannerWithEmptySessionPool = - spanner.getOptions().toBuilder() - .setSessionPoolOption( - SessionPoolOptions.newBuilder() - .setFailOnSessionLeak() - .setMinSessions(0) - .setIncStep(1) - .build()) - .build() - .getService(); } @After public void after() { spanner.close(); - spannerWithEmptySessionPool.close(); mockSpanner.removeAllExecutionTimes(); mockSpanner.reset(); } @@ -124,9 +110,4 @@ public void after() { DatabaseClient client() { return spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); } - - DatabaseClient clientWithEmptySessionPool() { - return spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractMockServerTest.java index 15d308777e8..7857054bcb0 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractMockServerTest.java @@ -16,8 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; - import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.cloud.NoCredentials; import com.google.cloud.spanner.admin.database.v1.MockDatabaseAdminImpl; @@ -51,7 +49,6 @@ abstract class AbstractMockServerTest { @BeforeClass public static void startMockServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockInstanceAdmin = new MockInstanceAdminImpl(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractNettyMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractNettyMockServerTest.java index e51c842fee4..a5d3b62d98d 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractNettyMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractNettyMockServerTest.java @@ -16,8 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; - import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.cloud.NoCredentials; import io.grpc.ForwardingServerCall; @@ -54,7 +52,6 @@ abstract class AbstractNettyMockServerTest { @BeforeClass public static void startMockServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractReadContextTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractReadContextTest.java index eea6658d26d..b4bc7bf7bb6 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractReadContextTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AbstractReadContextTest.java @@ -138,6 +138,10 @@ String getTransactionTag() { public void setup() { SessionImpl session = mock(SessionImpl.class); when(session.getName()).thenReturn("session-1"); + SpannerImpl spanner = mock(SpannerImpl.class); + SpannerOptions spannerOptions = mock(SpannerOptions.class); + when(spanner.getOptions()).thenReturn(spannerOptions); + when(session.getSpanner()).thenReturn(spanner); TestReadContextBuilder builder = new TestReadContextBuilder(); context = builder @@ -322,6 +326,10 @@ public void executeSqlRequestBuilderWithRequestOptions() { public void executeSqlRequestBuilderWithRequestOptionsWithTxnTag() { SessionImpl session = mock(SessionImpl.class); when(session.getName()).thenReturn("session-1"); + SpannerImpl spanner = mock(SpannerImpl.class); + SpannerOptions spannerOptions = mock(SpannerOptions.class); + when(spanner.getOptions()).thenReturn(spannerOptions); + when(session.getSpanner()).thenReturn(spanner); TestReadContextWithTagBuilder builder = new TestReadContextWithTagBuilder(); TestReadContextWithTag contextWithTag = builder @@ -345,6 +353,18 @@ public void executeSqlRequestBuilderWithRequestOptionsWithTxnTag() { assertThat(request.getRequestOptions().getTransactionTag()).isEqualTo("app=spanner,env=test"); } + @Test + public void testBuildRequestOptionsWithClientContext() { + RequestOptions.ClientContext clientContext = + RequestOptions.ClientContext.newBuilder() + .putSecureContext( + "key", com.google.protobuf.Value.newBuilder().setStringValue("value").build()) + .build(); + RequestOptions requestOptions = + context.buildRequestOptions(Options.fromQueryOptions(Options.clientContext(clientContext))); + assertEquals(clientContext, requestOptions.getClientContext()); + } + @Test public void testGetExecuteSqlRequestBuilderWithDirectedReadOptions() { ExecuteSqlRequest.Builder request = diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncRunnerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncRunnerTest.java index 56d33c54878..562e90186cc 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncRunnerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncRunnerTest.java @@ -118,7 +118,7 @@ public void asyncRunnerUpdate() throws Exception { @Test public void asyncRunnerIsNonBlocking() throws Exception { mockSpanner.freeze(); - AsyncRunner runner = clientWithEmptySessionPool().runAsync(); + AsyncRunner runner = client().runAsync(); ApiFuture res = runner.runAsync( txn -> { @@ -216,7 +216,7 @@ public void asyncRunnerCommitAborted() throws Exception { @Test public void asyncRunnerUpdateAbortedWithoutGettingResult() throws Exception { final AtomicInteger attempt = new AtomicInteger(); - AsyncRunner runner = clientWithEmptySessionPool().runAsync(); + AsyncRunner runner = client().runAsync(); ApiFuture result = runner.runAsync( txn -> { @@ -295,7 +295,7 @@ public void asyncRunnerCommitFails() throws Exception { @Test public void asyncRunnerWaitsUntilAsyncUpdateHasFinished() throws Exception { - AsyncRunner runner = clientWithEmptySessionPool().runAsync(); + AsyncRunner runner = client().runAsync(); ApiFuture res = runner.runAsync( txn -> { @@ -334,7 +334,7 @@ public void asyncRunnerBatchUpdate() throws Exception { @Test public void asyncRunnerIsNonBlockingWithBatchUpdate() throws Exception { mockSpanner.freeze(); - AsyncRunner runner = clientWithEmptySessionPool().runAsync(); + AsyncRunner runner = client().runAsync(); ApiFuture res = runner.runAsync( txn -> { @@ -428,7 +428,7 @@ public void asyncRunnerWithBatchUpdateCommitAborted() throws Exception { @Test public void asyncRunnerBatchUpdateAbortedWithoutGettingResult() throws Exception { final AtomicInteger attempt = new AtomicInteger(); - AsyncRunner runner = clientWithEmptySessionPool().runAsync(); + AsyncRunner runner = client().runAsync(); ApiFuture result = runner.runAsync( txn -> { @@ -512,7 +512,7 @@ public void asyncRunnerWithBatchUpdateCommitFails() throws Exception { @Test public void asyncRunnerWaitsUntilAsyncBatchUpdateHasFinished() throws Exception { - AsyncRunner runner = clientWithEmptySessionPool().runAsync(); + AsyncRunner runner = client().runAsync(); ApiFuture res = runner.runAsync( txn -> { @@ -545,9 +545,6 @@ public void closeTransactionBeforeEndOfAsyncQuery() throws Exception { final SettableApiFuture finished = SettableApiFuture.create(); DatabaseClientImpl clientImpl = (DatabaseClientImpl) client(); - // There should currently not be any sessions checked out of the pool. - assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(0); - AsyncRunner runner = clientImpl.runAsync(); final CountDownLatch dataReceived = new CountDownLatch(1); final CountDownLatch dataChecked = new CountDownLatch(1); @@ -592,9 +589,6 @@ public void closeTransactionBeforeEndOfAsyncQuery() throws Exception { // Wait until at least one row has been fetched. At that moment there should be one session // checked out. dataReceived.await(); - if (!isMultiplexedSessionsEnabledForRW()) { - assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(1); - } assertThat(res.isDone()).isFalse(); dataChecked.countDown(); // Get the data from the transaction. @@ -605,7 +599,6 @@ public void closeTransactionBeforeEndOfAsyncQuery() throws Exception { assertThat(finished.get()).isTrue(); assertThat(resultList).containsExactly("k1", "k2", "k3"); assertThat(res.get()).isNull(); - assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(0); } @Test diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncTransactionManagerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncTransactionManagerTest.java index 59657026e57..964fd9c8004 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncTransactionManagerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncTransactionManagerTest.java @@ -41,7 +41,6 @@ import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; import com.google.cloud.spanner.Options.ReadOption; -import com.google.cloud.spanner.SessionPool.SessionPoolTransactionContext; import com.google.cloud.spanner.TransactionRunnerImpl.TransactionContextImpl; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; @@ -180,9 +179,6 @@ public void asyncTransactionManager_shouldRollbackOnCloseAsync() throws Exceptio AsyncTransactionManager manager = client().transactionManagerAsync(); TransactionContext txn = manager.beginAsync().get(); txn.executeUpdateAsync(UPDATE_STATEMENT).get(); - if (txn instanceof SessionPoolTransactionContext) { - txn = ((SessionPoolTransactionContext) txn).delegate; - } TransactionContextImpl impl = (TransactionContextImpl) txn; final TransactionSelector selector = impl.getTransactionSelector(); @@ -265,7 +261,7 @@ public void asyncTransactionManagerIsNonBlocking() throws Exception { "DelayedAsyncTransactionManager is currently blocking with multiplexed sessions.", spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); mockSpanner.freeze(); - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -307,7 +303,7 @@ public void asyncTransactionManagerInvalidUpdate() throws Exception { public void asyncTransactionManagerCommitAborted() throws Exception { final AtomicInteger attempt = new AtomicInteger(); CountDownLatch abortedLatch = new CountDownLatch(1); - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -340,7 +336,7 @@ public void asyncTransactionManagerCommitAborted() throws Exception { @Test public void asyncTransactionManagerFireAndForgetInvalidUpdate() throws Exception { - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -363,18 +359,6 @@ public void asyncTransactionManagerFireAndForgetInvalidUpdate() throws Exception } } } - ImmutableList> expectedRequests = - ImmutableList.of( - BatchCreateSessionsRequest.class, - // The first update that fails. This will cause a transaction retry. - ExecuteSqlRequest.class, - // The retry will use an explicit BeginTransaction call. - BeginTransactionRequest.class, - // The first update will again fail, but now there is a transaction id, so the - // transaction can continue. - ExecuteSqlRequest.class, - ExecuteSqlRequest.class, - CommitRequest.class); ImmutableList> expectedRequestsWithMultiplexedSessionForRW = ImmutableList.of( CreateSessionRequest.class, @@ -387,14 +371,8 @@ public void asyncTransactionManagerFireAndForgetInvalidUpdate() throws Exception ExecuteSqlRequest.class, ExecuteSqlRequest.class, CommitRequest.class); - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(mockSpanner.getRequestTypes()) - .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionForRW); - } else if (isMultiplexedSessionsEnabled()) { - assertThat(mockSpanner.getRequestTypes()).containsAtLeastElementsIn(expectedRequests); - } else { - assertThat(mockSpanner.getRequestTypes()).containsExactlyElementsIn(expectedRequests); - } + assertThat(mockSpanner.getRequestTypes()) + .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionForRW); } @Test @@ -506,7 +484,7 @@ public void asyncTransactionManagerUpdateAborted() throws Exception { @Test public void asyncTransactionManagerUpdateAbortedWithoutGettingResult() throws Exception { final AtomicInteger attempt = new AtomicInteger(); - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -533,25 +511,14 @@ public void asyncTransactionManagerUpdateAbortedWithoutGettingResult() throws Ex // The server may receive 1 or 2 commit requests depending on whether the call to // commitAsync() already knows that the transaction has aborted. If it does, it will not // attempt to call the Commit RPC and instead directly propagate the Aborted error. - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(mockSpanner.getRequestTypes()) - .containsAtLeast( - CreateSessionRequest.class, - ExecuteSqlRequest.class, - // The retry will use a BeginTransaction RPC. - BeginTransactionRequest.class, - ExecuteSqlRequest.class, - CommitRequest.class); - } else { - assertThat(mockSpanner.getRequestTypes()) - .containsAtLeast( - BatchCreateSessionsRequest.class, - ExecuteSqlRequest.class, - // The retry will use a BeginTransaction RPC. - BeginTransactionRequest.class, - ExecuteSqlRequest.class, - CommitRequest.class); - } + assertThat(mockSpanner.getRequestTypes()) + .containsAtLeast( + CreateSessionRequest.class, + ExecuteSqlRequest.class, + // The retry will use a BeginTransaction RPC. + BeginTransactionRequest.class, + ExecuteSqlRequest.class, + CommitRequest.class); break; } catch (AbortedException e) { transactionContextFuture = manager.resetForRetryAsync(); @@ -585,7 +552,7 @@ public void asyncTransactionManagerCommitFails() throws Exception { @Test public void asyncTransactionManagerWaitsUntilAsyncUpdateHasFinished() throws Exception { - try (AsyncTransactionManager mgr = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager mgr = client().transactionManagerAsync()) { TransactionContextFuture txn = mgr.beginAsync(); while (true) { try { @@ -599,22 +566,9 @@ public void asyncTransactionManagerWaitsUntilAsyncUpdateHasFinished() throws Exc executor) .commitAsync() .get(); - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(mockSpanner.getRequestTypes()) - .containsExactly( - CreateSessionRequest.class, ExecuteSqlRequest.class, CommitRequest.class); - } else if (isMultiplexedSessionsEnabled()) { - assertThat(mockSpanner.getRequestTypes()) - .containsExactly( - CreateSessionRequest.class, - BatchCreateSessionsRequest.class, - ExecuteSqlRequest.class, - CommitRequest.class); - } else { - assertThat(mockSpanner.getRequestTypes()) - .containsExactly( - BatchCreateSessionsRequest.class, ExecuteSqlRequest.class, CommitRequest.class); - } + assertThat(mockSpanner.getRequestTypes()) + .containsExactly( + CreateSessionRequest.class, ExecuteSqlRequest.class, CommitRequest.class); break; } catch (AbortedException e) { txn = mgr.resetForRetryAsync(); @@ -653,7 +607,7 @@ public void asyncTransactionManagerIsNonBlockingWithBatchUpdate() throws Excepti "DelayedAsyncTransactionManager is currently blocking with multiplexed sessions.", spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); mockSpanner.freeze(); - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -697,7 +651,7 @@ public void asyncTransactionManagerInvalidBatchUpdate() throws Exception { @Test public void asyncTransactionManagerFireAndForgetInvalidBatchUpdate() throws Exception { - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -735,20 +689,14 @@ public void asyncTransactionManagerFireAndForgetInvalidBatchUpdate() throws Exce ExecuteBatchDmlRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class); - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(mockSpanner.getRequestTypes()) - .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); - } else if (isMultiplexedSessionsEnabled()) { - assertThat(mockSpanner.getRequestTypes()).containsAtLeastElementsIn(expectedRequests); - } else { - assertThat(mockSpanner.getRequestTypes()).containsExactlyElementsIn(expectedRequests); - } + assertThat(mockSpanner.getRequestTypes()) + .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); } @Test public void asyncTransactionManagerBatchUpdateAborted() throws Exception { final AtomicInteger attempt = new AtomicInteger(); - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -789,20 +737,14 @@ public void asyncTransactionManagerBatchUpdateAborted() throws Exception { BeginTransactionRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class); - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(mockSpanner.getRequestTypes()) - .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); - } else if (isMultiplexedSessionsEnabled()) { - assertThat(mockSpanner.getRequestTypes()).containsAtLeastElementsIn(expectedRequests); - } else { - assertThat(mockSpanner.getRequestTypes()).containsExactlyElementsIn(expectedRequests); - } + assertThat(mockSpanner.getRequestTypes()) + .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); } @Test public void asyncTransactionManagerBatchUpdateAbortedBeforeFirstStatement() throws Exception { final AtomicInteger attempt = new AtomicInteger(); - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -844,19 +786,13 @@ public void asyncTransactionManagerBatchUpdateAbortedBeforeFirstStatement() thro BeginTransactionRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class); - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(mockSpanner.getRequestTypes()) - .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); - } else if (isMultiplexedSessionsEnabled()) { - assertThat(mockSpanner.getRequestTypes()).containsAtLeastElementsIn(expectedRequests); - } else { - assertThat(mockSpanner.getRequestTypes()).containsExactlyElementsIn(expectedRequests); - } + assertThat(mockSpanner.getRequestTypes()) + .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); } @Test public void asyncTransactionManagerWithBatchUpdateCommitAborted() throws Exception { - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { // Temporarily set the result of the update to 2 rows. mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT + 1L)); final AtomicInteger attempt = new AtomicInteger(); @@ -916,20 +852,14 @@ public void asyncTransactionManagerWithBatchUpdateCommitAborted() throws Excepti BeginTransactionRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class); - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(mockSpanner.getRequestTypes()) - .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); - } else if (isMultiplexedSessionsEnabled()) { - assertThat(mockSpanner.getRequestTypes()).containsAtLeastElementsIn(expectedRequests); - } else { - assertThat(mockSpanner.getRequestTypes()).containsExactlyElementsIn(expectedRequests); - } + assertThat(mockSpanner.getRequestTypes()) + .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); } @Test public void asyncTransactionManagerBatchUpdateAbortedWithoutGettingResult() throws Exception { final AtomicInteger attempt = new AtomicInteger(); - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -960,51 +890,25 @@ public void asyncTransactionManagerBatchUpdateAbortedWithoutGettingResult() thro } assertThat(attempt.get()).isEqualTo(2); List> requests = mockSpanner.getRequestTypes(); - // Remove the CreateSession requests for multiplexed sessions, as those are not relevant for - // this test if multiplexed session for read-write is not enabled. - if (!isMultiplexedSessionsEnabledForRW()) { - requests.removeIf(request -> request == CreateSessionRequest.class); - } int size = Iterables.size(requests); assertThat(size).isIn(Range.closed(5, 6)); if (size == 5) { - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(requests) - .containsExactly( - CreateSessionRequest.class, - ExecuteBatchDmlRequest.class, - BeginTransactionRequest.class, - ExecuteBatchDmlRequest.class, - CommitRequest.class); - } else { - assertThat(requests) - .containsExactly( - BatchCreateSessionsRequest.class, - ExecuteBatchDmlRequest.class, - BeginTransactionRequest.class, - ExecuteBatchDmlRequest.class, - CommitRequest.class); - } + assertThat(requests) + .containsExactly( + CreateSessionRequest.class, + ExecuteBatchDmlRequest.class, + BeginTransactionRequest.class, + ExecuteBatchDmlRequest.class, + CommitRequest.class); } else { - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(requests) - .containsExactly( - CreateSessionRequest.class, - ExecuteBatchDmlRequest.class, - CommitRequest.class, - BeginTransactionRequest.class, - ExecuteBatchDmlRequest.class, - CommitRequest.class); - } else { - assertThat(requests) - .containsExactly( - BatchCreateSessionsRequest.class, - ExecuteBatchDmlRequest.class, - CommitRequest.class, - BeginTransactionRequest.class, - ExecuteBatchDmlRequest.class, - CommitRequest.class); - } + assertThat(requests) + .containsExactly( + CreateSessionRequest.class, + ExecuteBatchDmlRequest.class, + CommitRequest.class, + BeginTransactionRequest.class, + ExecuteBatchDmlRequest.class, + CommitRequest.class); } } @@ -1015,7 +919,7 @@ public void asyncTransactionManagerWithBatchUpdateCommitFails() { Status.INVALID_ARGUMENT .withDescription("mutation limit exceeded") .asRuntimeException())); - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); SpannerException e = assertThrows( @@ -1038,19 +942,13 @@ public void asyncTransactionManagerWithBatchUpdateCommitFails() { ImmutableList> expectedRequestsWithMultiplexedSessionsRW = ImmutableList.of( CreateSessionRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class); - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(mockSpanner.getRequestTypes()) - .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); - } else if (isMultiplexedSessionsEnabled()) { - assertThat(mockSpanner.getRequestTypes()).containsAtLeastElementsIn(expectedRequests); - } else { - assertThat(mockSpanner.getRequestTypes()).containsExactlyElementsIn(expectedRequests); - } + assertThat(mockSpanner.getRequestTypes()) + .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); } @Test public void asyncTransactionManagerWaitsUntilAsyncBatchUpdateHasFinished() throws Exception { - try (AsyncTransactionManager manager = clientWithEmptySessionPool().transactionManagerAsync()) { + try (AsyncTransactionManager manager = client().transactionManagerAsync()) { TransactionContextFuture transactionContextFuture = manager.beginAsync(); while (true) { try { @@ -1075,14 +973,8 @@ public void asyncTransactionManagerWaitsUntilAsyncBatchUpdateHasFinished() throw ImmutableList> expectedRequestsWithMultiplexedSessionsRW = ImmutableList.of( CreateSessionRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class); - if (isMultiplexedSessionsEnabledForRW()) { - assertThat(mockSpanner.getRequestTypes()) - .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); - } else if (isMultiplexedSessionsEnabled()) { - assertThat(mockSpanner.getRequestTypes()).containsAtLeastElementsIn(expectedRequests); - } else { - assertThat(mockSpanner.getRequestTypes()).containsExactlyElementsIn(expectedRequests); - } + assertThat(mockSpanner.getRequestTypes()) + .containsExactlyElementsIn(expectedRequestsWithMultiplexedSessionsRW); } @Test @@ -1244,56 +1136,4 @@ public void testAbandonedAsyncTransactionManager_rollbackFails() throws Exceptio } assertTrue(gotException); } - - @Test - public void testRollbackAndCloseEmptyTransaction() throws Exception { - assumeFalse( - spannerWithEmptySessionPool - .getOptions() - .getSessionPoolOptions() - .getUseMultiplexedSessionForRW()); - - DatabaseClientImpl client = (DatabaseClientImpl) clientWithEmptySessionPool(); - - // Create a transaction manager and start a transaction. This should create a session and - // check it out of the pool. - AsyncTransactionManager manager = client.transactionManagerAsync(); - manager.beginAsync().get(); - assertEquals(0, client.pool.numSessionsInPool()); - assertEquals(1, client.pool.totalSessions()); - - // Rolling back an empty transaction will return the session to the pool. - manager.rollbackAsync().get(); - assertEquals(1, client.pool.numSessionsInPool()); - // Closing the transaction manager should not cause the session to be added to the pool again. - manager.close(); - // The total number of sessions does not change. - assertEquals(1, client.pool.numSessionsInPool()); - - // Check out 2 sessions. Make sure that the pool really created a new session, and did not - // return the same session twice. - AsyncTransactionManager manager1 = client.transactionManagerAsync(); - AsyncTransactionManager manager2 = client.transactionManagerAsync(); - manager1.beginAsync().get(); - manager2.beginAsync().get(); - assertEquals(2, client.pool.totalSessions()); - assertEquals(0, client.pool.numSessionsInPool()); - manager1.close(); - manager2.close(); - assertEquals(2, client.pool.numSessionsInPool()); - } - - private boolean isMultiplexedSessionsEnabled() { - if (spanner.getOptions() == null || spanner.getOptions().getSessionPoolOptions() == null) { - return false; - } - return spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession(); - } - - private boolean isMultiplexedSessionsEnabledForRW() { - if (spanner.getOptions() == null || spanner.getOptions().getSessionPoolOptions() == null) { - return false; - } - return spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW(); - } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BackendExhaustedTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BackendExhaustedTest.java deleted file mode 100644 index 76cc20cb4de..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BackendExhaustedTest.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.cloud.NoCredentials; -import com.google.cloud.grpc.GrpcTransportOptions; -import com.google.cloud.grpc.GrpcTransportOptions.ExecutorFactory; -import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; -import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; -import com.google.protobuf.ListValue; -import com.google.spanner.v1.ResultSetMetadata; -import com.google.spanner.v1.StructType; -import com.google.spanner.v1.StructType.Field; -import com.google.spanner.v1.TypeCode; -import io.grpc.Server; -import io.grpc.Status; -import io.grpc.inprocess.InProcessServerBuilder; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** - * Tests that a degraded backend that can no longer create any new sessions will not cause an - * application that already has a healthy session pool to stop functioning. - */ -@RunWith(JUnit4.class) -public class BackendExhaustedTest { - private static final String TEST_PROJECT = "my-project"; - private static final String TEST_INSTANCE = "my-instance"; - private static final String TEST_DATABASE = "my-database"; - private static MockSpannerServiceImpl mockSpanner; - private static Server server; - private static LocalChannelProvider channelProvider; - private static final Statement UPDATE_STATEMENT = - Statement.of("UPDATE FOO SET BAR=1 WHERE BAZ=2"); - private static final Statement INVALID_UPDATE_STATEMENT = - Statement.of("UPDATE NON_EXISTENT_TABLE SET BAR=1 WHERE BAZ=2"); - private static final long UPDATE_COUNT = 1L; - private static final Statement SELECT1 = Statement.of("SELECT 1 AS COL1"); - private static final ResultSetMetadata SELECT1_METADATA = - ResultSetMetadata.newBuilder() - .setRowType( - StructType.newBuilder() - .addFields( - Field.newBuilder() - .setName("COL1") - .setType( - com.google.spanner.v1.Type.newBuilder() - .setCode(TypeCode.INT64) - .build()) - .build()) - .build()) - .build(); - private static final com.google.spanner.v1.ResultSet SELECT1_RESULTSET = - com.google.spanner.v1.ResultSet.newBuilder() - .addRows( - ListValue.newBuilder() - .addValues(com.google.protobuf.Value.newBuilder().setStringValue("1").build()) - .build()) - .setMetadata(SELECT1_METADATA) - .build(); - private Spanner spanner; - private DatabaseClientImpl client; - - @BeforeClass - public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); - mockSpanner = new MockSpannerServiceImpl(); - mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. - mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT)); - mockSpanner.putStatementResult(StatementResult.query(SELECT1, SELECT1_RESULTSET)); - mockSpanner.putStatementResult( - StatementResult.exception( - INVALID_UPDATE_STATEMENT, - Status.INVALID_ARGUMENT.withDescription("invalid statement").asRuntimeException())); - - String uniqueName = InProcessServerBuilder.generateName(); - server = - InProcessServerBuilder.forName(uniqueName) - // We need to use a real executor for timeouts to occur. - .scheduledExecutorService(new ScheduledThreadPoolExecutor(1)) - .addService(mockSpanner) - .build() - .start(); - channelProvider = LocalChannelProvider.create(uniqueName); - } - - @AfterClass - public static void stopServer() throws InterruptedException { - // Force a shutdown as there are still requests stuck in the server. - server.shutdownNow(); - server.awaitTermination(); - } - - @Before - public void setUp() throws Exception { - SpannerOptions options = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .build(); - ExecutorFactory executorFactory = - ((GrpcTransportOptions) options.getTransportOptions()).getExecutorFactory(); - ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor) executorFactory.get(); - options = - options.toBuilder() - .setSessionPoolOption( - SessionPoolOptions.newBuilder() - .setMinSessions(executor.getCorePoolSize()) - .setMaxSessions(executor.getCorePoolSize() * 3) - .build()) - .build(); - executorFactory.release(executor); - - spanner = options.getService(); - client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - // Wait until the session pool has initialized. - while (client.pool.getNumberOfSessionsInPool() - < spanner.getOptions().getSessionPoolOptions().getMinSessions()) { - Thread.sleep(1L); - } - } - - @After - public void tearDown() { - mockSpanner.reset(); - mockSpanner.removeAllExecutionTimes(); - // This test case force-closes the Spanner instance as it would otherwise wait - // forever on the BatchCreateSessions requests that are 'stuck'. - try { - ((SpannerImpl) spanner).close(10L, TimeUnit.MILLISECONDS); - } catch (SpannerException e) { - // ignore any errors during close as they are expected. - } - } - - @Test - public void test() throws Exception { - // Simulate very heavy load on the server by effectively stopping session creation. - mockSpanner.setBatchCreateSessionsExecutionTime( - SimulatedExecutionTime.ofMinimumAndRandomTime(Integer.MAX_VALUE, 0)); - // Create an executor that can handle twice as many requests as the minimum number of sessions - // in the pool and then start that many read requests. That will initiate the creation of - // additional sessions. - ScheduledExecutorService executor = - Executors.newScheduledThreadPool( - spanner.getOptions().getSessionPoolOptions().getMinSessions() * 2); - // Also temporarily freeze the server to ensure that the requests that can be served will - // continue to be in-flight and keep the sessions in the pool checked out. - mockSpanner.freeze(); - for (int i = 0; i < spanner.getOptions().getSessionPoolOptions().getMinSessions() * 2; i++) { - executor.submit(new ReadRunnable()); - } - // Now schedule as many write requests as there can be sessions in the pool. - for (int i = 0; i < spanner.getOptions().getSessionPoolOptions().getMaxSessions(); i++) { - executor.submit(new WriteRunnable()); - } - // Now unfreeze the server and verify that all requests can be served using the sessions that - // were already present in the pool. - mockSpanner.unfreeze(); - executor.shutdown(); - assertThat(executor.awaitTermination(10, TimeUnit.SECONDS)).isTrue(); - } - - private final class ReadRunnable implements Runnable { - @Override - public void run() { - try (ResultSet rs = client.singleUse().executeQuery(SELECT1)) { - while (rs.next()) {} - } - } - } - - private final class WriteRunnable implements Runnable { - @Override - public void run() { - TransactionRunner runner = client.readWriteTransaction(); - runner.run(transaction -> transaction.executeUpdate(UPDATE_STATEMENT)); - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BaseSessionPoolTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BaseSessionPoolTest.java deleted file mode 100644 index 939114a7f60..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BaseSessionPoolTest.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.anyLong; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.when; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.cloud.grpc.GrpcTransportOptions.ExecutorFactory; -import com.google.cloud.spanner.Options.TransactionOption; -import com.google.cloud.spanner.spi.v1.SpannerRpc.Option; -import com.google.protobuf.Empty; -import com.google.protobuf.Timestamp; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicLong; - -abstract class BaseSessionPoolTest { - ScheduledExecutorService mockExecutor; - int sessionIndex; - AtomicLong channelHint = new AtomicLong(0L); - - final class TestExecutorFactory implements ExecutorFactory { - - @Override - public ScheduledExecutorService get() { - ScheduledExecutorService realExecutor = new ScheduledThreadPoolExecutor(2); - mockExecutor = spy(realExecutor); - @SuppressWarnings("rawtypes") - ScheduledFuture mockFuture = mock(ScheduledFuture.class); - // To prevent maintenance loop from running. - doReturn(mockFuture) - .when(mockExecutor) - .scheduleAtFixedRate(any(Runnable.class), anyLong(), anyLong(), any(TimeUnit.class)); - return mockExecutor; - } - - @Override - public void release(ScheduledExecutorService executor) { - try { - executor.shutdown(); - } catch (Throwable ignore) { - } - } - } - - @SuppressWarnings("unchecked") - SessionImpl mockSession() { - final SessionImpl session = mock(SessionImpl.class); - Map options = new HashMap<>(); - options.put(Option.CHANNEL_HINT, channelHint.getAndIncrement()); - when(session.getOptions()).thenReturn(options); - when(session.getName()) - .thenReturn( - "projects/dummy/instances/dummy/database/dummy/sessions/session" + sessionIndex); - when(session.asyncClose()).thenReturn(ApiFutures.immediateFuture(Empty.getDefaultInstance())); - when(session.writeWithOptions(any(Iterable.class))) - .thenReturn(new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance())); - when(session.writeAtLeastOnceWithOptions(any(Iterable.class))) - .thenReturn(new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance())); - sessionIndex++; - return session; - } - - SessionImpl mockMultiplexedSession() { - final SessionImpl session = mock(SessionImpl.class); - Map options = new HashMap<>(); - when(session.getIsMultiplexed()).thenReturn(true); - when(session.getOptions()).thenReturn(options); - when(session.getName()) - .thenReturn( - "projects/dummy/instances/dummy/database/dummy/sessions/session" + sessionIndex); - when(session.asyncClose()).thenReturn(ApiFutures.immediateFuture(Empty.getDefaultInstance())); - when(session.writeWithOptions(any(Iterable.class))) - .thenReturn(new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance())); - when(session.writeAtLeastOnceWithOptions(any(Iterable.class))) - .thenReturn(new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance())); - sessionIndex++; - return session; - } - - SessionImpl buildMockSession(SpannerImpl spanner, ReadContext context) { - Map options = new HashMap<>(); - options.put(Option.CHANNEL_HINT, channelHint.getAndIncrement()); - final SessionImpl session = - new SessionImpl( - spanner, - new SessionReference( - "projects/dummy/instances/dummy/databases/dummy/sessions/session" + sessionIndex, - options)) { - @Override - public ReadContext singleUse(TimestampBound bound) { - // The below stubs are added so that we can mock keep-alive. - return context; - } - - @Override - public ApiFuture asyncClose() { - return ApiFutures.immediateFuture(Empty.getDefaultInstance()); - } - - @Override - public CommitResponse writeAtLeastOnceWithOptions( - Iterable mutations, TransactionOption... transactionOptions) - throws SpannerException { - return new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance()); - } - - @Override - public CommitResponse writeWithOptions( - Iterable mutations, TransactionOption... options) throws SpannerException { - return new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance()); - } - }; - sessionIndex++; - return session; - } - - SessionImpl buildMockMultiplexedSession( - SpannerImpl spanner, ReadContext context, Timestamp creationTime) { - Map options = new HashMap<>(); - final SessionImpl session = - new SessionImpl( - spanner, - new SessionReference( - "projects/dummy/instances/dummy/databases/dummy/sessions/session" + sessionIndex, - creationTime, - true, - options)) { - @Override - public ReadContext singleUse(TimestampBound bound) { - // The below stubs are added so that we can mock keep-alive. - return context; - } - - @Override - public ApiFuture asyncClose() { - return ApiFutures.immediateFuture(Empty.getDefaultInstance()); - } - - @Override - public CommitResponse writeAtLeastOnceWithOptions( - Iterable mutations, TransactionOption... transactionOptions) - throws SpannerException { - return new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance()); - } - - @Override - public CommitResponse writeWithOptions( - Iterable mutations, TransactionOption... options) throws SpannerException { - return new CommitResponse(com.google.spanner.v1.CommitResponse.getDefaultInstance()); - } - }; - sessionIndex++; - return session; - } - - void runMaintenanceLoop(FakeClock clock, SessionPool pool, long numCycles) { - for (int i = 0; i < numCycles; i++) { - pool.poolMaintainer.maintainPool(); - clock.currentTimeMillis.addAndGet(pool.poolMaintainer.loopFrequency); - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java index ba508ac8d19..7a9ed7dcd91 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java @@ -57,7 +57,6 @@ public final class BatchClientImplTest { private static final String SESSION_NAME = DB_NAME + "/sessions/s1"; private static final ByteString TXN_ID = ByteString.copyFromUtf8("my-txn"); private static final String TIMESTAMP = "2017-11-15T10:54:20Z"; - private static boolean isMultiplexedSession = false; @Mock private SpannerRpc gapicRpc; @Mock private SpannerOptions spannerOptions; @@ -70,11 +69,6 @@ public final class BatchClientImplTest { public static void setupOpenTelemetry() { SpannerOptions.resetActiveTracingFramework(); SpannerOptions.enableOpenTelemetryTraces(); - Boolean useMultiplexedSessionFromEnvVariablePartitionedOps = - SessionPoolOptions.getUseMultiplexedSessionFromEnvVariablePartitionedOps(); - isMultiplexedSession = - useMultiplexedSessionFromEnvVariablePartitionedOps != null - && useMultiplexedSessionFromEnvVariablePartitionedOps; } @SuppressWarnings("unchecked") @@ -95,33 +89,21 @@ public void setUp() { when(spannerOptions.getTransportOptions()).thenReturn(transportOptions); SessionPoolOptions sessionPoolOptions = mock(SessionPoolOptions.class); when(sessionPoolOptions.getPoolMaintainerClock()).thenReturn(Clock.INSTANCE); - when(sessionPoolOptions.getUseMultiplexedSessionPartitionedOps()) - .thenReturn(isMultiplexedSession); + when(sessionPoolOptions.getUseMultiplexedSessionPartitionedOps()).thenReturn(true); when(sessionPoolOptions.getMultiplexedSessionMaintenanceDuration()).thenReturn(Duration.ZERO); when(spannerOptions.getSessionPoolOptions()).thenReturn(sessionPoolOptions); @SuppressWarnings("resource") SpannerImpl spanner = new SpannerImpl(gapicRpc, spannerOptions); - client = new BatchClientImpl(spanner.getSessionClient(db), isMultiplexedSession); - BatchClientImpl.unimplementedForPartitionedOps.set(false); + client = new BatchClientImpl(spanner.getSessionClient(db)); } @SuppressWarnings("unchecked") @Test public void testBatchReadOnlyTxnWithBound() throws Exception { - Session sessionProto = - Session.newBuilder().setName(SESSION_NAME).setMultiplexed(isMultiplexedSession).build(); - if (isMultiplexedSession) { - when(gapicRpc.createSession( - eq(DB_NAME), - anyString(), - anyMap(), - optionsCaptor.capture(), - eq(isMultiplexedSession))) - .thenReturn(sessionProto); - } else { - when(gapicRpc.createSession(eq(DB_NAME), anyString(), anyMap(), optionsCaptor.capture())) - .thenReturn(sessionProto); - } + Session sessionProto = Session.newBuilder().setName(SESSION_NAME).setMultiplexed(true).build(); + when(gapicRpc.createSession( + eq(DB_NAME), anyString(), anyMap(), optionsCaptor.capture(), eq(true))) + .thenReturn(sessionProto); com.google.protobuf.Timestamp timestamp = Timestamps.parse(TIMESTAMP); Transaction txnMetadata = Transaction.newBuilder().setId(TXN_ID).setReadTimestamp(timestamp).build(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsSlowTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsSlowTest.java index 2807523f40b..38dcaa91d19 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsSlowTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsSlowTest.java @@ -15,7 +15,6 @@ */ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_ONE_KEY_VALUE_RESULTSET; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_ONE_KEY_VALUE_STATEMENT; import static com.google.cloud.spanner.MockSpannerTestUtil.SELECT1; @@ -60,7 +59,6 @@ public class BatchCreateSessionsSlowTest { @BeforeClass public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult( diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsTest.java deleted file mode 100644 index 4ff06755494..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsTest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; - -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.cloud.NoCredentials; -import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; -import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; -import com.google.common.base.Stopwatch; -import com.google.protobuf.ListValue; -import com.google.spanner.v1.ResultSetMetadata; -import com.google.spanner.v1.StructType; -import com.google.spanner.v1.StructType.Field; -import com.google.spanner.v1.TypeCode; -import io.grpc.Server; -import io.grpc.Status; -import io.grpc.inprocess.InProcessServerBuilder; -import java.util.concurrent.TimeUnit; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class BatchCreateSessionsTest { - private static final Statement SELECT1AND2 = - Statement.of("SELECT 1 AS COL1 UNION ALL SELECT 2 AS COL1"); - private static final ResultSetMetadata SELECT1AND2_METADATA = - ResultSetMetadata.newBuilder() - .setRowType( - StructType.newBuilder() - .addFields( - Field.newBuilder() - .setName("COL1") - .setType( - com.google.spanner.v1.Type.newBuilder() - .setCode(TypeCode.INT64) - .build()) - .build()) - .build()) - .build(); - private static final com.google.spanner.v1.ResultSet SELECT1_RESULTSET = - com.google.spanner.v1.ResultSet.newBuilder() - .addRows( - ListValue.newBuilder() - .addValues(com.google.protobuf.Value.newBuilder().setStringValue("1").build()) - .build()) - .addRows( - ListValue.newBuilder() - .addValues(com.google.protobuf.Value.newBuilder().setStringValue("2").build()) - .build()) - .setMetadata(SELECT1AND2_METADATA) - .build(); - - private static MockSpannerServiceImpl mockSpanner; - private static Server server; - private static LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); - mockSpanner = new MockSpannerServiceImpl(); - mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. - mockSpanner.putStatementResult(StatementResult.query(SELECT1AND2, SELECT1_RESULTSET)); - - String uniqueName = InProcessServerBuilder.generateName(); - server = - InProcessServerBuilder.forName(uniqueName) - .directExecutor() - .addService(mockSpanner) - .build() - .start(); - channelProvider = LocalChannelProvider.create(uniqueName); - } - - @AfterClass - public static void stopServer() throws InterruptedException { - server.shutdown(); - server.awaitTermination(); - } - - @Before - public void setUp() { - mockSpanner.reset(); - mockSpanner.removeAllExecutionTimes(); - } - - private Spanner createSpanner(int minSessions, int maxSessions) { - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(minSessions) - .setMaxSessions(maxSessions) - .build(); - return SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setSessionPoolOption(sessionPoolOptions) - .setCredentials(NoCredentials.getInstance()) - .build() - .getService(); - } - - @Test - public void testCreatedMinSessions() throws InterruptedException { - int minSessions = 1000; - int maxSessions = 4000; - try (Spanner spanner = createSpanner(minSessions, maxSessions)) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - Stopwatch watch = Stopwatch.createStarted(); - while (client.pool.totalSessions() < minSessions && watch.elapsed(TimeUnit.SECONDS) < 10) { - Thread.sleep(10L); - } - assertThat(client.pool.totalSessions(), is(equalTo(minSessions))); - } - } - - @Test - public void testClosePoolWhileInitializing() throws InterruptedException { - int minSessions = 10_000; - int maxSessions = 10_000; - DatabaseClientImpl client; - // Freeze the server to prevent it from creating sessions before we want to. - mockSpanner.freeze(); - try (Spanner spanner = createSpanner(minSessions, maxSessions)) { - // Create a database client which will create a session pool. - // No sessions will be created at the moment as the server is frozen. - client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - // Make sure session creation takes a little time to avoid all sessions being created at once. - mockSpanner.setBatchCreateSessionsExecutionTime( - SimulatedExecutionTime.ofMinimumAndRandomTime(10, 0)); - // Unfreeze the server to allow session creation to start. - mockSpanner.unfreeze(); - // Wait until at least one batch of sessions has been created. - Stopwatch watch = Stopwatch.createStarted(); - while (client.pool.totalSessions() == 0 && watch.elapsed(TimeUnit.SECONDS) < 10) { - Thread.sleep(1L); - } - // Close the Spanner instance which will start to delete sessions while the session pool is - // still being initialized. - } - // Verify that all sessions have been deleted. - assertThat(client.pool.totalSessions(), is(equalTo(0))); - } - - @Test - public void testSpannerReturnsAllAvailableSessionsAndThenNoSessions() - throws InterruptedException { - int minSessions = 1000; - int maxSessions = 1000; - // Set a maximum number of sessions that will be created by the server. - // After this the server will return an error when batchCreateSessions is called. - // This error is not propagated to the client. - int maxServerSessions = 550; - DatabaseClientImpl client; - mockSpanner.setMaxTotalSessions(maxServerSessions); - try (Spanner spanner = createSpanner(minSessions, maxSessions)) { - // Create a database client which will create a session pool. - client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - Stopwatch watch = Stopwatch.createStarted(); - while (client.pool.totalSessions() < maxServerSessions - && watch.elapsed(TimeUnit.SECONDS) < 10) { - Thread.sleep(10L); - } - assertThat(client.pool.totalSessions(), is(equalTo(maxServerSessions))); - // Wait until the pool has given up creating sessions. - watch = watch.reset(); - watch.start(); - while (client.pool.getNumberOfSessionsBeingCreated() > 0 - && watch.elapsed(TimeUnit.SECONDS) < 10) { - Thread.sleep(10L); - } - // Remove the max server sessions limit. - mockSpanner.setMaxTotalSessions(Integer.MAX_VALUE); - // Wait a little. No more sessions should be created, as the previous requests have given up, - // and no new sessions have been requested from the pool. - Thread.sleep(20L); - assertThat(client.pool.totalSessions(), is(equalTo(maxServerSessions))); - } - // Verify that all sessions have been deleted. - assertThat(client.pool.totalSessions(), is(equalTo(0))); - } - - @Test - public void testSpannerReturnsFailedPrecondition() throws InterruptedException { - int minSessions = 100; - int maxSessions = 1000; - int expectedSessions; - DatabaseClientImpl client; - // Make the first BatchCreateSessions return an error. - mockSpanner.addException(Status.FAILED_PRECONDITION.asRuntimeException()); - try (Spanner spanner = createSpanner(minSessions, maxSessions)) { - // Create a database client which will create a session pool. - client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - // Wait for the pool to be initialized. - // The first session creation request will fail. - expectedSessions = minSessions - minSessions / spanner.getOptions().getNumChannels(); - Stopwatch watch = Stopwatch.createStarted(); - while (client.pool.totalSessions() < expectedSessions - && watch.elapsed(TimeUnit.SECONDS) < 10) { - Thread.sleep(10L); - } - // Wait a little to allow any additional session creation to finish. - Thread.sleep(20L); - } - // Verify that all sessions have been deleted. - assertThat(client.pool.totalSessions(), is(equalTo(0))); - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ChannelUsageTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ChannelUsageTest.java index a06eeb91662..182c9cc35b5 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ChannelUsageTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ChannelUsageTest.java @@ -16,23 +16,18 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; -import static io.grpc.Grpc.TRANSPORT_ATTR_REMOTE_ADDR; +import static java.util.stream.Collectors.toSet; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; import com.google.cloud.NoCredentials; import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; -import com.google.common.util.concurrent.ListeningExecutorService; -import com.google.common.util.concurrent.MoreExecutors; import com.google.protobuf.ListValue; import com.google.spanner.v1.ResultSetMetadata; import com.google.spanner.v1.SpannerGrpc; import com.google.spanner.v1.StructType; import com.google.spanner.v1.StructType.Field; import com.google.spanner.v1.TypeCode; -import io.grpc.Attributes; import io.grpc.Context; import io.grpc.Contexts; import io.grpc.Metadata; @@ -42,13 +37,12 @@ import io.grpc.ServerInterceptor; import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder; import java.net.InetSocketAddress; -import java.time.Duration; import java.util.Arrays; import java.util.Collection; +import java.util.Deque; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Executors; +import java.util.concurrent.ConcurrentLinkedDeque; import java.util.logging.Level; import java.util.logging.Logger; import org.junit.After; @@ -70,13 +64,9 @@ public class ChannelUsageTest { @Parameter(0) public int numChannels; - @Parameter(1) - public boolean enableGcpPool; - - @Parameters(name = "num channels = {0}, enable GCP pool = {1}") + @Parameters(name = "num channels = {0}") public static Collection data() { - return Arrays.asList( - new Object[][] {{1, true}, {1, false}, {2, true}, {2, false}, {4, true}, {4, false}}); + return Arrays.asList(new Object[][] {{1}, {2}, {4}}); } private static final Statement SELECT1 = Statement.of("SELECT 1 AS COL1"); @@ -106,15 +96,15 @@ public static Collection data() { private static MockSpannerServiceImpl mockSpanner; private static Server server; private static InetSocketAddress address; - private static final Set batchCreateSessionLocalIps = - ConcurrentHashMap.newKeySet(); - private static final Set executeSqlLocalIps = ConcurrentHashMap.newKeySet(); + // Track channel hints (from X-Goog-Spanner-Request-Id header) per RPC method + private static final Set batchCreateSessionChannelHints = ConcurrentHashMap.newKeySet(); + private static final Set executeSqlChannelHints = ConcurrentHashMap.newKeySet(); + private static final Deque allExecuteSqlChannelHints = new ConcurrentLinkedDeque<>(); private static Level originalLogLevel; @BeforeClass public static void startServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult(StatementResult.query(SELECT1, SELECT1_RESULTSET)); @@ -123,8 +113,8 @@ public static void startServer() throws Exception { server = NettyServerBuilder.forAddress(address) .addService(mockSpanner) - // Add a server interceptor to register the remote addresses that we are seeing. This - // indicates how many channels are used client side to communicate with the server. + // Add a server interceptor to extract channel hints from X-Goog-Spanner-Request-Id + // header. This verifies that the client uses all configured channels. .intercept( new ServerInterceptor() { @Override @@ -138,22 +128,27 @@ public ServerCall.Listener interceptCall( headers.get( Metadata.Key.of( "x-response-encoding", Metadata.ASCII_STRING_MARSHALLER))); - Attributes attributes = call.getAttributes(); - @SuppressWarnings({"unchecked", "deprecation"}) - Attributes.Key key = - (Attributes.Key) - attributes.keys().stream() - .filter(k -> k.equals(TRANSPORT_ATTR_REMOTE_ADDR)) - .findFirst() - .orElse(null); - if (key != null) { - if (call.getMethodDescriptor() - .equals(SpannerGrpc.getBatchCreateSessionsMethod())) { - batchCreateSessionLocalIps.add(attributes.get(key)); - } - if (call.getMethodDescriptor() - .equals(SpannerGrpc.getExecuteStreamingSqlMethod())) { - executeSqlLocalIps.add(attributes.get(key)); + // Extract channel hint from X-Goog-Spanner-Request-Id header + String requestId = headers.get(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY); + if (requestId != null) { + // Format: + // ..... + String[] parts = requestId.split("\\."); + if (parts.length >= 4) { + try { + long channelHint = Long.parseLong(parts[3]); + if (call.getMethodDescriptor() + .equals(SpannerGrpc.getBatchCreateSessionsMethod())) { + batchCreateSessionChannelHints.add(channelHint); + } + if (call.getMethodDescriptor() + .equals(SpannerGrpc.getExecuteStreamingSqlMethod())) { + executeSqlChannelHints.add(channelHint); + allExecuteSqlChannelHints.add(channelHint); + } + } catch (NumberFormatException e) { + // Ignore parse errors + } } } return Contexts.interceptCall(Context.current(), call, headers, next); @@ -185,8 +180,9 @@ public static void resetLogging() { @After public void reset() { mockSpanner.reset(); - batchCreateSessionLocalIps.clear(); - executeSqlLocalIps.clear(); + batchCreateSessionChannelHints.clear(); + executeSqlChannelHints.clear(); + allExecuteSqlChannelHints.clear(); } private SpannerOptions createSpannerOptions() { @@ -208,68 +204,43 @@ private SpannerOptions createSpannerOptions() { .build()) .setHost("http://" + endpoint) .setCredentials(NoCredentials.getInstance()); - if (enableGcpPool) { - builder.enableGrpcGcpExtension(); - } return builder.build(); } - @Test - public void testCreatesNumChannels() { - try (Spanner spanner = createSpannerOptions().getService()) { - assumeFalse( - "GRPC-GCP is currently not supported with multiplexed sessions", - isMultiplexedSessionsEnabled(spanner) && enableGcpPool); - DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - try (ResultSet resultSet = client.singleUse().executeQuery(SELECT1)) { - while (resultSet.next()) {} - } - } - assertEquals(numChannels, batchCreateSessionLocalIps.size()); - } - @Test public void testUsesAllChannels() throws InterruptedException { - final int multiplier = 2; + final int multiplier = 10; try (Spanner spanner = createSpannerOptions().getService()) { - assumeFalse( - "GRPC-GCP is currently not supported with multiplexed sessions", - isMultiplexedSessionsEnabled(spanner)); DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - ListeningExecutorService executor = - MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(numChannels * multiplier)); - CountDownLatch latch = new CountDownLatch(numChannels * multiplier); for (int run = 0; run < numChannels * multiplier; run++) { - executor.submit( - () -> { - // Use a multi-use read-only transaction to make sure we keep a session in use for - // a longer period of time. - try (ReadOnlyTransaction transaction = client.readOnlyTransaction()) { - try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { - while (resultSet.next()) {} - } - latch.countDown(); - // Wait here until we now that all threads have reached this point and have a - // session in use. - latch.await(); - try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { - while (resultSet.next()) {} - } - } - return true; - }); + try (ReadOnlyTransaction transaction = client.readOnlyTransaction()) { + for (int i = 0; i < 2; i++) { + try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + } + } } - executor.shutdown(); - assertTrue(executor.awaitTermination(Duration.ofSeconds(10L))); } - assertEquals(numChannels, executeSqlLocalIps.size()); - } - - private boolean isMultiplexedSessionsEnabled(Spanner spanner) { - if (spanner.getOptions() == null || spanner.getOptions().getSessionPoolOptions() == null) { - return false; + // Bound the channel hints to numChannels (matching gRPC-GCP behavior) and verify + // that channels are being distributed. The raw channel hints may be unbounded (based on + // session index), but gRPC-GCP bounds them to the actual number of channels. + assertEquals(2 * numChannels * multiplier, allExecuteSqlChannelHints.size()); + Set boundedChannelHints = + executeSqlChannelHints.stream().map(hint -> hint % numChannels).collect(toSet()); + // Verify that channel distribution is working: + // - For numChannels=1, exactly 1 channel should be used + // - For numChannels>1, multiple channels should be used (at least half) + if (numChannels == 1) { + assertEquals(1, boundedChannelHints.size()); + } else { + assertTrue( + "Expected at least " + + (numChannels / 2) + + " channels to be used, but got " + + boundedChannelHints.size(), + boundedChannelHints.size() >= numChannels / 2); } - return spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession(); } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CloseSpannerWithOpenResultSetTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CloseSpannerWithOpenResultSetTest.java index 7988e53f84f..ed9f21c4635 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CloseSpannerWithOpenResultSetTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CloseSpannerWithOpenResultSetTest.java @@ -20,14 +20,11 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; import com.google.cloud.NoCredentials; import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; import com.google.cloud.spanner.connection.AbstractMockServerTest; import com.google.cloud.spanner.spi.v1.GapicSpannerRpc; -import com.google.spanner.v1.DeleteSessionRequest; -import com.google.spanner.v1.ExecuteSqlRequest; import io.grpc.ManagedChannelBuilder; import io.grpc.Status; import java.time.Duration; @@ -38,7 +35,6 @@ import java.util.concurrent.Future; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; import org.junit.After; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -79,72 +75,6 @@ public void cleanup() { mockSpanner.clearRequests(); } - @Test - public void testBatchClient_closedSpannerWithOpenResultSet_streamsAreCancelled() { - Spanner spanner = createSpanner(); - assumeFalse(spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - - BatchClient client = spanner.getBatchClient(DatabaseId.of("p", "i", "d")); - try (BatchReadOnlyTransaction transaction = - client.batchReadOnlyTransaction(TimestampBound.strong()); - ResultSet resultSet = transaction.executeQuery(SELECT_RANDOM_STATEMENT)) { - mockSpanner.freezeAfterReturningNumRows(1); - // This can sometimes fail, as the mock server may not always actually return the first row. - try { - assertTrue(resultSet.next()); - } catch (SpannerException exception) { - assertEquals(ErrorCode.DEADLINE_EXCEEDED, exception.getErrorCode()); - return; - } - ((SpannerImpl) spanner).close(1, TimeUnit.MILLISECONDS); - // This should return an error as the stream is cancelled. - SpannerException exception = - assertThrows( - SpannerException.class, - () -> { //noinspection StatementWithEmptyBody - while (resultSet.next()) {} - }); - assertEquals(ErrorCode.CANCELLED, exception.getErrorCode()); - } - } - - @Test - public void testNormalDatabaseClient_closedSpannerWithOpenResultSet_sessionsAreDeleted() - throws Exception { - Spanner spanner = createSpanner(); - assumeFalse(spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - - DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - try (ReadOnlyTransaction transaction = client.readOnlyTransaction(TimestampBound.strong()); - ResultSet resultSet = transaction.executeQuery(SELECT_RANDOM_STATEMENT)) { - mockSpanner.freezeAfterReturningNumRows(1); - // This can sometimes fail, as the mock server may not always actually return the first row. - try { - assertTrue(resultSet.next()); - } catch (SpannerException exception) { - assertEquals(ErrorCode.DEADLINE_EXCEEDED, exception.getErrorCode()); - return; - } - List executeSqlRequests = - mockSpanner.getRequestsOfType(ExecuteSqlRequest.class).stream() - .filter(request -> request.getSql().equals(SELECT_RANDOM_STATEMENT.getSql())) - .collect(Collectors.toList()); - assertEquals(1, executeSqlRequests.size()); - ExecutorService service = Executors.newSingleThreadExecutor(); - service.submit(spanner::close); - // Verify that the session that is used by this transaction is deleted. - // That will automatically cancel the query. - mockSpanner.waitForRequestsToContain( - request -> - request instanceof DeleteSessionRequest - && ((DeleteSessionRequest) request) - .getName() - .equals(executeSqlRequests.get(0).getSession()), - /* timeoutMillis= */ 1000L); - service.shutdownNow(); - } - } - @Test public void testStreamsAreCleanedUp() throws Exception { String invalidSql = "select * from foo"; diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java index 9ca5c17330a..8acb0a7b725 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_COLUMN_NAMES; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_ONE_KEY_VALUE_RESULTSET; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_ONE_KEY_VALUE_STATEMENT; @@ -28,21 +27,13 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; -import static org.junit.Assume.assumeTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; -import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ServerStream; @@ -56,11 +47,7 @@ import com.google.cloud.spanner.Options.RpcLockHint; import com.google.cloud.spanner.Options.RpcOrderBy; import com.google.cloud.spanner.Options.RpcPriority; -import com.google.cloud.spanner.Options.TransactionOption; import com.google.cloud.spanner.ReadContext.QueryAnalyzeMode; -import com.google.cloud.spanner.SessionPool.PooledSessionFuture; -import com.google.cloud.spanner.SessionPoolOptions.ActionOnInactiveTransaction; -import com.google.cloud.spanner.SessionPoolOptions.InactiveTransactionRemovalOptions; import com.google.cloud.spanner.SingerProto.Genre; import com.google.cloud.spanner.SingerProto.SingerInfo; import com.google.cloud.spanner.SpannerException.ResourceNotFoundException; @@ -83,7 +70,6 @@ import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CreateSessionRequest; -import com.google.spanner.v1.DeleteSessionRequest; import com.google.spanner.v1.DirectedReadOptions; import com.google.spanner.v1.DirectedReadOptions.IncludeReplicas; import com.google.spanner.v1.DirectedReadOptions.ReplicaSelection; @@ -104,19 +90,18 @@ import com.google.spanner.v1.TypeAnnotationCode; import com.google.spanner.v1.TypeCode; import io.grpc.Context; +import io.grpc.ManagedChannelBuilder; import io.grpc.Metadata; import io.grpc.MethodDescriptor; import io.grpc.Server; import io.grpc.ServerInterceptors; import io.grpc.Status; import io.grpc.StatusRuntimeException; -import io.grpc.inprocess.InProcessServerBuilder; +import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder; import io.grpc.protobuf.lite.ProtoLiteUtils; -import io.opencensus.trace.Tracing; -import io.opentelemetry.api.OpenTelemetry; +import java.net.InetSocketAddress; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.Base64; @@ -128,10 +113,8 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; import java.util.function.Function; import java.util.logging.Level; import java.util.logging.Logger; @@ -159,7 +142,6 @@ public class DatabaseClientImplTest { private static XGoogSpannerRequestIdTest.ServerHeaderEnforcer xGoogReqIdInterceptor; private static MockSpannerServiceImpl mockSpanner; private static Server server; - private static LocalChannelProvider channelProvider; private static final Statement UPDATE_STATEMENT = Statement.of("UPDATE FOO SET BAR=1 WHERE BAZ=2"); private static final Statement INVALID_UPDATE_STATEMENT = @@ -205,12 +187,10 @@ public class DatabaseClientImplTest { ReplicaSelection.newBuilder().setLocation("us-east1").build())) .build(); private Spanner spanner; - private Spanner spannerWithEmptySessionPool; private static ExecutorService executor; @BeforeClass public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT)); @@ -247,15 +227,12 @@ public static void startStaticServer() throws Exception { "google.spanner.v1.Spanner/StreamingRead")); xGoogReqIdInterceptor = new XGoogSpannerRequestIdTest.ServerHeaderEnforcer(checkMethods); executor = Executors.newSingleThreadExecutor(); - String uniqueName = InProcessServerBuilder.generateName(); + InetSocketAddress address = new InetSocketAddress("localhost", 0); server = - InProcessServerBuilder.forName(uniqueName) - // We need to use a real executor for timeouts to occur. - .scheduledExecutorService(new ScheduledThreadPoolExecutor(1)) + NettyServerBuilder.forAddress(address) .addService(ServerInterceptors.intercept(mockSpanner, xGoogReqIdInterceptor)) .build() .start(); - channelProvider = LocalChannelProvider.create(uniqueName); } @AfterClass @@ -267,1103 +244,26 @@ public static void stopServer() throws InterruptedException { @Before public void setUp() { + String endpoint = "localhost:" + server.getPort(); spanner = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://" + endpoint) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption(SessionPoolOptions.newBuilder().setFailOnSessionLeak().build()) .build() .getService(); - spannerWithEmptySessionPool = - spanner.getOptions().toBuilder() - .setSessionPoolOption( - SessionPoolOptions.newBuilder().setMinSessions(0).setFailOnSessionLeak().build()) - .build() - .getService(); - } - - @After - public void tearDown() { - mockSpanner.unfreeze(); - spanner.close(); - spannerWithEmptySessionPool.close(); - mockSpanner.reset(); - xGoogReqIdInterceptor.reset(); - mockSpanner.removeAllExecutionTimes(); - } - - @Test - public void - testPoolMaintainer_whenInactiveTransactionAndSessionIsNotFoundOnBackend_removeSessionsFromPool() { - assumeFalse( - "Session pool maintainer test skipped for multiplexed sessions", - isMultiplexedSessionsEnabledForRW()); - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 2L)) // any session not used for more than 2s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - mockSpanner.setCommitExecutionTime( - SimulatedExecutionTime.ofException( - mockSpanner.createSessionNotFoundException("TEST_SESSION_NAME"))); - while (true) { - try { - transaction.executeUpdate(UPDATE_STATEMENT); - - // Simulate a delay of 3 minutes to ensure that the below transaction is a long-running - // one. - // As per this test, anything which takes more than 2s is long-running - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - mockSpanner.setCommitExecutionTime(SimulatedExecutionTime.ofMinimumAndRandomTime(0, 0)); - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - // first session executed update, session found to be long-running and cleaned up. - // During commit, SessionNotFound exception from backend caused replacement of session and - // transaction needs to be retried. - // On retry, session again found to be long-running and cleaned up. - // During commit, there was no exception from backend. - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(2, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void - testPoolMaintainer_whenInactiveTransactionAndSessionExistsOnBackend_removeSessionsFromPool() { - assumeFalse( - "Session leaks tests are skipped for multiplexed sessions", - isMultiplexedSessionsEnabledForRW()); - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 2L)) // any session not used for more than 2s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - transaction.executeUpdate(UPDATE_STATEMENT); - - // Simulate a delay of 3 minutes to ensure that the below transaction is a long-running - // one. - // As per this test, anything which takes more than 2s is long-running - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - // first session executed update, session found to be long-running and cleaned up. - // During commit, SessionNotFound exception from backend caused replacement of session and - // transaction needs to be retried. - // On retry, session again found to be long-running and cleaned up. - // During commit, there was no exception from backend. - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(1, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void testPoolMaintainer_whenLongRunningPartitionedUpdateRequest_takeNoAction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 2L)) // any session not used for more than 2s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - - client.executePartitionedUpdate(UPDATE_STATEMENT); - - // Simulate a delay of 3 minutes to ensure that the below transaction is a long-running one. - // As per this test, anything which takes more than 2s is long-running - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - /** - * PDML transaction is expected to be long-running. This is indicated through session flag - * eligibleForLongRunning = true . For all other transactions which are not expected to be - * long-running eligibleForLongRunning = false. - * - *

Below tests uses a session for PDML transaction. Post that, the same session is used for - * executeUpdate(). Both transactions are long-running. The test verifies that - * eligibleForLongRunning = false for the second transaction, and it's identified as a - * long-running transaction. - */ - @Test - public void testPoolMaintainer_whenPDMLFollowedByInactiveTransaction_removeSessionsFromPool() { - assumeFalse( - "Session leaks tests are skipped for multiplexed sessions", - isMultiplexedSessionsEnabledForRW()); - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 2L)) // any session not used for more than 2s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - - client.executePartitionedUpdate(UPDATE_STATEMENT); - - // Simulate a delay of 3 minutes to ensure that the below transaction is a long-running one. - // As per this test, anything which takes more than 2s is long-running - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - transaction.executeUpdate(UPDATE_STATEMENT); - - // Simulate a delay of 3 minutes to ensure that the below transaction is a long-running - // one. - // As per this test, anything which takes more than 2s is long-running - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMinutes(3).toMillis()); - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - // first session executed update, session found to be long-running and cleaned up. - // During commit, SessionNotFound exception from backend caused replacement of session and - // transaction needs to be retried. - // On retry, session again found to be long-running and cleaned up. - // During commit, there was no exception from backend. - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(1, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningReadsUsingTransactionRunner_retainSessionForTransaction() - throws Exception { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - TransactionRunner runner = client.readWriteTransaction(); - runner.run( - transaction -> { - try (ResultSet resultSet = - transaction.read( - READ_TABLE_NAME, - KeySet.singleKey(Key.of(1L)), - READ_COLUMN_NAMES, - Options.priority(RpcPriority.HIGH))) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - try (ResultSet resultSet = - transaction.read( - READ_TABLE_NAME, - KeySet.singleKey(Key.of(1L)), - READ_COLUMN_NAMES, - Options.priority(RpcPriority.HIGH))) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - return null; - }); - - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningQueriesUsingTransactionRunner_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - TransactionRunner runner = client.readWriteTransaction(); - runner.run( - transaction -> { - try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - return null; - }); - - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningUpdatesUsingTransactionManager_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - transaction.executeUpdate(UPDATE_STATEMENT); - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - transaction.executeUpdate(UPDATE_STATEMENT); - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningReadsUsingTransactionManager_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - try (ResultSet resultSet = - transaction.read( - READ_TABLE_NAME, - KeySet.singleKey(Key.of(1L)), - READ_COLUMN_NAMES, - Options.priority(RpcPriority.HIGH))) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - try (ResultSet resultSet = - transaction.read( - READ_TABLE_NAME, - KeySet.singleKey(Key.of(1L)), - READ_COLUMN_NAMES, - Options.priority(RpcPriority.HIGH))) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningReadRowUsingTransactionManager_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - transaction.readRow(READ_TABLE_NAME, Key.of(1L), READ_COLUMN_NAMES); - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - transaction.readRow(READ_TABLE_NAME, Key.of(1L), READ_COLUMN_NAMES); - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningAnalyzeUpdateStatementUsingTransactionManager_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - try (ResultSet resultSet = - transaction.analyzeUpdateStatement(UPDATE_STATEMENT, QueryAnalyzeMode.PROFILE)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - try (ResultSet resultSet = - transaction.analyzeUpdateStatement(UPDATE_STATEMENT, QueryAnalyzeMode.PROFILE)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningBatchUpdatesUsingTransactionManager_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - transaction.batchUpdate(Lists.newArrayList(UPDATE_STATEMENT)); - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - transaction.batchUpdate(Lists.newArrayList(UPDATE_STATEMENT)); - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningBatchUpdatesAsyncUsingTransactionManager_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - transaction.batchUpdateAsync(Lists.newArrayList(UPDATE_STATEMENT)); - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - transaction.batchUpdateAsync(Lists.newArrayList(UPDATE_STATEMENT)); - - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningExecuteQueryUsingTransactionManager_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } - } - - @Test - public void - testPoolMaintainer_whenLongRunningExecuteQueryAsyncUsingTransactionManager_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - try (ResultSet resultSet = transaction.executeQueryAsync(SELECT1)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - try (ResultSet resultSet = transaction.executeQueryAsync(SELECT1)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } } - @Test - public void - testPoolMaintainer_whenLongRunningAnalyzeQueryUsingTransactionManager_retainSessionForTransaction() { - FakeClock poolMaintainerClock = new FakeClock(); - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setIdleTimeThreshold( - Duration.ofSeconds( - 3L)) // any session not used for more than 3s will be long-running - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .setExecutionFrequency(Duration.ofSeconds(1)) // execute thread every 1s - .build(); - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) // to ensure there is 1 session and pool is 100% utilized - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .setLoopFrequency(1000L) // main thread runs every 1s - .setPoolMaintainerClock(poolMaintainerClock) - .build(); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setDatabaseRole(TEST_DATABASE_ROLE) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption(sessionPoolOptions) - .build() - .getService()) { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Instant initialExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - try (ResultSet resultSet = - transaction.analyzeQuery(SELECT1, QueryAnalyzeMode.PROFILE)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(1050).toMillis()); - - try (ResultSet resultSet = - transaction.analyzeQuery(SELECT1, QueryAnalyzeMode.PROFILE)) { - consumeResults(resultSet); - } - poolMaintainerClock.currentTimeMillis.addAndGet(Duration.ofMillis(2050).toMillis()); - - // force trigger pool maintainer to check for long-running sessions - client.pool.poolMaintainer.maintainPool(); - - manager.commit(); - assertNotNull(manager.getCommitTimestamp()); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - Instant endExecutionTime = client.pool.poolMaintainer.lastExecutionTime; - - assertNotEquals( - endExecutionTime, - initialExecutionTime); // if session clean up task runs then these timings won't match - assertEquals(0, client.pool.numLeakedSessionsRemoved()); - assertTrue(client.pool.getNumberOfSessionsInPool() <= client.pool.totalSessions()); - } + @After + public void tearDown() { + mockSpanner.unfreeze(); + spanner.close(); + mockSpanner.reset(); + xGoogReqIdInterceptor.reset(); + mockSpanner.removeAllExecutionTimes(); } @Test @@ -1898,6 +798,29 @@ public void testReadWriteExecuteQueryWithTag() { .isEqualTo("app=spanner,env=test,action=txn"); } + @Test + public void testBlindWriteWithTransactionTag() { + DatabaseClient client = + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + String transactionTag = "app=spanner,env=test,action=txn"; + TransactionRunner runner = client.readWriteTransaction(Options.tag(transactionTag)); + runner.run( + transaction -> { + transaction.buffer(Mutation.newInsertBuilder("abc").set("id").to(1L).build()); + return null; + }); + + List beginTransactionRequests = + mockSpanner.getRequestsOfType(BeginTransactionRequest.class); + assertThat(beginTransactionRequests).hasSize(1); + assertThat(beginTransactionRequests.get(0).getRequestOptions().getTransactionTag()) + .isEqualTo(transactionTag); + List commitRequests = mockSpanner.getRequestsOfType(CommitRequest.class); + assertThat(commitRequests).hasSize(1); + assertThat(commitRequests.get(0).getRequestOptions().getTransactionTag()) + .isEqualTo(transactionTag); + } + @Test public void testReadWriteExecuteReadWithTag() { DatabaseClient client = @@ -2360,17 +1283,11 @@ public void singleUse() { DatabaseClientImpl client = (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Set checkedOut = client.pool.checkedOutSessions; - assertThat(checkedOut).isEmpty(); try (ResultSet rs = client.singleUse().executeQuery(SELECT1)) { assertThat(rs.next()).isTrue(); - if (!isMultiplexedSessionsEnabled()) { - assertThat(checkedOut).hasSize(1); - } assertThat(rs.getLong(0)).isEqualTo(1L); assertThat(rs.next()).isFalse(); } - assertThat(checkedOut).isEmpty(); } @Test @@ -2380,8 +1297,7 @@ public void singleUseIsNonBlocking() { // from the pool and then preparing a query is non-blocking (i.e. does not wait on a reply from // the server). DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); try (ResultSet rs = client.singleUse().executeQuery(SELECT1)) { mockSpanner.unfreeze(); assertThat(rs.next()).isTrue(); @@ -2449,8 +1365,7 @@ public void singleUseBound() { public void singleUseBoundIsNonBlocking() { mockSpanner.freeze(); DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); try (ResultSet rs = client .singleUse(TimestampBound.ofExactStaleness(15L, TimeUnit.SECONDS)) @@ -2508,8 +1423,7 @@ public void singleUseTransaction() { public void singleUseTransactionIsNonBlocking() { mockSpanner.freeze(); DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); try (ResultSet rs = client.singleUseReadOnlyTransaction().executeQuery(SELECT1)) { mockSpanner.unfreeze(); assertThat(rs.next()).isTrue(); @@ -2536,8 +1450,7 @@ public void singleUseTransactionBound() { public void singleUseTransactionBoundIsNonBlocking() { mockSpanner.freeze(); DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); try (ResultSet rs = client .singleUseReadOnlyTransaction(TimestampBound.ofExactStaleness(15L, TimeUnit.SECONDS)) @@ -2566,8 +1479,7 @@ public void readOnlyTransaction() { public void readOnlyTransactionIsNonBlocking() { mockSpanner.freeze(); DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); try (ReadOnlyTransaction tx = client.readOnlyTransaction()) { try (ResultSet rs = tx.executeQuery(SELECT1)) { mockSpanner.unfreeze(); @@ -2596,8 +1508,7 @@ public void readOnlyTransactionBound() { public void readOnlyTransactionBoundIsNonBlocking() { mockSpanner.freeze(); DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); try (ReadOnlyTransaction tx = client.readOnlyTransaction(TimestampBound.ofExactStaleness(15L, TimeUnit.SECONDS))) { try (ResultSet rs = tx.executeQuery(SELECT1)) { @@ -2641,8 +1552,7 @@ public void testReadWriteTransaction_returnsCommitStats() { public void readWriteTransactionIsNonBlocking() { mockSpanner.freeze(); DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); TransactionRunner runner = client.readWriteTransaction(); // The runner.run(...) method cannot be made non-blocking, as it returns the result of the // transaction. @@ -2692,8 +1602,7 @@ public void testRunAsync_returnsCommitStats() { public void runAsyncIsNonBlocking() throws Exception { mockSpanner.freeze(); DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); ExecutorService executor = Executors.newSingleThreadExecutor(); AsyncRunner runner = client.runAsync(); ApiFuture fut = @@ -2767,8 +1676,7 @@ public void testTransactionManager_returnsCommitStats() { public void transactionManagerIsNonBlocking() throws Exception { mockSpanner.freeze(); DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); try (TransactionManager txManager = client.transactionManager()) { mockSpanner.unfreeze(); TransactionContext transaction = txManager.begin(); @@ -2880,7 +1788,8 @@ public void testPartitionedDmlDoesNotTimeout() { SpannerOptions.Builder builder = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()); // Set normal DML timeout value. builder.getSpannerStubSettingsBuilder().executeSqlSettings().setRetrySettings(retrySettings); @@ -2909,17 +1818,11 @@ public void testPartitionedDmlDoesNotTimeout() { })); assertEquals(ErrorCode.DEADLINE_EXCEEDED, e.getErrorCode()); - DatabaseClientImpl dbImpl = ((DatabaseClientImpl) client); - int channelId = 0; - try (Session session = dbImpl.getSession()) { - channelId = ((PooledSessionFuture) session).getChannel(); - } - int dbId = dbImpl.dbId; long NON_DETERMINISTIC = XGoogSpannerRequestIdTest.NON_DETERMINISTIC; XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = { XGoogSpannerRequestIdTest.ofMethodAndRequestId( "google.spanner.v1.Spanner/ExecuteStreamingSql", - new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 6, 1)), + new XGoogSpannerRequestId(NON_DETERMINISTIC, NON_DETERMINISTIC, 6, 1)), }; if (false) { // TODO(@odeke-em): enable in next PRs. xGoogReqIdInterceptor.checkExpectedStreamingXGoogRequestIds(wantStreamingValues); @@ -2928,13 +1831,13 @@ public void testPartitionedDmlDoesNotTimeout() { XGoogSpannerRequestIdTest.MethodAndRequestId[] wantUnaryValues = { XGoogSpannerRequestIdTest.ofMethodAndRequestId( "google.spanner.v1.Spanner/BeginTransaction", - new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 7, 1)), + new XGoogSpannerRequestId(NON_DETERMINISTIC, NON_DETERMINISTIC, 7, 1)), XGoogSpannerRequestIdTest.ofMethodAndRequestId( "google.spanner.v1.Spanner/CreateSession", new XGoogSpannerRequestId(NON_DETERMINISTIC, 0, 1, 1)), XGoogSpannerRequestIdTest.ofMethodAndRequestId( "google.spanner.v1.Spanner/ExecuteSql", - new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 8, 1)), + new XGoogSpannerRequestId(NON_DETERMINISTIC, NON_DETERMINISTIC, 8, 1)), }; if (false) { // TODO(@odeke-em): enable in next PRs. xGoogReqIdInterceptor.checkExpectedUnaryXGoogRequestIdsAsSuffixes(wantUnaryValues); @@ -2949,7 +1852,8 @@ public void testPartitionedDmlWithLowerTimeout() { SpannerOptions.Builder builder = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()); // Set PDML timeout value. builder.setPartitionedDmlTimeoutDuration(Duration.ofMillis(10L)); @@ -2983,7 +1887,8 @@ public void testPartitionedDmlWithHigherTimeout() { SpannerOptions.Builder builder = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()); // Set PDML timeout value to a value that should allow the statement to be executed. builder.setPartitionedDmlTimeoutDuration(Duration.ofMillis(5000L)); @@ -3022,17 +1927,11 @@ public void testPartitionedDmlWithHigherTimeout() { assertThat(e.getErrorCode()).isEqualTo(ErrorCode.DEADLINE_EXCEEDED); assertThat(updateCount).isEqualTo(UPDATE_COUNT); - DatabaseClientImpl dbImpl = ((DatabaseClientImpl) client); - int channelId = 0; - try (Session session = dbImpl.getSession()) { - channelId = ((PooledSessionFuture) session).getChannel(); - } - int dbId = dbImpl.dbId; long NON_DETERMINISTIC = XGoogSpannerRequestIdTest.NON_DETERMINISTIC; XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = { XGoogSpannerRequestIdTest.ofMethodAndRequestId( "google.spanner.v1.Spanner/ExecuteStreamingSql", - new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 6, 1)), + new XGoogSpannerRequestId(NON_DETERMINISTIC, NON_DETERMINISTIC, 6, 1)), }; if (false) { // TODO(@odeke-em): enable in next PRs. @@ -3042,13 +1941,13 @@ public void testPartitionedDmlWithHigherTimeout() { XGoogSpannerRequestIdTest.MethodAndRequestId[] wantUnaryValues = { XGoogSpannerRequestIdTest.ofMethodAndRequestId( "google.spanner.v1.Spanner/BeginTransaction", - new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 7, 1)), + new XGoogSpannerRequestId(NON_DETERMINISTIC, NON_DETERMINISTIC, 7, 1)), XGoogSpannerRequestIdTest.ofMethodAndRequestId( "google.spanner.v1.Spanner/CreateSession", new XGoogSpannerRequestId(NON_DETERMINISTIC, 0, 1, 1)), XGoogSpannerRequestIdTest.ofMethodAndRequestId( "google.spanner.v1.Spanner/ExecuteSql", - new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 8, 1)), + new XGoogSpannerRequestId(NON_DETERMINISTIC, NON_DETERMINISTIC, 8, 1)), }; if (false) { // TODO(@odeke-em): enable in next PRs. xGoogReqIdInterceptor.checkExpectedUnaryXGoogRequestIdsAsSuffixes(wantUnaryValues); @@ -3063,7 +1962,8 @@ public void testPartitionedDmlRetriesOnUnavailable() { SpannerOptions.Builder builder = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()); try (Spanner spanner = builder.build().getService()) { DatabaseClient client = @@ -3086,11 +1986,12 @@ public void testDatabaseOrInstanceDoesNotExistOnInitialization() throws Exceptio try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .build() .getService()) { - mockSpanner.setBatchCreateSessionsExecutionTime( + mockSpanner.setCreateSessionExecutionTime( SimulatedExecutionTime.ofStickyException(exception)); DatabaseClientImpl dbClient = (DatabaseClientImpl) @@ -3099,13 +2000,12 @@ public void testDatabaseOrInstanceDoesNotExistOnInitialization() throws Exceptio // Wait until session creation has finished. Stopwatch watch = Stopwatch.createStarted(); while (watch.elapsed(TimeUnit.SECONDS) < 5 - && dbClient.pool.getNumberOfSessionsBeingCreated() > 0) { + && dbClient.multiplexedSessionDatabaseClient.isValid()) { //noinspection BusyWait Thread.sleep(1L); } // All session creation should fail and stop trying. - assertThat(dbClient.pool.getNumberOfSessionsInPool()).isEqualTo(0); - assertThat(dbClient.pool.getNumberOfSessionsBeingCreated()).isEqualTo(0); + assertFalse(dbClient.isValid()); mockSpanner.reset(); mockSpanner.removeAllExecutionTimes(); } @@ -3131,7 +2031,8 @@ public void testDatabaseOrInstanceDoesNotExistOnCreate() { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption( SessionPoolOptions.newBuilder() @@ -3140,10 +2041,8 @@ public void testDatabaseOrInstanceDoesNotExistOnCreate() { .build()) .build() .getService()) { - boolean useMultiplexedSession = - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession(); DatabaseId databaseId = DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE); - if (useMultiplexedSession && !waitForMinSessions.isZero()) { + if (!waitForMinSessions.isZero()) { assertThrows( ResourceNotFoundException.class, () -> spanner.getDatabaseClient(databaseId)); } else { @@ -3167,20 +2066,7 @@ public void testDatabaseOrInstanceDoesNotExistOnCreate() { .readWriteTransaction() .run(transaction -> transaction.executeUpdate(UPDATE_STATEMENT))); // No additional requests should have been sent by the client. - if (spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession() - && !spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()) { - // Note that in case of the use of multiplexed sessions for read-only alone, then we - // have 2 requests: - // 1. BatchCreateSessions for the session pool. - // 2. CreateSession for the multiplexed session. - assertThat(mockSpanner.getRequests()).hasSize(2); - } else { - // Note that in case of the use of regular sessions, then we have 1 request: - // BatchCreateSessions for the session pool. - // Note that in case of the use of multiplexed sessions for read-write, then we have 1 - // request: CreateSession for the multiplexed session. - assertThat(mockSpanner.getRequests()).hasSize(1); - } + assertThat(mockSpanner.getRequests()).hasSize(1); } } mockSpanner.reset(); @@ -3189,57 +2075,6 @@ public void testDatabaseOrInstanceDoesNotExistOnCreate() { } } - @Test - public void testDatabaseOrInstanceDoesNotExistOnReplenish() throws Exception { - StatusRuntimeException[] exceptions = - new StatusRuntimeException[] { - SpannerExceptionFactoryTest.newStatusResourceNotFoundException( - "Database", SpannerExceptionFactory.DATABASE_RESOURCE_TYPE, DATABASE_NAME), - SpannerExceptionFactoryTest.newStatusResourceNotFoundException( - "Instance", SpannerExceptionFactory.INSTANCE_RESOURCE_TYPE, INSTANCE_NAME) - }; - for (StatusRuntimeException exception : exceptions) { - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .build() - .getService()) { - mockSpanner.setBatchCreateSessionsExecutionTime( - SimulatedExecutionTime.ofStickyException(exception)); - DatabaseClientImpl dbClient = - (DatabaseClientImpl) - spanner.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - // Wait until session creation has finished. - Stopwatch watch = Stopwatch.createStarted(); - while (watch.elapsed(TimeUnit.SECONDS) < 5 - && dbClient.pool.getNumberOfSessionsBeingCreated() > 0) { - //noinspection BusyWait - Thread.sleep(1L); - } - // All session creation should fail and stop trying. - assertThat(dbClient.pool.getNumberOfSessionsInPool()).isEqualTo(0); - assertThat(dbClient.pool.getNumberOfSessionsBeingCreated()).isEqualTo(0); - // Force a maintainer run. This should schedule new session creation. - dbClient.pool.poolMaintainer.maintainPool(); - // Wait until the replenish has finished. - watch.reset().start(); - while (watch.elapsed(TimeUnit.SECONDS) < 5 - && dbClient.pool.getNumberOfSessionsBeingCreated() > 0) { - //noinspection BusyWait - Thread.sleep(1L); - } - // All session creation from replenishPool should fail and stop trying. - assertThat(dbClient.pool.getNumberOfSessionsInPool()).isEqualTo(0); - assertThat(dbClient.pool.getNumberOfSessionsBeingCreated()).isEqualTo(0); - } - mockSpanner.reset(); - mockSpanner.removeAllExecutionTimes(); - } - } - /** * Test showing that when a database is deleted while it is in use by a database client and then * re-created with the same name, will continue to return {@link DatabaseNotFoundException}s until @@ -3258,7 +2093,8 @@ public void testDatabaseOrInstanceIsDeletedAndThenRecreated() throws Exception { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .build() .getService()) { @@ -3269,7 +2105,7 @@ public void testDatabaseOrInstanceIsDeletedAndThenRecreated() throws Exception { // Wait until all sessions have been created and prepared. Stopwatch watch = Stopwatch.createStarted(); while (watch.elapsed(TimeUnit.SECONDS) < 5 - && (dbClient.pool.getNumberOfSessionsBeingCreated() > 0)) { + && (dbClient.multiplexedSessionDatabaseClient.getCurrentSessionReference() == null)) { //noinspection BusyWait Thread.sleep(1L); } @@ -3291,25 +2127,6 @@ public void testDatabaseOrInstanceIsDeletedAndThenRecreated() throws Exception { mockSpanner.reset(); // All subsequent calls should fail with a DatabaseNotFoundException. - if (!spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()) { - // We only verify this for read-only transactions if we are not using multiplexed - // sessions. For multiplexed sessions, we don't need any special handling, as deleting the - // database will also invalidate the multiplexed session, and trying to continue to use it - // will continue to return an error. - assertThrows( - ResourceNotFoundException.class, () -> dbClient.singleUse().executeQuery(SELECT1)); - } - - if (!spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()) { - // We only verify this for read-write transactions if we are not using multiplexed - // sessions. For multiplexed sessions, we don't need any special handling, as deleting the - // database will also invalidate the multiplexed session, and trying to continue to use it - // will continue to return an error. - assertThrows( - ResourceNotFoundException.class, - () -> dbClient.readWriteTransaction().run(transaction -> null)); - } - assertThat(mockSpanner.getRequests()).isEmpty(); // Now get a new database client. Normally multiple calls to Spanner#getDatabaseClient will // return the same instance, but not when the instance has been invalidated by a @@ -3342,12 +2159,11 @@ public void testGetInvalidatedClientMultipleTimes() { for (StatusRuntimeException exception : exceptions) { mockSpanner.setCreateSessionExecutionTime( SimulatedExecutionTime.ofStickyException(exception)); - mockSpanner.setBatchCreateSessionsExecutionTime( - SimulatedExecutionTime.ofStickyException(exception)); try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption(SessionPoolOptions.newBuilder().setMinSessions(0).build()) .build() @@ -3358,22 +2174,15 @@ public void testGetInvalidatedClientMultipleTimes() { spanner.getDatabaseClient( DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); for (int useClient = 0; useClient < 2; useClient++) { - // Using the same client multiple times should continue to return the same - // ResourceNotFoundException, even though the session pool has been invalidated. + // The multiplexed session client tries to create a new session at every attempt. assertThrows( ResourceNotFoundException.class, () -> dbClient.singleUse().executeQuery(SELECT1).next()); - if (spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()) { - // We should only receive 1 CreateSession request. The query should never be executed, - // as the session creation fails before it gets to executing a query. - assertEquals(1, mockSpanner.countRequestsOfType(CreateSessionRequest.class)); - assertEquals(0, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - } else { - // The server should only receive one BatchCreateSessions request for each run as we - // have set MinSessions=0. - assertThat(mockSpanner.getRequests()).hasSize(run + 1); - assertThat(dbClient.pool.isValid()).isFalse(); - } + // We should only receive 1 CreateSession request per attempt. + // The query should never be executed, as the session creation fails before it gets to + // executing a query. + assertEquals(run + 1, mockSpanner.countRequestsOfType(CreateSessionRequest.class)); + assertEquals(0, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); } } } @@ -3391,27 +2200,19 @@ public void testAllowNestedTransactions() throws InterruptedException { final int minSessions = spanner.getOptions().getSessionPoolOptions().getMinSessions(); Stopwatch watch = Stopwatch.createStarted(); while (watch.elapsed(TimeUnit.SECONDS) < 5 - && client.pool.getNumberOfSessionsInPool() < minSessions) { + && client.multiplexedSessionDatabaseClient.getCurrentSessionReference() == null) { //noinspection BusyWait Thread.sleep(1L); } - assertThat(client.pool.getNumberOfSessionsInPool()).isEqualTo(minSessions); - int expectedMinSessions = - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW() - ? minSessions - : minSessions - 1; Long res = client .readWriteTransaction() .allowNestedTransaction() .run( transaction -> { - assertThat(client.pool.getNumberOfSessionsInPool()) - .isEqualTo(expectedMinSessions); return transaction.executeUpdate(UPDATE_STATEMENT); }); assertThat(res).isEqualTo(UPDATE_COUNT); - assertThat(client.pool.getNumberOfSessionsInPool()).isEqualTo(minSessions); } @Test @@ -3427,37 +2228,22 @@ public void testNestedTransactionsUsingTwoDatabases() throws InterruptedExceptio final int minSessions = spanner.getOptions().getSessionPoolOptions().getMinSessions(); Stopwatch watch = Stopwatch.createStarted(); while (watch.elapsed(TimeUnit.SECONDS) < 5 - && (client1.pool.getNumberOfSessionsInPool() < minSessions - || client2.pool.getNumberOfSessionsInPool() < minSessions)) { + && (client1.multiplexedSessionDatabaseClient.getCurrentSessionReference() == null + || client2.multiplexedSessionDatabaseClient.getCurrentSessionReference() == null)) { //noinspection BusyWait Thread.sleep(1L); } - assertThat(client1.pool.getNumberOfSessionsInPool()).isEqualTo(minSessions); - assertThat(client2.pool.getNumberOfSessionsInPool()).isEqualTo(minSessions); - // When read-write transaction uses multiplexed sessions, then sessions are not checked out from - // the session pool. - int expectedMinSessions = isMultiplexedSessionsEnabledForRW() ? minSessions : minSessions - 1; Long res = client1 .readWriteTransaction() .allowNestedTransaction() .run( transaction -> { - // Client1 should have 1 session checked out. - // Client2 should have 0 sessions checked out. - assertThat(client1.pool.getNumberOfSessionsInPool()) - .isEqualTo(expectedMinSessions); - assertThat(client2.pool.getNumberOfSessionsInPool()).isEqualTo(minSessions); Long add = client2 .readWriteTransaction() .run( transaction1 -> { - // Both clients should now have 1 session checked out. - assertThat(client1.pool.getNumberOfSessionsInPool()) - .isEqualTo(expectedMinSessions); - assertThat(client2.pool.getNumberOfSessionsInPool()) - .isEqualTo(expectedMinSessions); try (ResultSet rs = transaction1.executeQuery(SELECT1)) { if (rs.next()) { return rs.getLong(0); @@ -3474,9 +2260,6 @@ public void testNestedTransactionsUsingTwoDatabases() throws InterruptedExceptio } }); assertThat(res).isEqualTo(2L); - // All sessions should now be checked back in to the pools. - assertThat(client1.pool.getNumberOfSessionsInPool()).isEqualTo(minSessions); - assertThat(client2.pool.getNumberOfSessionsInPool()).isEqualTo(minSessions); } @Test @@ -3486,7 +2269,8 @@ public void testBackendQueryOptions() { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption(SessionPoolOptions.newBuilder().setMinSessions(0).build()) .build() @@ -3527,7 +2311,8 @@ public void testBackendQueryOptionsWithAnalyzeQuery() { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption(SessionPoolOptions.newBuilder().setMinSessions(0).build()) .build() @@ -3570,7 +2355,8 @@ public void testBackendPartitionQueryOptions() { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption(SessionPoolOptions.newBuilder().setMinSessions(0).build()) .setDirectedReadOptions(DIRECTED_READ_OPTIONS2) @@ -3602,16 +2388,8 @@ public void testBackendPartitionQueryOptions() { // statistics package and directed read options. List requests = mockSpanner.getRequests(); assert requests.size() >= 2 : "required to have at least 2 requests"; - if (isMultiplexedSessionsEnabled()) { - assertThat(requests.get(requests.size() - 1)).isInstanceOf(ExecuteSqlRequest.class); - } else { - assertThat(requests.get(requests.size() - 1)).isInstanceOf(DeleteSessionRequest.class); - assertThat(requests.get(requests.size() - 2)).isInstanceOf(ExecuteSqlRequest.class); - } - ExecuteSqlRequest executeSqlRequest = - (ExecuteSqlRequest) - requests.get( - isMultiplexedSessionsEnabled() ? requests.size() - 1 : requests.size() - 2); + assertThat(requests.get(requests.size() - 1)).isInstanceOf(ExecuteSqlRequest.class); + ExecuteSqlRequest executeSqlRequest = (ExecuteSqlRequest) requests.get(requests.size() - 1); assertThat(executeSqlRequest.getQueryOptions()).isNotNull(); assertThat(executeSqlRequest.getQueryOptions().getOptimizerVersion()).isEqualTo("1"); assertThat(executeSqlRequest.getQueryOptions().getOptimizerStatisticsPackage()) @@ -3628,7 +2406,8 @@ public void testBackendPartitionQueryOptions() { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption(SessionPoolOptions.newBuilder().setMinSessions(0).build()) .setDirectedReadOptions(DIRECTED_READ_OPTIONS2) @@ -3659,16 +2438,8 @@ public void testBackendPartitionQueryOptions() { // statistics package and directed read options. List requests = mockSpanner.getRequests(); assert requests.size() >= 2 : "required to have at least 2 requests"; - if (isMultiplexedSessionsEnabled()) { - assertThat(requests.get(requests.size() - 1)).isInstanceOf(ExecuteSqlRequest.class); - } else { - assertThat(requests.get(requests.size() - 1)).isInstanceOf(DeleteSessionRequest.class); - assertThat(requests.get(requests.size() - 2)).isInstanceOf(ExecuteSqlRequest.class); - } - ExecuteSqlRequest executeSqlRequest = - (ExecuteSqlRequest) - requests.get( - isMultiplexedSessionsEnabled() ? requests.size() - 1 : requests.size() - 2); + assertThat(requests.get(requests.size() - 1)).isInstanceOf(ExecuteSqlRequest.class); + ExecuteSqlRequest executeSqlRequest = (ExecuteSqlRequest) requests.get(requests.size() - 1); assertThat(executeSqlRequest.getQueryOptions()).isNotNull(); assertThat(executeSqlRequest.getQueryOptions().getOptimizerVersion()).isEqualTo("1"); assertThat(executeSqlRequest.getQueryOptions().getOptimizerStatisticsPackage()) @@ -3684,7 +2455,8 @@ public void testBackendPartitionReadOptions() { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption(SessionPoolOptions.newBuilder().setMinSessions(0).build()) .setDirectedReadOptions(DIRECTED_READ_OPTIONS2) @@ -3712,16 +2484,8 @@ public void testBackendPartitionReadOptions() { // statistics package and directed read options. List requests = mockSpanner.getRequests(); assert requests.size() >= 2 : "required to have at least 2 requests"; - if (isMultiplexedSessionsEnabled()) { - assertThat(requests.get(requests.size() - 1)).isInstanceOf(ReadRequest.class); - } else { - assertThat(requests.get(requests.size() - 1)).isInstanceOf(DeleteSessionRequest.class); - assertThat(requests.get(requests.size() - 2)).isInstanceOf(ReadRequest.class); - } - ReadRequest readRequest = - (ReadRequest) - requests.get( - isMultiplexedSessionsEnabled() ? requests.size() - 1 : requests.size() - 2); + assertThat(requests.get(requests.size() - 1)).isInstanceOf(ReadRequest.class); + ReadRequest readRequest = (ReadRequest) requests.get(requests.size() - 1); assertThat(readRequest.getDirectedReadOptions()).isEqualTo(DIRECTED_READ_OPTIONS1); } } @@ -3734,7 +2498,8 @@ public void testBackendPartitionReadOptions() { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption(SessionPoolOptions.newBuilder().setMinSessions(0).build()) .setDirectedReadOptions(DIRECTED_READ_OPTIONS2) @@ -3762,16 +2527,8 @@ public void testBackendPartitionReadOptions() { // statistics package and directed read options. List requests = mockSpanner.getRequests(); assert requests.size() >= 2 : "required to have at least 2 requests"; - if (isMultiplexedSessionsEnabled()) { - assertThat(requests.get(requests.size() - 1)).isInstanceOf(ReadRequest.class); - } else { - assertThat(requests.get(requests.size() - 1)).isInstanceOf(DeleteSessionRequest.class); - assertThat(requests.get(requests.size() - 2)).isInstanceOf(ReadRequest.class); - } - ReadRequest readRequest = - (ReadRequest) - requests.get( - isMultiplexedSessionsEnabled() ? requests.size() - 1 : requests.size() - 2); + assertThat(requests.get(requests.size() - 1)).isInstanceOf(ReadRequest.class); + ReadRequest readRequest = (ReadRequest) requests.get(requests.size() - 1); assertThat(readRequest.getDirectedReadOptions()).isEqualTo(DIRECTED_READ_OPTIONS2); } } @@ -3833,7 +2590,8 @@ public void testClientIdReusedOnDatabaseNotFound() { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId("my-project") - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .build() .getService()) { @@ -3869,7 +2627,8 @@ public void testBatchCreateSessionsPermissionDenied() { try (Spanner spanner = SpannerOptions.newBuilder() .setProjectId("my-project") - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()) .setSessionPoolOption( SessionPoolOptions.newBuilder() @@ -3888,17 +2647,8 @@ public void testBatchCreateSessionsPermissionDenied() { spannerException = assertThrows(SpannerException.class, resultSet::next); } else { // This is blocking when we should wait for min sessions, and will therefore fail. - if (spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()) { - spannerException = - assertThrows(SpannerException.class, () -> spanner.getDatabaseClient(databaseId)); - } else { - // TODO: Fix the session pool implementation for waiting for min sessions, so this also - // propagates the error directly when session creation fails. - DatabaseClient client = spanner.getDatabaseClient(databaseId); - spannerException = - assertThrows( - SpannerException.class, () -> client.singleUse().executeQuery(SELECT1).next()); - } + spannerException = + assertThrows(SpannerException.class, () -> spanner.getDatabaseClient(databaseId)); } assertEquals(ErrorCode.PERMISSION_DENIED, spannerException.getErrorCode()); } finally { @@ -3988,34 +2738,8 @@ public void testSpecificTimeout() { }); } - @Test - public void testBatchCreateSessionsFailure_shouldNotPropagateToCloseMethod() { - assumeFalse( - "BatchCreateSessions RPC is not invoked for multiplexed sessions", - isMultiplexedSessionsEnabled()); - try { - // Simulate session creation failures on the backend. - mockSpanner.setBatchCreateSessionsExecutionTime( - SimulatedExecutionTime.ofStickyException( - Status.FAILED_PRECONDITION.asRuntimeException())); - DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - // This will not cause any failure as getting a session from the pool is guaranteed to be - // non-blocking, and any exceptions will be delayed until actual query execution. - try (ResultSet rs = client.singleUse().executeQuery(SELECT1)) { - SpannerException e = assertThrows(SpannerException.class, rs::next); - assertThat(e.getErrorCode()).isEqualTo(ErrorCode.FAILED_PRECONDITION); - } - } finally { - mockSpanner.setBatchCreateSessionsExecutionTime(SimulatedExecutionTime.none()); - } - } - @Test public void testCreateSessionsFailure_shouldNotPropagateToCloseMethod() { - assumeTrue( - "CreateSessions is not invoked for regular sessions", isMultiplexedSessionsEnabled()); try { // Simulate session creation failures on the backend. mockSpanner.setCreateSessionExecutionTime( @@ -4024,8 +2748,7 @@ public void testCreateSessionsFailure_shouldNotPropagateToCloseMethod() { // non-blocking, and any exceptions will be delayed until actual query execution. mockSpanner.freeze(); DatabaseClient client = - spannerWithEmptySessionPool.getDatabaseClient( - DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); + spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); try (ResultSet rs = client.singleUse().executeQuery(SELECT1)) { mockSpanner.unfreeze(); SpannerException exception = assertThrows(SpannerException.class, rs::next); @@ -4036,61 +2759,6 @@ public void testCreateSessionsFailure_shouldNotPropagateToCloseMethod() { } } - @Test - public void testReadWriteTransaction_usesOptions() { - SessionPool pool = mock(SessionPool.class); - PooledSessionFuture session = mock(PooledSessionFuture.class); - when(pool.getSession()).thenReturn(session); - TransactionOption option = mock(TransactionOption.class); - - TraceWrapper traceWrapper = - new TraceWrapper(Tracing.getTracer(), OpenTelemetry.noop().getTracer(""), false); - - DatabaseClientImpl client = new DatabaseClientImpl(pool, traceWrapper); - client.readWriteTransaction(option); - - verify(session).readWriteTransaction(option); - } - - @Test - public void testTransactionManager_usesOptions() { - SessionPool pool = mock(SessionPool.class); - PooledSessionFuture session = mock(PooledSessionFuture.class); - when(pool.getSession()).thenReturn(session); - TransactionOption option = mock(TransactionOption.class); - - DatabaseClientImpl client = new DatabaseClientImpl(pool, mock(TraceWrapper.class)); - try (TransactionManager ignore = client.transactionManager(option)) { - verify(session).transactionManager(option); - } - } - - @Test - public void testRunAsync_usesOptions() { - SessionPool pool = mock(SessionPool.class); - PooledSessionFuture session = mock(PooledSessionFuture.class); - when(pool.getSession()).thenReturn(session); - TransactionOption option = mock(TransactionOption.class); - - DatabaseClientImpl client = new DatabaseClientImpl(pool, mock(TraceWrapper.class)); - client.runAsync(option); - - verify(session).runAsync(option); - } - - @Test - public void testTransactionManagerAsync_usesOptions() { - SessionPool pool = mock(SessionPool.class); - PooledSessionFuture session = mock(PooledSessionFuture.class); - when(pool.getSession()).thenReturn(session); - TransactionOption option = mock(TransactionOption.class); - - DatabaseClientImpl client = new DatabaseClientImpl(pool, mock(TraceWrapper.class)); - try (AsyncTransactionManager ignore = client.transactionManagerAsync(option)) { - verify(session).transactionManagerAsync(option); - } - } - @Test public void testExecuteQueryWithPriority() { DatabaseClient client = @@ -4355,73 +3023,6 @@ public void testAsyncTransactionManagerCommitWithMaxCommitDelay() { request.getMaxCommitDelay()); } - @Test - public void singleUseNoAction_ClearsCheckedOutSession() { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Set checkedOut = client.pool.checkedOutSessions; - assertThat(checkedOut).isEmpty(); - - // Getting a single use read-only transaction and not using it should not cause any sessions - // to be stuck in the map of checked out sessions. - client.singleUse().close(); - - assertThat(checkedOut).isEmpty(); - } - - @Test - public void singleUseReadOnlyTransactionNoAction_ClearsCheckedOutSession() { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Set checkedOut = client.pool.checkedOutSessions; - assertThat(checkedOut).isEmpty(); - - client.singleUseReadOnlyTransaction().close(); - - assertThat(checkedOut).isEmpty(); - } - - @Test - public void readWriteTransactionNoAction_ClearsCheckedOutSession() { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Set checkedOut = client.pool.checkedOutSessions; - assertThat(checkedOut).isEmpty(); - - client.readWriteTransaction(); - - assertThat(checkedOut).isEmpty(); - } - - @Test - public void readOnlyTransactionNoAction_ClearsCheckedOutSession() { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Set checkedOut = client.pool.checkedOutSessions; - assertThat(checkedOut).isEmpty(); - - client.readOnlyTransaction().close(); - - assertThat(checkedOut).isEmpty(); - } - - @Test - public void transactionManagerNoAction_ClearsCheckedOutSession() { - DatabaseClientImpl client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - Set checkedOut = client.pool.checkedOutSessions; - assertThat(checkedOut).isEmpty(); - - client.transactionManager().close(); - - assertThat(checkedOut).isEmpty(); - } - @Test public void transactionContextFailsIfUsedMultipleTimes() { DatabaseClient client = @@ -5246,7 +3847,8 @@ public void testRetryOnResourceExhausted() { SpannerOptions.Builder builder = SpannerOptions.newBuilder() .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) .setCredentials(NoCredentials.getInstance()); RetryInfo retryInfo = RetryInfo.newBuilder() @@ -5338,97 +3940,6 @@ public void testSelectHasXGoogRequestIdHeader() { } } - @Test - public void testSessionPoolExhaustedError_containsStackTraces() { - assumeFalse( - "Session pool tests are skipped for multiplexed sessions", - isMultiplexedSessionsEnabledForRW()); - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption( - SessionPoolOptions.newBuilder() - .setFailIfPoolExhausted() - .setMinSessions(2) - .setMaxSessions(4) - .setWaitForMinSessionsDuration(Duration.ofSeconds(10L)) - .build()) - .build() - .getService()) { - DatabaseClient client = - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - List transactions = new ArrayList<>(); - // Deliberately leak 4 sessions. - for (int i = 0; i < 4; i++) { - // Get a transaction manager without doing anything with it. This will reserve a session - // from the pool, but not increase the number of sessions marked as in use. - transactions.add(client.transactionManager()); - } - // Trying to get yet another transaction will fail. - // NOTE: This fails directly, because we have set the setFailIfPoolExhausted() option. - SpannerException spannerException = - assertThrows(SpannerException.class, client::transactionManager); - assertEquals(ErrorCode.RESOURCE_EXHAUSTED, spannerException.getErrorCode()); - assertTrue( - spannerException.getMessage(), - spannerException.getMessage().contains("There are currently 4 sessions checked out:")); - assertTrue( - spannerException.getMessage(), - spannerException.getMessage().contains("Session was checked out from the pool at")); - - SessionPool pool = ((DatabaseClientImpl) client).pool; - // Verify that there are no sessions in the pool. - assertEquals(0, pool.getNumberOfSessionsInPool()); - // Verify that the sessions have not (yet) been marked as in use. - assertEquals(0, pool.getNumberOfSessionsInUse()); - assertEquals(0, pool.getMaxSessionsInUse()); - // Verify that we have 4 sessions in the pool. - assertEquals(4, pool.getTotalSessionsPlusNumSessionsBeingCreated()); - - // Release the sessions back into the pool. - for (TransactionManager transaction : transactions) { - transaction.close(); - } - // Wait up to 100 milliseconds for the sessions to actually all be in the pool, as there are - // two possible ways that the session pool handles the above: - // 1. The pool starts to create 4 sessions. - // 2. It then hands out whatever session has been created to one of the waiters. - // 3. The waiting process then executes its transaction, and when finished, the session is - // given to any other process waiting at that moment. - // The above means that although there will always be 4 sessions created, it could in theory - // be that not all of them are used, as it could be that a transaction finishes before the - // creation of session 2, 3, or 4 finished, and then the existing session is re-used. - Stopwatch watch = Stopwatch.createStarted(); - while (pool.getNumberOfSessionsInPool() < 4 && watch.elapsed(TimeUnit.MILLISECONDS) < 100) { - Thread.yield(); - } - // Closing the transactions should return the sessions to the pool. - assertEquals(4, pool.getNumberOfSessionsInPool()); - - DatabaseClientImpl dbClient = (DatabaseClientImpl) client; - int channelId = 0; - try (Session session = dbClient.getSession()) { - channelId = ((PooledSessionFuture) session).getChannel(); - } - int dbId = dbClient.dbId; - XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = {}; - - xGoogReqIdInterceptor.checkExpectedStreamingXGoogRequestIds(wantStreamingValues); - long NON_DETERMINISTIC = XGoogSpannerRequestIdTest.NON_DETERMINISTIC; - - XGoogSpannerRequestIdTest.MethodAndRequestId[] wantUnaryValues = { - XGoogSpannerRequestIdTest.ofMethodAndRequestId( - "google.spanner.v1.Spanner/CreateSession", - new XGoogSpannerRequestId(NON_DETERMINISTIC, 0, 1, 1)), - }; - if (false) { // TODO(@odeke-em): enable in next PRs. - xGoogReqIdInterceptor.checkExpectedUnaryXGoogRequestIdsAsSuffixes(wantUnaryValues); - } - } - } - static void assertAsString(String expected, ResultSet resultSet, int col) { assertEquals(expected, resultSet.getValue(col).getAsString()); assertEquals(ImmutableList.of(expected), resultSet.getValue(col).getAsStringList()); @@ -5737,88 +4248,4 @@ private ListValue getRows(Dialect dialect) { return valuesBuilder.build(); } - - private boolean isMultiplexedSessionsEnabled() { - if (spanner.getOptions() == null || spanner.getOptions().getSessionPoolOptions() == null) { - return false; - } - return spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession(); - } - - private boolean isMultiplexedSessionsEnabledForRW() { - if (spanner.getOptions() == null || spanner.getOptions().getSessionPoolOptions() == null) { - return false; - } - return spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW(); - } - - @Test - public void testdbIdFromClientId() { - SessionPool pool = mock(SessionPool.class); - PooledSessionFuture session = mock(PooledSessionFuture.class); - when(pool.getSession()).thenReturn(session); - TransactionOption option = mock(TransactionOption.class); - DatabaseClientImpl client = new DatabaseClientImpl(pool, mock(TraceWrapper.class)); - - for (int i = 0; i < 10; i++) { - String dbId = String.format("%d", i); - int id = client.dbIdFromClientId(dbId); - assertEquals(id, i + 2); // There was already 1 dbId after new DatabaseClientImpl. - } - } - - @Test - public void testrunWithSessionRetry_withRequestId() { - // Tests that DatabaseClientImpl.runWithSessionRetry correctly returns a XGoogSpannerRequestId - // and correctly increases its nthRequest ordinal number and that attempts stay at 1, given - // a fresh session returned on SessionNotFoundException. - SessionPool pool = mock(SessionPool.class); - PooledSessionFuture sessionFut = mock(PooledSessionFuture.class); - when(pool.getSession()).thenReturn(sessionFut); - SessionPool.PooledSession pooledSession = mock(SessionPool.PooledSession.class); - when(sessionFut.get()).thenReturn(pooledSession); - SessionPool.PooledSessionReplacementHandler sessionReplacementHandler = - mock(SessionPool.PooledSessionReplacementHandler.class); - when(pool.getPooledSessionReplacementHandler()).thenReturn(sessionReplacementHandler); - when(sessionReplacementHandler.replaceSession(any(), any())).thenReturn(sessionFut); - DatabaseClientImpl client = new DatabaseClientImpl(pool, mock(TraceWrapper.class)); - - // 1. Run with no fail runs a single attempt. - final AtomicInteger nCalls = new AtomicInteger(0); - client.runWithSessionRetry( - (session, reqId) -> { - assertEquals(reqId.getAttempt(), 1); - nCalls.incrementAndGet(); - return 1; - }); - assertEquals(nCalls.get(), 1); - - // Reset the call counter. - nCalls.set(0); - - // 2. Run with SessionNotFoundException and ensure that a fresh requestId is returned each time. - SessionNotFoundException excSessionNotFound = - SpannerExceptionFactoryTest.newSessionNotFoundException( - "projects/p/instances/i/databases/d/sessions/s"); - - final AtomicLong priorNthRequest = new AtomicLong(client.getNthRequest()); - client.runWithSessionRetry( - (session, reqId) -> { - // Monotonically increasing priorNthRequest. - assertEquals(reqId.getNthRequest() - priorNthRequest.get(), 1); - priorNthRequest.set(reqId.getNthRequest()); - - // Attempts stay at 1 since with a SessionNotFound exception, - // a fresh requestId is generated. - assertEquals(reqId.getAttempt(), 1); - - if (nCalls.addAndGet(1) < 4) { - throw excSessionNotFound; - } - - return 1; - }); - - assertEquals(nCalls.get(), 4); - } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplWithDefaultRWTransactionOptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplWithDefaultRWTransactionOptionsTest.java index f3199ae3683..d37bef01895 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplWithDefaultRWTransactionOptionsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplWithDefaultRWTransactionOptionsTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.cloud.spanner.MockSpannerTestUtil.INVALID_SELECT_STATEMENT; import static com.google.cloud.spanner.MockSpannerTestUtil.SELECT1; import static com.google.cloud.spanner.MockSpannerTestUtil.SELECT1_RESULTSET; @@ -84,7 +83,6 @@ public class DatabaseClientImplWithDefaultRWTransactionOptionsTest { @BeforeClass public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultBenchmark.java index 35712cd5b4e..28580f53365 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultBenchmark.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultBenchmark.java @@ -17,7 +17,6 @@ package com.google.cloud.spanner; import static com.google.cloud.spanner.BenchmarkingUtilityScripts.collectResults; -import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -114,9 +113,6 @@ public void teardown() throws Exception { @Benchmark public void burstQueries(final BenchmarkState server) throws Exception { final DatabaseClientImpl client = server.client; - SessionPool pool = client.pool; - assertThat(pool.totalSessions()) - .isEqualTo(server.spanner.getOptions().getSessionPoolOptions().getMinSessions()); ListeningScheduledExecutorService service = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(PARALLEL_THREADS)); @@ -132,9 +128,6 @@ public void burstQueries(final BenchmarkState server) throws Exception { @Benchmark public void burstQueriesAndWrites(final BenchmarkState server) throws Exception { final DatabaseClientImpl client = server.client; - SessionPool pool = client.pool; - assertThat(pool.totalSessions()) - .isEqualTo(server.spanner.getOptions().getSessionPoolOptions().getMinSessions()); ListeningScheduledExecutorService service = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(PARALLEL_THREADS)); @@ -154,9 +147,6 @@ public void burstQueriesAndWrites(final BenchmarkState server) throws Exception @Benchmark public void burstUpdates(final BenchmarkState server) throws Exception { final DatabaseClientImpl client = server.client; - SessionPool pool = client.pool; - assertThat(pool.totalSessions()) - .isEqualTo(server.spanner.getOptions().getSessionPoolOptions().getMinSessions()); ListeningScheduledExecutorService service = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(PARALLEL_THREADS)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DisableDefaultMtlsProvider.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DisableDefaultMtlsProvider.java deleted file mode 100644 index bf287da5d42..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DisableDefaultMtlsProvider.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.RETRANSFORMATION; -import static net.bytebuddy.implementation.bytecode.assign.Assigner.Typing.DYNAMIC; -import static net.bytebuddy.matcher.ElementMatchers.is; -import static net.bytebuddy.matcher.ElementMatchers.named; -import static net.bytebuddy.matcher.ElementMatchers.none; - -import com.google.auth.mtls.DefaultMtlsProviderFactory; -import java.lang.instrument.Instrumentation; -import java.lang.instrument.UnmodifiableClassException; -import net.bytebuddy.agent.ByteBuddyAgent; -import net.bytebuddy.agent.builder.AgentBuilder; -import net.bytebuddy.asm.Advice; - -/** Temporary fix for https://github.com/googleapis/sdk-platform-java/issues/3911. */ -public class DisableDefaultMtlsProvider { - static class DisableMtlsCheck { - @Advice.OnMethodEnter(skipOn = Advice.OnDefaultValue.class) - public static boolean before() { - // Skip original method execution - return false; - } - - @Advice.OnMethodExit - public static void after( - @Advice.Return(readOnly = false, typing = DYNAMIC) Object returnValue) { - returnValue = null; - } - } - - static void premain(String agentArgs, Instrumentation inst) { - new AgentBuilder.Default() - .disableClassFormatChanges() - .with(RETRANSFORMATION) - .ignore(none()) - .type(is(DefaultMtlsProviderFactory.class)) - .transform( - (builder, typeDescription, classLoader, module, protectionDomain) -> - builder.visit(Advice.to(DisableMtlsCheck.class).on(named("create")))) - .installOn(inst); - } - - private static boolean initialized = false; - - public static void disableDefaultMtlsProvider() throws UnmodifiableClassException { - synchronized (DisableDefaultMtlsProvider.class) { - if (initialized) { - return; - } - Instrumentation instrumentation = ByteBuddyAgent.install(); - premain("", instrumentation); - instrumentation.retransformClasses(DefaultMtlsProviderFactory.class); - initialized = true; - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ExcludeFromChangeStreamTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ExcludeFromChangeStreamTest.java new file mode 100644 index 00000000000..498e2fab107 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ExcludeFromChangeStreamTest.java @@ -0,0 +1,299 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import com.google.cloud.NoCredentials; +import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; +import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; +import com.google.cloud.spanner.connection.AbstractMockServerTest; +import com.google.cloud.spanner.connection.RandomResultSetGenerator; +import com.google.common.collect.ImmutableList; +import com.google.spanner.v1.BeginTransactionRequest; +import com.google.spanner.v1.CommitRequest; +import com.google.spanner.v1.ReadRequest; +import io.grpc.ManagedChannelBuilder; +import io.grpc.Status; +import java.util.concurrent.atomic.AtomicBoolean; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ExcludeFromChangeStreamTest extends AbstractMockServerTest { + + @BeforeClass + public static void setupReadResult() { + RandomResultSetGenerator generator = new RandomResultSetGenerator(10); + mockSpanner.putStatementResult( + StatementResult.query( + Statement.of("SELECT my-column FROM my-table WHERE 1=1"), generator.generate())); + } + + private Spanner createSpanner() { + return SpannerOptions.newBuilder() + .setProjectId("fake-project") + .setHost("http://localhost:" + getPort()) + .setCredentials(NoCredentials.getInstance()) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .build() + .getService(); + } + + @Test + public void testStandardTransaction() { + try (Spanner spanner = createSpanner()) { + for (int i = 0; i < 10; i++) { + DatabaseClient client = + spanner.getDatabaseClient( + DatabaseId.of("fake-project", "fake-instance", "fake-database")); + client + .readWriteTransaction(Options.tag("some-tag"), Options.excludeTxnFromChangeStreams()) + .run( + transaction -> { + try (ResultSet resultSet = + transaction.read("my-table", KeySet.all(), ImmutableList.of("my-column"))) { + while (resultSet.next()) {} + } + transaction.buffer( + Mutation.newInsertOrUpdateBuilder("my-table") + .set("my-column") + .to(1L) + .build()); + return null; + }); + assertEquals(0, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + assertEquals(1, mockSpanner.countRequestsOfType(ReadRequest.class)); + assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); + + ReadRequest readRequest = mockSpanner.getRequestsOfType(ReadRequest.class).get(0); + assertTrue(readRequest.hasTransaction()); + assertTrue(readRequest.getTransaction().hasBegin()); + assertTrue(readRequest.getTransaction().getBegin().hasReadWrite()); + assertTrue(readRequest.getTransaction().getBegin().getExcludeTxnFromChangeStreams()); + + CommitRequest commitRequest = mockSpanner.getRequestsOfType(CommitRequest.class).get(0); + assertNotNull(commitRequest.getTransactionId()); + + mockSpanner.clearRequests(); + } + } + } + + @Test + public void testTransactionAbortedDuringRead() { + try (Spanner spanner = createSpanner()) { + for (int i = 0; i < 10; i++) { + DatabaseClient client = + spanner.getDatabaseClient( + DatabaseId.of("fake-project", "fake-instance", "fake-database")); + AtomicBoolean hasAborted = new AtomicBoolean(false); + client + .readWriteTransaction(Options.tag("some-tag"), Options.excludeTxnFromChangeStreams()) + .run( + transaction -> { + if (hasAborted.compareAndSet(false, true)) { + mockSpanner.abortNextStatement(); + } + try (ResultSet resultSet = + transaction.read("my-table", KeySet.all(), ImmutableList.of("my-column"))) { + while (resultSet.next()) {} + } + transaction.buffer( + Mutation.newInsertOrUpdateBuilder("my-table") + .set("my-column") + .to(1L) + .build()); + return null; + }); + assertEquals(1, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + assertEquals(2, mockSpanner.countRequestsOfType(ReadRequest.class)); + assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); + + BeginTransactionRequest beginRequest = + mockSpanner.getRequestsOfType(BeginTransactionRequest.class).get(0); + assertTrue(beginRequest.getOptions().hasReadWrite()); + assertTrue(beginRequest.getOptions().getExcludeTxnFromChangeStreams()); + + ReadRequest firstReadRequest = mockSpanner.getRequestsOfType(ReadRequest.class).get(0); + assertTrue(firstReadRequest.hasTransaction()); + assertTrue(firstReadRequest.getTransaction().hasBegin()); + assertTrue(firstReadRequest.getTransaction().getBegin().hasReadWrite()); + assertTrue(firstReadRequest.getTransaction().getBegin().getExcludeTxnFromChangeStreams()); + + ReadRequest secondReadRequest = mockSpanner.getRequestsOfType(ReadRequest.class).get(1); + assertTrue(secondReadRequest.hasTransaction()); + assertTrue(secondReadRequest.getTransaction().hasId()); + + CommitRequest commitRequest = mockSpanner.getRequestsOfType(CommitRequest.class).get(0); + assertNotNull(commitRequest.getTransactionId()); + + mockSpanner.clearRequests(); + } + } + } + + @Test + public void testTransactionAbortedDuringCommit() { + try (Spanner spanner = createSpanner()) { + for (int i = 0; i < 10; i++) { + DatabaseClient client = + spanner.getDatabaseClient( + DatabaseId.of("fake-project", "fake-instance", "fake-database")); + AtomicBoolean hasAborted = new AtomicBoolean(false); + client + .readWriteTransaction(Options.tag("some-tag"), Options.excludeTxnFromChangeStreams()) + .run( + transaction -> { + try (ResultSet resultSet = + transaction.read("my-table", KeySet.all(), ImmutableList.of("my-column"))) { + while (resultSet.next()) {} + } + if (hasAborted.compareAndSet(false, true)) { + mockSpanner.abortNextStatement(); + } + transaction.buffer( + Mutation.newInsertOrUpdateBuilder("my-table") + .set("my-column") + .to(1L) + .build()); + return null; + }); + assertEquals(0, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + assertEquals(2, mockSpanner.countRequestsOfType(ReadRequest.class)); + assertEquals(2, mockSpanner.countRequestsOfType(CommitRequest.class)); + + ReadRequest firstReadRequest = mockSpanner.getRequestsOfType(ReadRequest.class).get(0); + assertTrue(firstReadRequest.hasTransaction()); + assertTrue(firstReadRequest.getTransaction().hasBegin()); + assertTrue(firstReadRequest.getTransaction().getBegin().hasReadWrite()); + assertTrue(firstReadRequest.getTransaction().getBegin().getExcludeTxnFromChangeStreams()); + + ReadRequest secondReadRequest = mockSpanner.getRequestsOfType(ReadRequest.class).get(1); + assertTrue(secondReadRequest.hasTransaction()); + assertTrue(secondReadRequest.getTransaction().hasBegin()); + assertTrue(secondReadRequest.getTransaction().getBegin().hasReadWrite()); + assertTrue(secondReadRequest.getTransaction().getBegin().getExcludeTxnFromChangeStreams()); + + for (CommitRequest commitRequest : mockSpanner.getRequestsOfType(CommitRequest.class)) { + assertNotNull(commitRequest.getTransactionId()); + } + mockSpanner.clearRequests(); + } + } + } + + @Test + public void testReadReturnsUnavailable() { + + try (Spanner spanner = createSpanner()) { + for (int i = 0; i < 10; i++) { + mockSpanner.setStreamingReadExecutionTime( + SimulatedExecutionTime.ofException(Status.UNAVAILABLE.asRuntimeException())); + DatabaseClient client = + spanner.getDatabaseClient( + DatabaseId.of("fake-project", "fake-instance", "fake-database")); + client + .readWriteTransaction(Options.tag("some-tag"), Options.excludeTxnFromChangeStreams()) + .run( + transaction -> { + try (ResultSet resultSet = + transaction.read("my-table", KeySet.all(), ImmutableList.of("my-column"))) { + while (resultSet.next()) {} + } + transaction.buffer( + Mutation.newInsertOrUpdateBuilder("my-table") + .set("my-column") + .to(1L) + .build()); + return null; + }); + assertEquals(0, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + assertEquals(2, mockSpanner.countRequestsOfType(ReadRequest.class)); + assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); + + ReadRequest firstReadRequest = mockSpanner.getRequestsOfType(ReadRequest.class).get(0); + assertTrue(firstReadRequest.hasTransaction()); + assertTrue(firstReadRequest.getTransaction().hasBegin()); + assertTrue(firstReadRequest.getTransaction().getBegin().hasReadWrite()); + assertTrue(firstReadRequest.getTransaction().getBegin().getExcludeTxnFromChangeStreams()); + + ReadRequest secondReadRequest = mockSpanner.getRequestsOfType(ReadRequest.class).get(1); + assertTrue(secondReadRequest.hasTransaction()); + assertTrue(secondReadRequest.getTransaction().hasBegin()); + assertTrue(secondReadRequest.getTransaction().getBegin().hasReadWrite()); + assertTrue(secondReadRequest.getTransaction().getBegin().getExcludeTxnFromChangeStreams()); + + CommitRequest commitRequest = mockSpanner.getRequestsOfType(CommitRequest.class).get(0); + assertNotNull(commitRequest.getTransactionId()); + + mockSpanner.clearRequests(); + } + } + } + + @Test + public void testReadReturnsUnavailableHalfway() { + try (Spanner spanner = createSpanner()) { + for (int i = 0; i < 10; i++) { + mockSpanner.setStreamingReadExecutionTime( + SimulatedExecutionTime.ofStreamException(Status.UNAVAILABLE.asRuntimeException(), 2)); + + DatabaseClient client = + spanner.getDatabaseClient( + DatabaseId.of("fake-project", "fake-instance", "fake-database")); + client + .readWriteTransaction(Options.tag("some-tag"), Options.excludeTxnFromChangeStreams()) + .run( + transaction -> { + try (ResultSet resultSet = + transaction.read("my-table", KeySet.all(), ImmutableList.of("my-column"))) { + while (resultSet.next()) {} + } + transaction.buffer( + Mutation.newInsertOrUpdateBuilder("my-table") + .set("my-column") + .to(1L) + .build()); + return null; + }); + assertEquals(0, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + assertEquals(2, mockSpanner.countRequestsOfType(ReadRequest.class)); + assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); + + ReadRequest firstReadRequest = mockSpanner.getRequestsOfType(ReadRequest.class).get(0); + assertTrue(firstReadRequest.hasTransaction()); + assertTrue(firstReadRequest.getTransaction().hasBegin()); + assertTrue(firstReadRequest.getTransaction().getBegin().hasReadWrite()); + assertTrue(firstReadRequest.getTransaction().getBegin().getExcludeTxnFromChangeStreams()); + + ReadRequest secondReadRequest = mockSpanner.getRequestsOfType(ReadRequest.class).get(1); + assertTrue(secondReadRequest.hasTransaction()); + assertTrue(secondReadRequest.getTransaction().hasId()); + + CommitRequest commitRequest = mockSpanner.getRequestsOfType(CommitRequest.class).get(0); + assertNotNull(commitRequest.getTransactionId()); + + mockSpanner.clearRequests(); + } + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java index 0d46dea3a39..4007c972c24 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java @@ -75,7 +75,8 @@ public void onTransactionMetadata(Transaction transaction, boolean shouldInclude throws SpannerException {} @Override - public SpannerException onError(SpannerException e, boolean withBeginTransaction) { + public SpannerException onError( + SpannerException e, boolean withBeginTransaction, boolean lastStatement) { return e; } @@ -88,7 +89,9 @@ public void onPrecommitToken(MultiplexedSessionPrecommitToken token) {} @Before public void setUp() { - stream = new GrpcStreamIterator(10, /* cancelQueryWhenClientIsClosed= */ false); + stream = + new GrpcStreamIterator( + /* lastStatement= */ false, 10, /* cancelQueryWhenClientIsClosed= */ false); stream.setCall( new SpannerRpc.StreamingCall() { @Override diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ITSessionPoolIntegrationTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ITSessionPoolIntegrationTest.java deleted file mode 100644 index ab6dfea4d61..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ITSessionPoolIntegrationTest.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.cloud.spanner.testing.ExperimentalHostHelper.isExperimentalHost; -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assume.assumeFalse; - -import com.google.cloud.grpc.GrpcTransportOptions.ExecutorFactory; -import com.google.cloud.spanner.SessionPool.PooledSessionFuture; -import io.opencensus.trace.Tracing; -import io.opentelemetry.api.OpenTelemetry; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.concurrent.TimeUnit; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** - * Integration tests for read and query. - * - *

See also {@code it/WriteIntegrationTest}, which provides coverage of writing and reading back - * all Cloud Spanner types. - */ -@Category(SerialIntegrationTest.class) -@RunWith(JUnit4.class) -public class ITSessionPoolIntegrationTest { - @ClassRule public static IntegrationTestEnv env = new IntegrationTestEnv(); - private static final String TABLE_NAME = "TestTable"; - - private static Database db; - private SessionPool pool; - - @BeforeClass - public static void setUpDatabase() { - assumeFalse("Only Multiplexed Sessions are supported on this host", isExperimentalHost()); - db = - env.getTestHelper() - .createTestDatabase( - "CREATE TABLE TestTable (" - + " Key STRING(MAX) NOT NULL," - + " StringValue STRING(MAX)," - + ") PRIMARY KEY (Key)", - "CREATE INDEX TestTableByValue ON TestTable(StringValue)"); - - // Includes k0..k14. Note that strings k{10,14} sort between k1 and k2. - List mutations = new ArrayList<>(); - for (int i = 0; i < 15; ++i) { - mutations.add( - Mutation.newInsertOrUpdateBuilder(TABLE_NAME) - .set("Key") - .to("k" + i) - .set("StringValue") - .to("v" + i) - .build()); - } - env.getTestHelper().getDatabaseClient(db).write(mutations); - } - - @Before - public void setUp() { - SessionPoolOptions options = - SessionPoolOptions.newBuilder().setMinSessions(1).setMaxSessions(2).build(); - pool = - SessionPool.createPool( - options, - new ExecutorFactory() { - - @Override - public void release(ScheduledExecutorService executor) { - executor.shutdown(); - } - - @Override - public ScheduledExecutorService get() { - return new ScheduledThreadPoolExecutor(2); - } - }, - ((SpannerImpl) env.getTestHelper().getClient()).getSessionClient(db.getId()), - new TraceWrapper(Tracing.getTracer(), OpenTelemetry.noop().getTracer(""), false), - OpenTelemetry.noop()); - } - - @Test - public void sessionCreation() { - try (PooledSessionFuture session = pool.getSession()) { - assertThat(session.get()).isNotNull(); - } - - try (PooledSessionFuture session = pool.getSession(); - PooledSessionFuture session2 = pool.getSession()) { - assertThat(session.get()).isNotNull(); - assertThat(session2.get()).isNotNull(); - } - } - - @Test - public void poolExhaustion() throws Exception { - Session session1 = pool.getSession().get(); - Session session2 = pool.getSession().get(); - final CountDownLatch latch = new CountDownLatch(1); - new Thread( - () -> { - try (Session session3 = pool.getSession().get()) { - latch.countDown(); - } - }) - .start(); - assertThat(latch.await(5, TimeUnit.SECONDS)).isFalse(); - session1.close(); - session2.close(); - latch.await(); - } - - @Test - public void multipleWaiters() throws Exception { - Session session1 = pool.getSession().get(); - Session session2 = pool.getSession().get(); - int numSessions = 5; - final CountDownLatch latch = new CountDownLatch(numSessions); - for (int i = 0; i < numSessions; i++) { - new Thread( - () -> { - try (Session session = pool.getSession().get()) { - latch.countDown(); - } - }) - .start(); - } - session1.close(); - session2.close(); - // Everyone should get session pretty quickly. - assertThat(latch.await(1, TimeUnit.SECONDS)).isTrue(); - } - - @Test - public void closeQuicklyDoesNotBlockIndefinitely() throws Exception { - pool.closeAsync(new SpannerImpl.ClosedException()).get(); - } - - @Test - public void closeAfterInitialCreateDoesNotBlockIndefinitely() throws Exception { - pool.getSession().close(); - pool.closeAsync(new SpannerImpl.ClosedException()).get(); - } - - @Test - public void closeWhenSessionsActiveFinishes() throws Exception { - pool.getSession().get(); - // This will log a warning that a session has been leaked, as the session that we retrieved in - // the previous statement was never returned to the pool. - pool.closeAsync(new SpannerImpl.ClosedException()).get(); - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InlineBeginBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InlineBeginBenchmark.java index 1448ebbc96a..c3063f4d6c5 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InlineBeginBenchmark.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InlineBeginBenchmark.java @@ -16,8 +16,6 @@ package com.google.cloud.spanner; -import static com.google.common.truth.Truth.assertThat; - import com.google.api.gax.rpc.TransportChannelProvider; import com.google.cloud.NoCredentials; import com.google.common.base.Stopwatch; @@ -103,8 +101,7 @@ public void setup() throws Exception { spanner.getDatabaseClient(DatabaseId.of(options.getProjectId(), instance, database)); Stopwatch watch = Stopwatch.createStarted(); // Wait until the session pool has initialized. - while (client.pool.getNumberOfSessionsInPool() - < spanner.getOptions().getSessionPoolOptions().getMinSessions()) { + while (client.multiplexedSessionDatabaseClient.getCurrentSessionReference() == null) { Thread.sleep(1L); if (watch.elapsed(TimeUnit.SECONDS) > 10L) { break; @@ -143,9 +140,6 @@ public void teardown() throws Exception { public void burstRead(final BenchmarkState server) throws Exception { int totalQueries = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions() * 8; int parallelThreads = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions() * 2; - SessionPool pool = server.client.pool; - assertThat(pool.totalSessions()) - .isEqualTo(server.spanner.getOptions().getSessionPoolOptions().getMinSessions()); ListeningScheduledExecutorService service = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); @@ -173,9 +167,6 @@ public void burstRead(final BenchmarkState server) throws Exception { public void burstWrite(final BenchmarkState server) throws Exception { int totalWrites = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions() * 8; int parallelThreads = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions() * 2; - SessionPool pool = server.client.pool; - assertThat(pool.totalSessions()) - .isEqualTo(server.spanner.getOptions().getSessionPoolOptions().getMinSessions()); ListeningScheduledExecutorService service = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); @@ -201,9 +192,6 @@ public void burstReadAndWrite(final BenchmarkState server) throws Exception { int totalWrites = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions() * 4; int totalReads = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions() * 4; int parallelThreads = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions() * 2; - SessionPool pool = server.client.pool; - assertThat(pool.totalSessions()) - .isEqualTo(server.spanner.getOptions().getSessionPoolOptions().getMinSessions()); ListeningScheduledExecutorService service = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InlineBeginTransactionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InlineBeginTransactionTest.java index dae77037957..db1b39ac0a0 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InlineBeginTransactionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InlineBeginTransactionTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.cloud.spanner.SpannerApiFutures.get; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; @@ -141,7 +140,6 @@ public class InlineBeginTransactionTest { @BeforeClass public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java deleted file mode 100644 index f852fc2903f..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import com.google.cloud.spanner.SessionPool.PooledSession; -import com.google.cloud.spanner.SessionPool.PooledSessionFuture; -import com.google.cloud.spanner.SessionPool.SessionFutureWrapper; -import com.google.cloud.spanner.testing.RemoteSpannerHelper; -import io.opentelemetry.api.common.Attributes; - -/** - * Subclass of {@link IntegrationTestEnv} that allows the user to specify when the underlying - * session of a {@link PooledSession} should be closed. This can be used to ensure that the - * recreation of sessions that have been invalidated by the server works. - */ -public class IntegrationTestWithClosedSessionsEnv extends IntegrationTestEnv { - private static class RemoteSpannerHelperWithClosedSessions extends RemoteSpannerHelper { - private RemoteSpannerHelperWithClosedSessions( - SpannerOptions options, InstanceId instanceId, Spanner client) { - super(options, instanceId, client); - } - } - - @Override - RemoteSpannerHelper createTestHelper(SpannerOptions options, InstanceId instanceId) { - SpannerWithClosedSessionsImpl spanner = new SpannerWithClosedSessionsImpl(options); - return new RemoteSpannerHelperWithClosedSessions(options, instanceId, spanner); - } - - private static class SpannerWithClosedSessionsImpl extends SpannerImpl { - SpannerWithClosedSessionsImpl(SpannerOptions options) { - super(options); - } - - @Override - DatabaseClientImpl createDatabaseClient( - String clientId, - SessionPool pool, - boolean useMultiplexedSessionBlindWriteIgnore, - MultiplexedSessionDatabaseClient ignore, - boolean useMultiplexedSessionPartitionedOpsIgnore, - boolean useMultiplexedSessionForRWIgnore, - Attributes attributes) { - return new DatabaseClientWithClosedSessionImpl(clientId, pool, tracer); - } - } - - /** - * {@link DatabaseClient} that allows the user to specify when an underlying session of a {@link - * PooledSession} should be closed. - */ - public static class DatabaseClientWithClosedSessionImpl extends DatabaseClientImpl { - private boolean invalidateNextSession = false; - private boolean allowReplacing = true; - - DatabaseClientWithClosedSessionImpl(String clientId, SessionPool pool, TraceWrapper tracer) { - super(clientId, pool, tracer); - } - - /** Invalidate the next session that is checked out from the pool. */ - public void invalidateNextSession() { - invalidateNextSession = true; - } - - /** Sets whether invalidated sessions should be replaced or not. */ - public void setAllowSessionReplacing(boolean allow) { - this.allowReplacing = allow; - } - - @Override - PooledSessionFuture getSession() { - PooledSessionFuture session = super.getSession(); - if (invalidateNextSession) { - session.get().delegate.close(); - session.get().setAllowReplacing(false); - awaitDeleted(session.get().delegate); - session.get().setAllowReplacing(allowReplacing); - invalidateNextSession = false; - } - session.get().setAllowReplacing(allowReplacing); - return session; - } - - @Override - SessionFutureWrapper getMultiplexedSession() { - SessionFutureWrapper session = (SessionFutureWrapper) super.getMultiplexedSession(); - if (invalidateNextSession) { - session.get().get().getDelegate().close(); - session.get().get().setAllowReplacing(false); - awaitDeleted(session.get().get().getDelegate()); - session.get().get().setAllowReplacing(allowReplacing); - invalidateNextSession = false; - } - session.get().get().setAllowReplacing(allowReplacing); - return session; - } - - /** - * Deleting a session server side takes some time. This method checks and waits until the - * session really has been deleted. - */ - private void awaitDeleted(Session session) { - // Wait until the session has actually been deleted. - while (true) { - try (ResultSet rs = session.singleUse().executeQuery(Statement.of("SELECT 1"))) { - while (rs.next()) { - // Do nothing. - } - Thread.sleep(500L); - } catch (SpannerException e) { - if (e.getErrorCode() == ErrorCode.NOT_FOUND - && (e.getMessage().contains("Session not found") - || e.getMessage().contains("Session was concurrently deleted"))) { - break; - } else { - throw e; - } - } catch (InterruptedException e) { - break; - } - } - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LocationAwareTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LocationAwareTest.java new file mode 100644 index 00000000000..aa038d512ee --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LocationAwareTest.java @@ -0,0 +1,270 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner; + +import static com.google.cloud.spanner.SpannerApiFutures.get; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; + +import com.google.api.core.ApiFuture; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.cloud.NoCredentials; +import com.google.cloud.spanner.AsyncResultSet.CallbackResponse; +import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; +import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; +import com.google.cloud.spanner.SpannerOptions.CallContextConfigurator; +import com.google.cloud.spanner.connection.AbstractMockServerTest; +import com.google.cloud.spanner.connection.RandomResultSetGenerator; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.ListeningExecutorService; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.SpannerGrpc; +import io.grpc.Context; +import io.grpc.ManagedChannelBuilder; +import io.grpc.MethodDescriptor; +import io.grpc.Status; +import java.time.Duration; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeUnit; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class LocationAwareTest extends AbstractMockServerTest { + private static final Statement SELECT_RANDOM_STATEMENT = Statement.of("select * from random"); + private static final int RANDOM_RESULT_ROW_COUNT = 20; + private static Spanner spanner; + private static DatabaseClient client; + + private static final class TimeoutHolder { + private Duration timeout; + } + + @BeforeClass + public static void enableLocationApiAndSetupClient() { + SpannerOptions.useEnvironment( + new SpannerOptions.SpannerEnvironment() { + @Override + public boolean isEnableLocationApi() { + return true; + } + }); + spanner = + SpannerOptions.newBuilder() + .setProjectId("my-project") + .setHost(String.format("http://localhost:%d", getPort())) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setCredentials(NoCredentials.getInstance()) + .build() + .getService(); + client = spanner.getDatabaseClient(DatabaseId.of("my-project", "my-instance", "my-database")); + + RandomResultSetGenerator generator = new RandomResultSetGenerator(RANDOM_RESULT_ROW_COUNT); + mockSpanner.putStatementResult( + StatementResult.query(SELECT_RANDOM_STATEMENT, generator.generate())); + } + + @AfterClass + public static void cleanup() { + SpannerOptions.useDefaultEnvironment(); + if (spanner != null) { + spanner.close(); + } + } + + @Test + public void testSingleQuery() { + int rowCount = 0; + try (ResultSet resultSet = client.singleUse().executeQuery(SELECT_RANDOM_STATEMENT)) { + while (resultSet.next()) { + rowCount++; + } + } + assertEquals(RANDOM_RESULT_ROW_COUNT, rowCount); + } + + @Test + public void testParallelQueries() throws Exception { + int numThreads = 10; + ListeningExecutorService executor = + MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(numThreads)); + List> results = new ArrayList<>(); + for (int i = 0; i < numThreads; i++) { + results.add( + executor.submit( + () -> { + try (ResultSet resultSet = + client.singleUse().executeQuery(SELECT_RANDOM_STATEMENT)) { + while (resultSet.next()) { + // Randomly stop consuming results somewhere halfway the results (sometimes). + if (ThreadLocalRandom.current().nextInt(RANDOM_RESULT_ROW_COUNT * 2) == 5) { + break; + } + } + } + return null; + })); + } + executor.shutdown(); + Futures.allAsList(results).get(); + } + + @Test + public void testSingleReadWriteTransaction() { + client.readWriteTransaction().run(transaction -> transaction.executeUpdate(INSERT_STATEMENT)); + } + + @Test + public void testParallelReadWriteTransactions() throws Exception { + int numThreads = 10; + ListeningExecutorService executor = + MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(numThreads)); + List> results = new ArrayList<>(); + for (int i = 0; i < numThreads; i++) { + results.add( + executor.submit( + () -> { + client + .readWriteTransaction() + .run(transaction -> transaction.executeUpdate(INSERT_STATEMENT)); + return null; + })); + } + executor.shutdown(); + Futures.allAsList(results).get(); + } + + @Test + public void testExecuteStreamingSqlCallContextTimeout_locationAware() { + final TimeoutHolder timeoutHolder = new TimeoutHolder(); + CallContextConfigurator configurator = + new CallContextConfigurator() { + @Override + public ApiCallContext configure( + ApiCallContext context, ReqT request, MethodDescriptor method) { + if (request instanceof ExecuteSqlRequest + && method.equals(SpannerGrpc.getExecuteStreamingSqlMethod())) { + return context.withTimeoutDuration(timeoutHolder.timeout); + } + return null; + } + }; + + mockSpanner.setExecuteStreamingSqlExecutionTime( + SimulatedExecutionTime.ofMinimumAndRandomTime(10, 0)); + Context context = + Context.current().withValue(SpannerOptions.CALL_CONTEXT_CONFIGURATOR_KEY, configurator); + try { + context.run( + () -> { + timeoutHolder.timeout = Duration.ofNanos(1L); + SpannerException e = + assertThrows( + SpannerException.class, + () -> { + try (ResultSet rs = + client.singleUse().executeQuery(SELECT_RANDOM_STATEMENT)) { + rs.next(); + } + }); + assertEquals(ErrorCode.DEADLINE_EXCEEDED, e.getErrorCode()); + + timeoutHolder.timeout = Duration.ofMinutes(1L); + try (ResultSet rs = client.singleUse().executeQuery(SELECT_RANDOM_STATEMENT)) { + assertTrue(rs.next()); + } + }); + } finally { + mockSpanner.removeAllExecutionTimes(); + } + } + + @Test + public void testExecuteStreamingSqlInvalidArgumentPropagates_locationAware() { + mockSpanner.setExecuteStreamingSqlExecutionTime( + SimulatedExecutionTime.ofException( + Status.INVALID_ARGUMENT.withDescription("invalid request").asRuntimeException())); + try { + SpannerException e = + assertThrows( + SpannerException.class, + () -> { + try (ResultSet rs = client.singleUse().executeQuery(SELECT_RANDOM_STATEMENT)) { + rs.next(); + } + }); + assertEquals(ErrorCode.INVALID_ARGUMENT, e.getErrorCode()); + } finally { + mockSpanner.removeAllExecutionTimes(); + } + } + + @Test + public void testExecuteQueryAsyncCancelReturnsCancelled_locationAware() throws Exception { + final List values = new LinkedList<>(); + final CountDownLatch receivedFirstRow = new CountDownLatch(1); + final CountDownLatch cancelled = new CountDownLatch(1); + final ApiFuture callbackResult; + + ExecutorService executor = Executors.newSingleThreadExecutor(); + try (AsyncResultSet rs = client.singleUse().executeQueryAsync(SELECT_RANDOM_STATEMENT)) { + callbackResult = + rs.setCallback( + executor, + resultSet -> { + try { + while (true) { + switch (resultSet.tryNext()) { + case DONE: + return CallbackResponse.DONE; + case NOT_READY: + return CallbackResponse.CONTINUE; + case OK: + values.add(1); + receivedFirstRow.countDown(); + cancelled.await(); + break; + } + } + } catch (Throwable t) { + return CallbackResponse.DONE; + } + }); + + assertTrue(receivedFirstRow.await(30L, TimeUnit.SECONDS)); + rs.cancel(); + cancelled.countDown(); + SpannerException e = assertThrows(SpannerException.class, () -> get(callbackResult)); + assertEquals(ErrorCode.CANCELLED, e.getErrorCode()); + assertEquals(1, values.size()); + } finally { + executor.shutdownNow(); + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LongRunningSessionsBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LongRunningSessionsBenchmark.java deleted file mode 100644 index 58eb423a5db..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LongRunningSessionsBenchmark.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.cloud.NoCredentials; -import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; -import com.google.cloud.spanner.SessionPoolOptions.ActionOnInactiveTransaction; -import com.google.cloud.spanner.SessionPoolOptions.InactiveTransactionRemovalOptions; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.ListeningScheduledExecutorService; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.spanner.v1.BatchCreateSessionsRequest; -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import org.openjdk.jmh.annotations.AuxCounters; -import org.openjdk.jmh.annotations.Benchmark; -import org.openjdk.jmh.annotations.BenchmarkMode; -import org.openjdk.jmh.annotations.Fork; -import org.openjdk.jmh.annotations.Level; -import org.openjdk.jmh.annotations.Measurement; -import org.openjdk.jmh.annotations.Mode; -import org.openjdk.jmh.annotations.OutputTimeUnit; -import org.openjdk.jmh.annotations.Param; -import org.openjdk.jmh.annotations.Scope; -import org.openjdk.jmh.annotations.Setup; -import org.openjdk.jmh.annotations.State; -import org.openjdk.jmh.annotations.TearDown; -import org.openjdk.jmh.annotations.Warmup; - -/** - * Benchmarks for long-running sessions scenarios. The simulated execution times are based on - * reasonable estimates and are primarily intended to keep the benchmarks comparable with each other - * before and after changes have been made to the pool. The benchmarks are bound to the Maven - * profile `benchmark` and can be executed like this: - * mvn clean test -DskipTests -Pbenchmark -Dbenchmark.name=LongRunningSessionsBenchmark - * - */ -@BenchmarkMode(Mode.AverageTime) -@Fork(value = 1, warmups = 0) -@Measurement(batchSize = 1, iterations = 1, timeUnit = TimeUnit.MILLISECONDS) -@Warmup(batchSize = 0, iterations = 0) -@OutputTimeUnit(TimeUnit.SECONDS) -public class LongRunningSessionsBenchmark { - private static final String TEST_PROJECT = "my-project"; - private static final String TEST_INSTANCE = "my-instance"; - private static final String TEST_DATABASE = "my-database"; - private static final int HOLD_SESSION_TIME = 100; - private static final int LONG_HOLD_SESSION_TIME = 10000; // 10 seconds - private static final int RND_WAIT_TIME_BETWEEN_REQUESTS = 100; - private static final Random RND = new Random(); - - @State(Scope.Thread) - @AuxCounters(org.openjdk.jmh.annotations.AuxCounters.Type.EVENTS) - public static class BenchmarkState { - private StandardBenchmarkMockServer mockServer; - private Spanner spanner; - private DatabaseClientImpl client; - private AtomicInteger longRunningSessions; - - @Param({"100"}) - int minSessions; - - @Param({"400"}) - int maxSessions; - - @Param({"4"}) - int numChannels; - - /** AuxCounter for number of RPCs. */ - public int numBatchCreateSessionsRpcs() { - return mockServer.countRequests(BatchCreateSessionsRequest.class); - } - - /** AuxCounter for number of sessions created. */ - public int sessionsCreated() { - return mockServer.getMockSpanner().numSessionsCreated(); - } - - @Setup(Level.Invocation) - public void setup() throws Exception { - mockServer = new StandardBenchmarkMockServer(); - longRunningSessions = new AtomicInteger(); - TransportChannelProvider channelProvider = mockServer.start(); - - /** - * This ensures that the background thread responsible for cleaning long-running sessions - * executes every 10s. Any transaction for which session has not been used for more than 2s - * will be treated as long-running. - */ - InactiveTransactionRemovalOptions inactiveTransactionRemovalOptions = - InactiveTransactionRemovalOptions.newBuilder() - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.WARN_AND_CLOSE) - .setExecutionFrequency(Duration.ofSeconds(10)) - .setIdleTimeThreshold(Duration.ofSeconds(2)) - .build(); - SpannerOptions options = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) - .setNumChannels(numChannels) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption( - SessionPoolOptions.newBuilder() - .setMinSessions(minSessions) - .setMaxSessions(maxSessions) - .setWaitForMinSessionsDuration(Duration.ofSeconds(5)) - .setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions) - .build()) - .build(); - - spanner = options.getService(); - client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - } - - @TearDown(Level.Invocation) - public void teardown() throws Exception { - spanner.close(); - mockServer.shutdown(); - } - } - - /** - * Measures the time needed to execute a burst of read requests. - * - *

Some read requests will be long-running and will cause session leaks. Such sessions will be - * removed by the session maintenance background task if SessionPool Option - * ActionOnInactiveTransaction is set as WARN_AND_CLOSE. - * - * @param server - * @throws Exception - */ - @Benchmark - public void burstRead(final BenchmarkState server) throws Exception { - int totalQueries = server.maxSessions * 8; - int parallelThreads = server.maxSessions * 2; - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(server.minSessions); - - ListeningScheduledExecutorService service = - MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); - List> futures = new ArrayList<>(totalQueries); - for (int i = 0; i < totalQueries; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - try (ResultSet rs = - client.singleUse().executeQuery(StandardBenchmarkMockServer.SELECT1)) { - while (rs.next()) { - // introduce random sleep times to have long-running sessions - randomWait(server); - } - return null; - } - })); - } - // explicitly run the maintenance cycle to clean up any dangling long-running sessions. - pool.poolMaintainer.maintainPool(); - - Futures.allAsList(futures).get(); - service.shutdown(); - assertNumLeakedSessionsRemoved(server, pool); - } - - /** - * Measures the time needed to execute a burst of write requests (PDML). - * - *

Some write requests will be long-running. The test asserts that no sessions are removed by - * the session maintenance background task with SessionPool Option ActionOnInactiveTransaction set - * as WARN_AND_CLOSE. This is because PDML writes are expected to be long-running. - * - * @param server - * @throws Exception - */ - @Benchmark - public void burstWrite(final BenchmarkState server) throws Exception { - int totalWrites = server.maxSessions * 8; - int parallelThreads = server.maxSessions * 2; - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(server.minSessions); - - ListeningScheduledExecutorService service = - MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); - List> futures = new ArrayList<>(totalWrites); - for (int i = 0; i < totalWrites; i++) { - futures.add( - service.submit( - () -> { - // introduce random sleep times so that some sessions are long-running sessions - randomWaitForMockServer(server); - client.executePartitionedUpdate(StandardBenchmarkMockServer.UPDATE_STATEMENT); - })); - } - // explicitly run the maintenance cycle to clean up any dangling long-running sessions. - pool.poolMaintainer.maintainPool(); - - Futures.allAsList(futures).get(); - service.shutdown(); - assertThat(pool.numLeakedSessionsRemoved()) - .isEqualTo(0); // no sessions should be cleaned up in case of partitioned updates. - } - - /** - * Measures the time needed to execute a burst of read and write requests. - * - *

Some read requests will be long-running and will cause session leaks. Such sessions will be - * removed by the session maintenance background task if SessionPool Option - * ActionOnInactiveTransaction is set as WARN_AND_CLOSE. - * - *

Some write requests will be long-running. The test asserts that no sessions are removed by - * the session maintenance background task with SessionPool Option ActionOnInactiveTransaction set - * as WARN_AND_CLOSE. This is because PDML writes are expected to be long-running. - * - * @param server - * @throws Exception - */ - @Benchmark - public void burstReadAndWrite(final BenchmarkState server) throws Exception { - int totalWrites = server.maxSessions * 4; - int totalReads = server.maxSessions * 4; - int parallelThreads = server.maxSessions * 2; - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(server.minSessions); - - ListeningScheduledExecutorService service = - MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); - List> futures = new ArrayList<>(totalReads + totalWrites); - for (int i = 0; i < totalWrites; i++) { - futures.add( - service.submit( - () -> { - // introduce random sleep times so that some sessions are long-running sessions - randomWaitForMockServer(server); - client.executePartitionedUpdate(StandardBenchmarkMockServer.UPDATE_STATEMENT); - })); - } - for (int i = 0; i < totalReads; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - try (ResultSet rs = - client.singleUse().executeQuery(StandardBenchmarkMockServer.SELECT1)) { - while (rs.next()) { - // introduce random sleep times to have long-running sessions - randomWait(server); - } - return null; - } - })); - } - // explicitly run the maintenance cycle to clean up any dangling long-running sessions. - pool.poolMaintainer.maintainPool(); - - Futures.allAsList(futures).get(); - service.shutdown(); - assertNumLeakedSessionsRemoved(server, pool); - } - - private void randomWait(final BenchmarkState server) throws InterruptedException { - if (RND.nextBoolean()) { - server.longRunningSessions.incrementAndGet(); - Thread.sleep(LONG_HOLD_SESSION_TIME); - } else { - Thread.sleep(HOLD_SESSION_TIME); - } - } - - private void randomWaitForMockServer(final BenchmarkState server) { - if (RND.nextBoolean()) { - server.longRunningSessions.incrementAndGet(); - server - .mockServer - .getMockSpanner() - .setExecuteStreamingSqlExecutionTime( - SimulatedExecutionTime.ofMinimumAndRandomTime(LONG_HOLD_SESSION_TIME, 0)); - } else { - server - .mockServer - .getMockSpanner() - .setExecuteStreamingSqlExecutionTime( - SimulatedExecutionTime.ofMinimumAndRandomTime(HOLD_SESSION_TIME, 0)); - } - } - - private void assertNumLeakedSessionsRemoved(final BenchmarkState server, final SessionPool pool) { - final SessionPoolOptions sessionPoolOptions = - server.spanner.getOptions().getSessionPoolOptions(); - assertThat(server.longRunningSessions.get()).isNotEqualTo(0); - if (sessionPoolOptions.warnAndCloseInactiveTransactions() - || sessionPoolOptions.closeInactiveTransactions()) { - assertThat(pool.numLeakedSessionsRemoved()).isGreaterThan(0); - } else if (sessionPoolOptions.warnInactiveTransactions()) { - assertThat(pool.numLeakedSessionsRemoved()).isEqualTo(0); - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java index a47aecdccc4..782f54d30c2 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java @@ -20,7 +20,6 @@ import com.google.cloud.ByteArray; import com.google.cloud.Date; import com.google.cloud.spanner.AbstractResultSet.LazyByteArray; -import com.google.cloud.spanner.SessionPool.SessionPoolTransactionContext; import com.google.cloud.spanner.TransactionRunnerImpl.TransactionContextImpl; import com.google.common.base.Optional; import com.google.common.base.Preconditions; @@ -301,7 +300,7 @@ public static StatementResult exception(Statement statement, StatusRuntimeExcept /** Creates a result for the query that detects the dialect that is used for the database. */ public static StatementResult detectDialectResult(Dialect resultDialect) { return StatementResult.query( - SessionPool.DETERMINE_DIALECT_STATEMENT, + MultiplexedSessionDatabaseClient.DETERMINE_DIALECT_STATEMENT, ResultSet.newBuilder() .setMetadata( ResultSetMetadata.newBuilder() @@ -542,16 +541,16 @@ void simulateExecutionTime( boolean stickyGlobalExceptions, CountDownLatch freezeLock) { Uninterruptibles.awaitUninterruptibly(freezeLock); - checkException(globalExceptions, stickyGlobalExceptions); - if (streamIndices.isEmpty()) { - checkException(this.exceptions, stickyException); - } if (minimumExecutionTime > 0 || randomExecutionTime > 0) { Uninterruptibles.sleepUninterruptibly( (randomExecutionTime == 0 ? 0 : RANDOM.nextInt(randomExecutionTime)) + minimumExecutionTime, TimeUnit.MILLISECONDS); } + checkException(globalExceptions, stickyGlobalExceptions); + if (streamIndices.isEmpty()) { + checkException(this.exceptions, stickyException); + } } private static void checkException(Queue exceptions, boolean keepException) { @@ -581,9 +580,10 @@ private static void checkStreamException( private double abortProbability = 0.0010D; /** - * Flip this switch to true if you want the {@link SessionPool#DETERMINE_DIALECT_STATEMENT} - * statement to be included in the recorded requests on the mock server. It is ignored by default - * to prevent tests that do not expect this request to suddenly start failing. + * Flip this switch to true if you want the {@link + * MultiplexedSessionDatabaseClient#DETERMINE_DIALECT_STATEMENT} statement to be included in the + * recorded requests on the mock server. It is ignored by default to prevent tests that do not + * expect this request to suddenly start failing. */ private boolean includeDetermineDialectStatementInRequests = false; @@ -746,9 +746,10 @@ public void setAbortProbability(double probability) { } /** - * Set this to true if you want the {@link SessionPool#DETERMINE_DIALECT_STATEMENT} statement to - * be included in the recorded requests on the mock server. It is ignored by default to prevent - * tests that do not expect this request to suddenly start failing. + * Set this to true if you want the {@link + * MultiplexedSessionDatabaseClient#DETERMINE_DIALECT_STATEMENT} statement to be included in the + * recorded requests on the mock server. It is ignored by default to prevent tests that do not + * expect this request to suddenly start failing. */ public void setIncludeDetermineDialectStatementInRequests(boolean include) { this.includeDetermineDialectStatementInRequests = include; @@ -760,9 +761,6 @@ public void setIncludeDetermineDialectStatementInRequests(boolean include) { */ public void abortTransaction(TransactionContext transactionContext) { Preconditions.checkNotNull(transactionContext); - if (transactionContext instanceof SessionPoolTransactionContext) { - transactionContext = ((SessionPoolTransactionContext) transactionContext).delegate; - } if (transactionContext instanceof TransactionContextImpl) { TransactionContextImpl impl = (TransactionContextImpl) transactionContext; ByteString id = @@ -1223,7 +1221,9 @@ public void executeBatchDml( public void executeStreamingSql( ExecuteSqlRequest request, StreamObserver responseObserver) { if (includeDetermineDialectStatementInRequests - || !request.getSql().equals(SessionPool.DETERMINE_DIALECT_STATEMENT.getSql())) { + || !request + .getSql() + .equals(MultiplexedSessionDatabaseClient.DETERMINE_DIALECT_STATEMENT.getSql())) { requests.add(request); } Preconditions.checkNotNull(request.getSession()); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java index 0448656475a..629b5611862 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java @@ -42,7 +42,6 @@ import com.google.cloud.spanner.Options.RpcPriority; import com.google.cloud.spanner.TransactionRunnerImpl.TransactionContextImpl; import com.google.cloud.spanner.connection.RandomResultSetGenerator; -import com.google.common.base.Stopwatch; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.util.concurrent.MoreExecutors; @@ -102,6 +101,37 @@ public void createSpannerInstance() { .getService(); } + @Test + public void testCreateSessionDeadlineExceeded() { + // Simulate a problem with the CreateSession RPC making it slow. + mockSpanner.setCreateSessionExecutionTime( + SimulatedExecutionTime.ofException(Status.DEADLINE_EXCEEDED.asRuntimeException())); + + Spanner testSpanner = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setChannelProvider(channelProvider) + .setCredentials(NoCredentials.getInstance()) + .build() + .getService(); + DatabaseClient client = testSpanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); + + // The first attempt should lead to a DEADLINE_EXCEEDED error being propagated from the + // CreateSession attempt. + try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { + SpannerException exception = assertThrows(SpannerException.class, resultSet::next); + assertEquals(ErrorCode.DEADLINE_EXCEEDED, exception.getErrorCode()); + } + + // Remove the simulated problem on the mock server. + // The next attempt should then succeed. + mockSpanner.removeAllExecutionTimes(); + try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { + //noinspection StatementWithEmptyBody + while (resultSet.next()) {} + } + } + @Test public void testMultiUseReadOnlyTransactionUsesSameSession() { // Execute two queries using the same transaction. Both queries should use the same @@ -211,131 +241,302 @@ public void testMaintainerMaintainsMultipleClients() { } @Test - public void testUnimplementedErrorOnCreation_fallsBackToRegularSessions() { + public void testRetryWithTheSessionCreationWaitTime() { mockSpanner.setCreateSessionExecutionTime( - SimulatedExecutionTime.ofException( - Status.UNIMPLEMENTED - .withDescription("Multiplexed sessions are not implemented") - .asRuntimeException())); + SimulatedExecutionTime.ofExceptions( + Arrays.asList( + Status.DEADLINE_EXCEEDED + .withDescription( + "CallOptions deadline exceeded after 22.986872393s. " + + "Name resolution delay 6.911918521 seconds. [closed=[], " + + "open=[[connecting_and_lb_delay=32445014148ns, was_still_waiting]]]") + .asRuntimeException(), + Status.DEADLINE_EXCEEDED + .withDescription( + "CallOptions deadline exceeded after 22.986872393s. " + + "Name resolution delay 6.911918521 seconds. [closed=[], " + + "open=[[connecting_and_lb_delay=32445014148ns, was_still_waiting]]]") + .asRuntimeException()))); + + Spanner testSpanner = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setChannelProvider(channelProvider) + .setCredentials(NoCredentials.getInstance()) + .setSessionPoolOption( + SessionPoolOptions.newBuilder() + .setUseMultiplexedSession(true) + .setUseMultiplexedSessionForRW(true) + .setUseMultiplexedSessionPartitionedOps(true) + .setWaitForMinSessionsDuration(Duration.ofSeconds(1)) + .setFailOnSessionLeak() + .build()) + .build() + .getService(); + DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - // Get the current session reference. This will block until the CreateSession RPC has failed. - assertNotNull(client.multiplexedSessionDatabaseClient); - SpannerException spannerException = - assertThrows( - SpannerException.class, - client.multiplexedSessionDatabaseClient::getCurrentSessionReference); - assertEquals(ErrorCode.UNIMPLEMENTED, spannerException.getErrorCode()); + (DatabaseClientImpl) testSpanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); + try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { //noinspection StatementWithEmptyBody while (resultSet.next()) { // ignore } } - // Verify that we received one ExecuteSqlRequest, and that it used a regular session. - assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); - Session session = mockSpanner.getSession(requests.get(0).getSession()); - assertNotNull(session); - assertFalse(session.getMultiplexed()); + List createSessionRequests = + mockSpanner.getRequestsOfType(CreateSessionRequest.class); + assertEquals(3, createSessionRequests.size()); + + List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); + assertEquals(1, requests.size()); assertNotNull(client.multiplexedSessionDatabaseClient); - assertEquals(0L, client.multiplexedSessionDatabaseClient.getNumSessionsAcquired().get()); - assertEquals(0L, client.multiplexedSessionDatabaseClient.getNumSessionsReleased().get()); + assertEquals(1L, client.multiplexedSessionDatabaseClient.getNumSessionsAcquired().get()); + assertEquals(1L, client.multiplexedSessionDatabaseClient.getNumSessionsReleased().get()); + + testSpanner.close(); } @Test - public void - testUnimplementedErrorOnCreation_firstReceivesError_secondFallsBackToRegularSessions() { + public void testRetryWithTheDatabaseNotFoundExceptionWithSessionCreationWaitTime() { mockSpanner.setCreateSessionExecutionTime( - SimulatedExecutionTime.ofException( - Status.UNIMPLEMENTED - .withDescription("Multiplexed sessions are not implemented") - .asRuntimeException())); - // Freeze the mock server to ensure that the CreateSession RPC does not return an error or any - // other result just yet. - mockSpanner.freeze(); - // Get a database client using multiplexed sessions. The CreateSession RPC will be blocked as - // long as the mock server is frozen. + SimulatedExecutionTime.ofExceptions( + Collections.singletonList( + Status.NOT_FOUND.withDescription("Database not found.").asRuntimeException()))); + + Spanner testSpanner = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setChannelProvider(channelProvider) + .setCredentials(NoCredentials.getInstance()) + .setSessionPoolOption( + SessionPoolOptions.newBuilder() + .setUseMultiplexedSession(true) + .setUseMultiplexedSessionForRW(true) + .setUseMultiplexedSessionPartitionedOps(true) + .setWaitForMinSessionsDuration(Duration.ofMillis(200)) + .setFailOnSessionLeak() + .build()) + .build() + .getService(); + + assertThrows( + SpannerException.class, () -> testSpanner.getDatabaseClient(DatabaseId.of("p", "i", "d"))); + + List createSessionRequests = + mockSpanner.getRequestsOfType(CreateSessionRequest.class); + assertEquals(1, createSessionRequests.size()); + + List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); + assertEquals(0, requests.size()); + + testSpanner.close(); + } + + @Test + public void testRetryWithNoSessionCreationWaitTime() { + mockSpanner.setCreateSessionExecutionTime( + SimulatedExecutionTime.ofExceptions( + Collections.singletonList( + Status.DEADLINE_EXCEEDED + .withDescription( + "CallOptions deadline exceeded after 22.986872393s. " + + "Name resolution delay 6.911918521 seconds. [closed=[], " + + "open=[[connecting_and_lb_delay=32445014148ns, was_still_waiting]]]") + .asRuntimeException()))); + + Spanner testSpanner = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setChannelProvider(channelProvider) + .setCredentials(NoCredentials.getInstance()) + .setSessionPoolOption( + SessionPoolOptions.newBuilder() + .setUseMultiplexedSession(true) + .setUseMultiplexedSessionForRW(true) + .setUseMultiplexedSessionPartitionedOps(true) + .setFailOnSessionLeak() + .build()) + .build() + .getService(); + DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - // Try to execute a query. This is all non-blocking until the call to ResultSet#next(). - try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { - // Unfreeze the mock server to get the error from the backend. This query will then fail. - mockSpanner.unfreeze(); - SpannerException spannerException = assertThrows(SpannerException.class, resultSet::next); - assertEquals(ErrorCode.UNIMPLEMENTED, spannerException.getErrorCode()); - } - // The next query will fall back to regular sessions and succeed. + (DatabaseClientImpl) testSpanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); + + SpannerException spannerException = + assertThrows( + SpannerException.class, + () -> { + try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { + //noinspection StatementWithEmptyBody + while (resultSet.next()) { + // ignore + } + } + }); + assertEquals(ErrorCode.DEADLINE_EXCEEDED, spannerException.getErrorCode()); + + // The CreateSession RPC will be retried, and as the exception is removed by the first call, + // the second attempt will succeed. try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { //noinspection StatementWithEmptyBody while (resultSet.next()) { // ignore } } - // Verify that we received one ExecuteSqlRequest, and that it used a regular session. - assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + + List createSessionRequests = + mockSpanner.getRequestsOfType(CreateSessionRequest.class); + assertEquals(2, createSessionRequests.size()); + List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); + assertEquals(1, requests.size()); - Session session = mockSpanner.getSession(requests.get(0).getSession()); - assertNotNull(session); - assertFalse(session.getMultiplexed()); + testSpanner.close(); + } - assertNotNull(client.multiplexedSessionDatabaseClient); - assertEquals(0L, client.multiplexedSessionDatabaseClient.getNumSessionsAcquired().get()); - assertEquals(0L, client.multiplexedSessionDatabaseClient.getNumSessionsReleased().get()); + @Test + public void testRetryWithDelayedInResponseExceedsSessionCreationWaitTime() { + mockSpanner.setCreateSessionExecutionTime( + SimulatedExecutionTime.ofMinimumAndRandomTimeAndExceptions( + 150, + 0, + Arrays.asList( + Status.DEADLINE_EXCEEDED + .withDescription( + "CallOptions deadline exceeded after 22.986872393s. " + + "Name resolution delay 6.911918521 seconds. [closed=[], " + + "open=[[connecting_and_lb_delay=32445014148ns, was_still_waiting]]]") + .asRuntimeException(), + Status.UNAVAILABLE + .withDescription( + "CallOptions deadline exceeded after 22.986872393s. " + + "Name resolution delay 6.911918521 seconds. [closed=[], " + + "open=[[connecting_and_lb_delay=32445014148ns, was_still_waiting]]]") + .asRuntimeException()))); + + Spanner testSpanner = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setChannelProvider(channelProvider) + .setCredentials(NoCredentials.getInstance()) + .setSessionPoolOption( + SessionPoolOptions.newBuilder() + .setUseMultiplexedSession(true) + .setUseMultiplexedSessionForRW(true) + .setUseMultiplexedSessionPartitionedOps(true) + .setWaitForMinSessionsDuration(Duration.ofMillis(200)) + .setFailOnSessionLeak() + .build()) + .build() + .getService(); + + SpannerException spannerException = + assertThrows( + SpannerException.class, + () -> { + DatabaseClientImpl client = + (DatabaseClientImpl) testSpanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); + + try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { + //noinspection StatementWithEmptyBody + while (resultSet.next()) { + // ignore + } + } + }); + assertEquals(ErrorCode.DEADLINE_EXCEEDED, spannerException.getErrorCode()); + + List createSessionRequests = + mockSpanner.getRequestsOfType(CreateSessionRequest.class); + assertEquals(2, createSessionRequests.size()); + + List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); + assertEquals(0, requests.size()); + + testSpanner.close(); } @Test - public void testMaintainerInvalidatesMultiplexedSessionClientIfUnimplemented() { + public void testRetryWithDelayInExceptionWithInSessionCreationWaitTime() { + mockSpanner.setCreateSessionExecutionTime( + SimulatedExecutionTime.ofMinimumAndRandomTimeAndExceptions( + 50, + 0, + Arrays.asList( + Status.DEADLINE_EXCEEDED + .withDescription( + "CallOptions deadline exceeded after 22.986872393s. " + + "Name resolution delay 6.911918521 seconds. [closed=[], " + + "open=[[connecting_and_lb_delay=32445014148ns, was_still_waiting]]]") + .asRuntimeException(), + Status.DEADLINE_EXCEEDED + .withDescription( + "CallOptions deadline exceeded after 22.986872393s. " + + "Name resolution delay 6.911918521 seconds. [closed=[], " + + "open=[[connecting_and_lb_delay=32445014148ns, was_still_waiting]]]") + .asRuntimeException()))); + + Spanner testSpanner = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setChannelProvider(channelProvider) + .setCredentials(NoCredentials.getInstance()) + .setSessionPoolOption( + SessionPoolOptions.newBuilder() + .setUseMultiplexedSession(true) + .setUseMultiplexedSessionForRW(true) + .setUseMultiplexedSessionPartitionedOps(true) + .setWaitForMinSessionsDuration(Duration.ofMillis(200)) + .setFailOnSessionLeak() + .build()) + .build() + .getService(); + DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - // The first query should succeed. + (DatabaseClientImpl) testSpanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); + try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { //noinspection StatementWithEmptyBody while (resultSet.next()) { // ignore } } - // Now ensure that CreateSession returns UNIMPLEMENTED. This error should be recognized by the - // maintainer and invalidate the MultiplexedSessionDatabaseClient. New queries will fall back to - // regular sessions. + + List createSessionRequests = + mockSpanner.getRequestsOfType(CreateSessionRequest.class); + assertEquals(3, createSessionRequests.size()); + + List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); + assertEquals(1, requests.size()); + + testSpanner.close(); + } + + @Test + public void testUnimplementedErrorOnCreationIsPropagated() { mockSpanner.setCreateSessionExecutionTime( SimulatedExecutionTime.ofException( Status.UNIMPLEMENTED .withDescription("Multiplexed sessions are not implemented") .asRuntimeException())); - // Wait until the client sees that MultiplexedSessions are not supported. + DatabaseClientImpl client = + (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); + // Get the current session reference. This will block until the CreateSession RPC has failed. assertNotNull(client.multiplexedSessionDatabaseClient); - Stopwatch stopwatch = Stopwatch.createStarted(); - while (client.multiplexedSessionDatabaseClient.isMultiplexedSessionsSupported() - && stopwatch.elapsed().compareTo(Duration.ofSeconds(5)) < 0) { - Thread.yield(); - } - // Queries should fall back to regular sessions. - try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { - //noinspection StatementWithEmptyBody - while (resultSet.next()) { - // ignore - } - } - // Verify that we received two ExecuteSqlRequests, and that the first one used a multiplexed - // session, and that the second used a regular session. - assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); - - Session session1 = mockSpanner.getSession(requests.get(0).getSession()); - assertNotNull(session1); - assertTrue(session1.getMultiplexed()); + SpannerException spannerException = + assertThrows( + SpannerException.class, + client.multiplexedSessionDatabaseClient::getCurrentSessionReference); + assertEquals(ErrorCode.UNIMPLEMENTED, spannerException.getErrorCode()); - Session session2 = mockSpanner.getSession(requests.get(1).getSession()); - assertNotNull(session2); - assertFalse(session2.getMultiplexed()); + spannerException = + assertThrows(SpannerException.class, () -> client.singleUse().executeQuery(STATEMENT)); + assertEquals(ErrorCode.UNIMPLEMENTED, spannerException.getErrorCode()); - assertNotNull(client.multiplexedSessionDatabaseClient); - assertEquals(1L, client.multiplexedSessionDatabaseClient.getNumSessionsAcquired().get()); - assertEquals(1L, client.multiplexedSessionDatabaseClient.getNumSessionsReleased().get()); + // Verify that we received no ExecuteSqlRequests. + assertEquals(0, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); } @Test @@ -1474,381 +1675,6 @@ public void testMutationOnlyUsingTransactionManagerAsyncAbortedDuringBeginTransa spanner.close(); } - // Tests the behavior of the server-side kill switch for read-write multiplexed sessions.. - @Test - public void testInitialBeginTransactionWithRW_receivesUnimplemented_fallsBackToRegularSession() { - mockSpanner.setBeginTransactionExecutionTime( - SimulatedExecutionTime.ofException( - Status.UNIMPLEMENTED - .withDescription( - "Transaction type read_write not supported with multiplexed sessions") - .asRuntimeException())); - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - - assertNotNull(client.multiplexedSessionDatabaseClient); - - // Wait until the client sees that MultiplexedSessions are not supported for read-write. - // Get the begin transaction reference. This will block until the BeginTransaction RPC with - // read-write has failed. - SpannerException spannerException = - assertThrows( - SpannerException.class, - client.multiplexedSessionDatabaseClient::getReadWriteBeginTransactionReference); - assertEquals(ErrorCode.UNIMPLEMENTED, spannerException.getErrorCode()); - assertTrue(client.multiplexedSessionDatabaseClient.unimplementedForRW.get()); - - // read-write transaction should fallback to regular sessions - client - .readWriteTransaction() - .run( - transaction -> { - try (ResultSet resultSet = transaction.executeQuery(STATEMENT)) { - //noinspection StatementWithEmptyBody - while (resultSet.next()) { - // ignore - } - } - return null; - }); - - // Verify that we received one ExecuteSqlRequest, and it uses a regular session due to fallback. - List executeSqlRequests = - mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); - assertEquals(1, executeSqlRequests.size()); - // Verify the requests are not executed using multiplexed sessions - Session session2 = mockSpanner.getSession(executeSqlRequests.get(0).getSession()); - assertNotNull(session2); - assertFalse(session2.getMultiplexed()); - } - - // Tests the behavior of the server-side kill switch for read-write multiplexed sessions. - @Test - public void - testInitialBeginTransactionWithPDML_receivesUnimplemented_fallsBackToRegularSession() { - mockSpanner.setBeginTransactionExecutionTime( - SimulatedExecutionTime.ofExceptions( - Arrays.asList( - Status.UNIMPLEMENTED - .withDescription( - "Transaction type partitioned_dml not supported with multiplexed sessions") - .asRuntimeException(), - Status.UNIMPLEMENTED - .withDescription( - "Transaction type partitioned_dml not supported with multiplexed sessions") - .asRuntimeException()))); - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - - assertNotNull(client.multiplexedSessionDatabaseClient); - - // Partitioned Ops transaction should fallback to regular sessions - assertEquals(UPDATE_COUNT, client.executePartitionedUpdate(UPDATE_STATEMENT)); - - // Verify that we received one ExecuteSqlRequest, and it uses a regular session due to fallback. - List executeSqlRequests = - mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); - assertEquals(1, executeSqlRequests.size()); - // Verify the requests are not executed using multiplexed sessions - Session session2 = mockSpanner.getSession(executeSqlRequests.get(0).getSession()); - assertNotNull(session2); - assertFalse(session2.getMultiplexed()); - assertTrue(client.multiplexedSessionDatabaseClient.unimplementedForPartitionedOps.get()); - } - - /** - * Tests the behavior of the server-side kill switch for partitioned query multiplexed sessions. 2 - * PartitionQueryRequest should be received. First with Multiplexed session and second with - * regular session. - */ - @Test - public void testPartitionedQuery_receivesUnimplemented_fallsBackToRegularSession() { - try { - mockSpanner.setPartitionQueryExecutionTime( - SimulatedExecutionTime.ofException( - Status.INVALID_ARGUMENT - .withDescription( - "Partitioned operations are not supported with multiplexed sessions") - .asRuntimeException())); - BatchClientImpl client = - (BatchClientImpl) spanner.getBatchClient(DatabaseId.of("p", "i", "d")); - - try (BatchReadOnlyTransaction transaction = - client.batchReadOnlyTransaction(TimestampBound.strong())) { - transaction.partitionQuery(PartitionOptions.getDefaultInstance(), STATEMENT); - - // Verify that we received one PartitionQueryRequest. - List partitionQueryRequests = - mockSpanner.getRequestsOfType(PartitionQueryRequest.class); - assertEquals(2, partitionQueryRequests.size()); - // Verify the requests were executed using multiplexed sessions - Session session = mockSpanner.getSession(partitionQueryRequests.get(0).getSession()); - assertNotNull(session); - assertTrue(session.getMultiplexed()); - assertTrue(BatchClientImpl.unimplementedForPartitionedOps.get()); - - session = mockSpanner.getSession(partitionQueryRequests.get(1).getSession()); - assertNotNull(session); - assertFalse(session.getMultiplexed()); - } - } finally { - BatchClientImpl.unimplementedForPartitionedOps.set(false); - } - } - - /** - * Tests the behavior of the server-side kill switch for partitioned query multiplexed sessions. - * The BatchReadOnlyTransaction is initiated using BatchTransactionId. 2 PartitionQueryRequest - * should be received. First with Multiplexed session and second with regular session. - */ - @Test - public void - testPartitionedQueryWithTransactionId_receivesUnimplemented_fallsBackToRegularSession() { - try { - mockSpanner.setPartitionQueryExecutionTime( - SimulatedExecutionTime.ofException( - Status.INVALID_ARGUMENT - .withDescription( - "Partitioned operations are not supported with multiplexed sessions") - .asRuntimeException())); - BatchClientImpl client = - (BatchClientImpl) spanner.getBatchClient(DatabaseId.of("p", "i", "d")); - - try (BatchReadOnlyTransaction transaction = - client.batchReadOnlyTransaction(TimestampBound.strong())) { - - try (BatchReadOnlyTransaction transaction1 = - client.batchReadOnlyTransaction(transaction.getBatchTransactionId())) { - transaction1.partitionQuery(PartitionOptions.getDefaultInstance(), STATEMENT); - - // Verify that we received one PartitionQueryRequest. - List partitionQueryRequests = - mockSpanner.getRequestsOfType(PartitionQueryRequest.class); - assertEquals(2, partitionQueryRequests.size()); - // Verify the requests were executed using multiplexed sessions - Session session = mockSpanner.getSession(partitionQueryRequests.get(0).getSession()); - assertNotNull(session); - assertTrue(session.getMultiplexed()); - assertTrue(BatchClientImpl.unimplementedForPartitionedOps.get()); - - session = mockSpanner.getSession(partitionQueryRequests.get(1).getSession()); - assertNotNull(session); - assertFalse(session.getMultiplexed()); - - List beginTransactionRequests = - mockSpanner.getRequestsOfType(BeginTransactionRequest.class); - assertEquals(2, beginTransactionRequests.size()); - - session = mockSpanner.getSession(beginTransactionRequests.get(0).getSession()); - assertNotNull(session); - assertTrue(session.getMultiplexed()); - - session = mockSpanner.getSession(beginTransactionRequests.get(1).getSession()); - assertNotNull(session); - assertFalse(session.getMultiplexed()); - assertEquals( - transaction.getBatchTransactionId().getTimestamp(), - transaction1.getBatchTransactionId().getTimestamp()); - } - } - } finally { - BatchClientImpl.unimplementedForPartitionedOps.set(false); - } - } - - @Test - public void - testReadWriteUnimplementedErrorDuringInitialBeginTransactionRPC_firstRetriedWithRegularSession_secondFallsBackToRegularSessions() { - // This test simulates the following scenario, - // 1. The server-side flag for RW multiplexed sessions is disabled. - // 2. Application starts. The initial BeginTransaction RPC during client initialization will - // fail with UNIMPLEMENTED error. - // 3. Read-write transaction initialized before the BeginTransaction RPC response will fail with - // UNIMPLEMENTED error. - // 4. Read-write transaction initialized after the BeginTransaction RPC response will fallback - // to regular sessions. - mockSpanner.setBeginTransactionExecutionTime( - SimulatedExecutionTime.ofException( - Status.UNIMPLEMENTED - .withDescription( - "Transaction type read_write not supported with multiplexed sessions") - .asRuntimeException())); - mockSpanner.setExecuteStreamingSqlExecutionTime( - SimulatedExecutionTime.ofException( - Status.UNIMPLEMENTED - .withDescription( - "Transaction type read_write not supported with multiplexed sessions") - .asRuntimeException())); - // Freeze the mock server to ensure that the BeginTransaction with read-write on multiplexed - // session RPC does not return an error or any - // other result just yet. - mockSpanner.freeze(); - // Get a database client using multiplexed sessions. The BeginTransaction RPC to validation - // read-write on multiplexed session will be blocked as - // long as the mock server is frozen. - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - - // Get the runner so that the read-write transaction is executed via multiplexed session. - TransactionRunner runner = client.readWriteTransaction(); - - // Unfreeze the mock server to get the error from the backend. The above read-write transaction - // will then fail. - mockSpanner.unfreeze(); - - // The ExecuteStreamingSql call fails with UNIMPLEMENTED error, but the retry should happen - // internally with regular session. - runner.run( - transaction -> { - ResultSet resultSet = transaction.executeQuery(STATEMENT); - //noinspection StatementWithEmptyBody - while (resultSet.next()) { - // ignore - } - return null; - }); - assertNotNull(runner.getCommitTimestamp()); - assertNotNull(runner.getCommitResponse()); - - // Wait until the client sees that MultiplexedSessions are not supported for read-write. - assertNotNull(client.multiplexedSessionDatabaseClient); - SpannerException spannerException = - assertThrows( - SpannerException.class, - client.multiplexedSessionDatabaseClient::getReadWriteBeginTransactionReference); - assertEquals(ErrorCode.UNIMPLEMENTED, spannerException.getErrorCode()); - assertTrue(client.multiplexedSessionDatabaseClient.unimplementedForRW.get()); - - // The next read-write transaction will fall back to regular sessions and succeed. - client - .readWriteTransaction() - .run( - transaction -> { - try (ResultSet resultSet = transaction.executeQuery(STATEMENT)) { - //noinspection StatementWithEmptyBody - while (resultSet.next()) { - // ignore - } - } - return null; - }); - - // Verify that two ExecuteSqlRequests were received: the first using a multiplexed session and - // the second using a regular session. - assertEquals(3, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); - - // The ExecuteSqlRequest of the first read-write transaction should use multiplexed session. - Session session1 = mockSpanner.getSession(requests.get(0).getSession()); - assertNotNull(session1); - assertTrue(session1.getMultiplexed()); - - // Retry of the ExecuteSqlRequest of the first read-write transaction should use regular - // session. - Session session2 = mockSpanner.getSession(requests.get(1).getSession()); - assertNotNull(session2); - assertFalse(session2.getMultiplexed()); - - // The ExecuteSqlRequest of the second read-write transaction should use regular session. - Session session3 = mockSpanner.getSession(requests.get(2).getSession()); - assertNotNull(session3); - assertFalse(session3.getMultiplexed()); - - assertNotNull(client.multiplexedSessionDatabaseClient); - assertEquals(1L, client.multiplexedSessionDatabaseClient.getNumSessionsAcquired().get()); - assertEquals(1L, client.multiplexedSessionDatabaseClient.getNumSessionsReleased().get()); - } - - @Test - public void - testReadWriteUnimplemented_firstRetriedWithRegularSession_secondFallsBackToRegularSessions() { - // This test simulates the following scenario, - // 1. The server side flag for read-write multiplexed session is not disabled. When an - // application starts, the initial BeginTransaction RPC with read-write will succeed. - // 2. After time t, the server side flag for read-write multiplexed session is disabled. After - // this a read-write transaction executed with multiplexed sessions should fail with - // UNIMPLEMENTED error. - // 3. All read-write transactions in the application after the initial failure should fallback - // to using regular sessions. - mockSpanner.setExecuteStreamingSqlExecutionTime( - SimulatedExecutionTime.ofException( - Status.UNIMPLEMENTED - .withDescription( - "Transaction type read_write not supported with multiplexed sessions") - .asRuntimeException())); - - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - - // Wait until the initial BeginTransaction RPC with read-write is complete. - assertNotNull(client.multiplexedSessionDatabaseClient); - Transaction txn = - client.multiplexedSessionDatabaseClient.getReadWriteBeginTransactionReference(); - assertNotNull(txn); - assertNotNull(txn.getId()); - assertFalse(client.multiplexedSessionDatabaseClient.unimplementedForRW.get()); - - // Initially, the first attempt executes an ExecuteSqlRequest using multiplexed sessions, but it - // fails with UNIMPLEMENTED. - // On retry, the request should automatically switch to regular sessions, ensuring the - // transaction completes successfully. - client - .readWriteTransaction() - .run( - transaction -> { - ResultSet resultSet = transaction.executeQuery(STATEMENT); - //noinspection StatementWithEmptyBody - while (resultSet.next()) { - // ignore - } - return null; - }); - - // Verify that the previous failed transaction during first attempt has marked multiplexed - // session client to be - // unimplemented for read-write. - assertTrue(client.multiplexedSessionDatabaseClient.unimplementedForRW.get()); - - // The next read-write transaction will automatically fall back to regular sessions and succeed. - client - .readWriteTransaction() - .run( - transaction -> { - try (ResultSet resultSet = transaction.executeQuery(STATEMENT)) { - //noinspection StatementWithEmptyBody - while (resultSet.next()) { - // ignore - } - } - return null; - }); - - // Verify that two ExecuteSqlRequests were received: the first using a multiplexed session and - // the second using a regular session. - assertEquals(3, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); - - // The ExecuteSqlRequest of the first read-write transaction should use multiplexed session. - Session session1 = mockSpanner.getSession(requests.get(0).getSession()); - assertNotNull(session1); - assertTrue(session1.getMultiplexed()); - - // Retry of the ExecuteSqlRequest of the first read-write transaction should use regular - // session. - Session session2 = mockSpanner.getSession(requests.get(1).getSession()); - assertNotNull(session2); - assertFalse(session2.getMultiplexed()); - - // The ExecuteSqlRequest of the second read-write transaction should use regular session. - Session session3 = mockSpanner.getSession(requests.get(1).getSession()); - assertNotNull(session3); - assertFalse(session3.getMultiplexed()); - - assertNotNull(client.multiplexedSessionDatabaseClient); - assertEquals(1L, client.multiplexedSessionDatabaseClient.getNumSessionsAcquired().get()); - assertEquals(1L, client.multiplexedSessionDatabaseClient.getNumSessionsReleased().get()); - } - @Test public void testOtherUnimplementedError_ReadWriteTransactionStillUsesMultiplexedSession() { mockSpanner.setExecuteStreamingSqlExecutionTime( @@ -1860,22 +1686,11 @@ public void testOtherUnimplementedError_ReadWriteTransactionStillUsesMultiplexed DatabaseClientImpl client = (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - // Wait until the initial BeginTransaction RPC with read-write is complete. - assertNotNull(client.multiplexedSessionDatabaseClient); - Transaction txn = - client.multiplexedSessionDatabaseClient.getReadWriteBeginTransactionReference(); - assertNotNull(txn); - assertNotNull(txn.getId()); - assertFalse(client.multiplexedSessionDatabaseClient.unimplementedForRW.get()); - // Try to execute a query using single use transaction. try (ResultSet resultSet = client.singleUse().executeQuery(STATEMENT)) { SpannerException spannerException = assertThrows(SpannerException.class, resultSet::next); assertEquals(ErrorCode.UNIMPLEMENTED, spannerException.getErrorCode()); } - // Verify other UNIMPLEMENTED errors does not turn off read-write transactions to use - // multiplexed sessions. - assertFalse(client.multiplexedSessionDatabaseClient.unimplementedForRW.get()); // The read-write transaction should use multiplexed sessions and succeed. client @@ -2006,172 +1821,6 @@ public void testBatchWriteAtLeastOnce() { assertEquals(1L, client.multiplexedSessionDatabaseClient.getNumSessionsReleased().get()); } - @Test - public void - testReadWriteUnimplementedError_DuringExplicitBegin_RetriedWithRegularSessionForInFlightTransaction() { - // Test scenario: - // 1. The first attempt does an inline begin using a multiplexed session with an invalid - // statement, resulting in failure due to invalid syntax. - // 2. A retry occurs with an explicit begin using a multiplexed session, but we assume the - // backend flag is turned OFF, leading to UNIMPLEMENTED errors. - // 3. Upon encountering the UNIMPLEMENTED error, the entire transaction callable is retried - // using regular sessions, but the inline begin fails again. - // 4. A final retry executes the explicit BeginTransaction on a regular session. - Spanner spanner = setupSpannerBySkippingBeginTransactionVerificationForMux(); - mockSpanner.setBeginTransactionExecutionTime( - SimulatedExecutionTime.ofException( - Status.UNIMPLEMENTED - .withDescription( - "Transaction type read_write not supported with multiplexed sessions") - .asRuntimeException())); - - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - TransactionRunner runner = client.readWriteTransaction(); - Long updateCount = - runner.run( - transaction -> { - // This update statement carries the BeginTransaction, but fails. This will - // cause the entire transaction to be retried with an explicit - // BeginTransaction RPC to ensure all statements in the transaction are - // actually executed against the same transaction. - SpannerException e = - assertThrows( - SpannerException.class, - () -> transaction.executeUpdate(INVALID_UPDATE_STATEMENT)); - assertEquals(ErrorCode.INVALID_ARGUMENT, e.getErrorCode()); - return transaction.executeUpdate(UPDATE_STATEMENT); - }); - - assertThat(updateCount).isEqualTo(1L); - List beginTransactionRequests = - mockSpanner.getRequestsOfType(BeginTransactionRequest.class); - assertEquals(2, beginTransactionRequests.size()); - - // Verify the first BeginTransaction request is executed using multiplexed sessions. - assertTrue( - mockSpanner.getSession(beginTransactionRequests.get(0).getSession()).getMultiplexed()); - - // Verify the second BeginTransaction request is executed using regular sessions. - assertFalse( - mockSpanner.getSession(beginTransactionRequests.get(1).getSession()).getMultiplexed()); - } - - @Test - public void - testReadWriteUnimplementedError_RetriedWithRegularSessionForInFlightTransaction_RetriedWithSessionNotFound() { - // Test scenario: - // 1. The initial attempt performs an inline begin using a multiplexed session, but with the - // backend flag assumed to be OFF, resulting in an UNIMPLEMENTED error. - // 2. Upon encountering the UNIMPLEMENTED error, the entire transaction callable is retried - // using regular sessions. However, the Commit request fails due to a SessionNotFound error. - // 3. A final retry is triggered to handle the SessionNotFound error by selecting a new session - // from the pool, leading to a successful transaction. - Spanner spanner = setupSpannerBySkippingBeginTransactionVerificationForMux(); - - // The first ExecuteSql request that does an inline begin with multiplexed sessions fail with - // UNIMPLEMENTED error. - mockSpanner.setExecuteSqlExecutionTime( - SimulatedExecutionTime.ofException( - Status.UNIMPLEMENTED - .withDescription( - "Transaction type read_write not supported with multiplexed sessions") - .asRuntimeException())); - - // The first Commit request fails with SessionNotFound exception. The first time this commit is - // called with be using regular sessions. - // This is done to verify if SessionNotFound errors on regular sessions are handled. - mockSpanner.setCommitExecutionTime( - SimulatedExecutionTime.ofException( - mockSpanner.createSessionNotFoundException("TEST_SESSION_NAME"))); - - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - TransactionRunner runner = client.readWriteTransaction(); - Long updateCount = - runner.run( - transaction -> { - return transaction.executeUpdate(UPDATE_STATEMENT); - }); - - assertThat(updateCount).isEqualTo(1L); - List executeSqlRequests = - mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); - assertEquals(3, executeSqlRequests.size()); - - // Verify the first BeginTransaction request is executed using multiplexed sessions. - assertTrue(mockSpanner.getSession(executeSqlRequests.get(0).getSession()).getMultiplexed()); - - // Verify the second BeginTransaction request is executed using regular sessions. - assertFalse(mockSpanner.getSession(executeSqlRequests.get(1).getSession()).getMultiplexed()); - - // Verify the second BeginTransaction request is executed using regular sessions. - assertFalse(mockSpanner.getSession(executeSqlRequests.get(2).getSession()).getMultiplexed()); - - // Verify that after the first regular session failed with SessionNotFoundException, a new - // regular session is picked up to re-run the transaction. - assertNotEquals(executeSqlRequests.get(1).getSession(), executeSqlRequests.get(2).getSession()); - } - - @Test - public void - testReadWriteUnimplementedError_FirstSucceedsWithMux_SecondRetriedWithRegularSessionDueToUnimplementedError() { - // Test scenario: - // 1. The first read-write transaction successfully performs an inline begin using a multiplexed - // session. - // 2. The second read-write transaction attempts to execute with a multiplexed session, but - // since the backend flag is assumed to be OFF, it encounters an UNIMPLEMENTED error. - // 3. Upon encountering the UNIMPLEMENTED error, the entire transaction callable for the second - // read-write transaction is retried using a regular session. - - Spanner spanner = setupSpannerBySkippingBeginTransactionVerificationForMux(); - - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - - // First read-write transaction attempt succeeds. - TransactionRunner runner = client.readWriteTransaction(); - Long updateCount = - runner.run( - transaction -> { - return transaction.executeUpdate(UPDATE_STATEMENT); - }); - - assertThat(updateCount).isEqualTo(1L); - - // The ExecuteSql request is forced to fail with UNIMPLEMENTED error. - mockSpanner.setExecuteSqlExecutionTime( - SimulatedExecutionTime.ofException( - Status.UNIMPLEMENTED - .withDescription( - "Transaction type read_write not supported with multiplexed sessions") - .asRuntimeException())); - - // Second read-write transaction on mux fails with UNIMPLEMENTED error, and then retried using - // regular session. - TransactionRunner runner1 = client.readWriteTransaction(); - Long updateCount1 = - runner1.run( - transaction -> { - return transaction.executeUpdate(UPDATE_STATEMENT); - }); - - assertThat(updateCount1).isEqualTo(1L); - - List executeSqlRequests = - mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); - assertEquals(3, executeSqlRequests.size()); - - // Verify the first BeginTransaction request is executed using multiplexed sessions. - assertTrue(mockSpanner.getSession(executeSqlRequests.get(0).getSession()).getMultiplexed()); - - // Verify the second BeginTransaction request is executed using multiplexed sessions. - assertTrue(mockSpanner.getSession(executeSqlRequests.get(1).getSession()).getMultiplexed()); - - // Verify the second BeginTransaction request is executed using regular sessions. - assertFalse(mockSpanner.getSession(executeSqlRequests.get(2).getSession()).getMultiplexed()); - } - @Test public void testRWTransactionWithTransactionManager_CommitAborted_SetsTransactionId_AndUsedInNewInstance() { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionsBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionsBenchmark.java index c6f7e22f280..f71fdfe37a3 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionsBenchmark.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionsBenchmark.java @@ -17,7 +17,6 @@ package com.google.cloud.spanner; import static com.google.cloud.spanner.BenchmarkingUtilityScripts.collectResults; -import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -118,9 +117,6 @@ public void teardown() throws Exception { @Benchmark public void burstQueries(final BenchmarkState server) throws Exception { final DatabaseClientImpl client = server.client; - SessionPool pool = client.pool; - assertThat(pool.totalSessions()) - .isEqualTo(server.spanner.getOptions().getSessionPoolOptions().getMinSessions()); ListeningScheduledExecutorService service = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(PARALLEL_THREADS)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutableCredentialsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutableCredentialsTest.java new file mode 100644 index 00000000000..dfa6d6695dd --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutableCredentialsTest.java @@ -0,0 +1,196 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import com.google.auth.CredentialTypeForMetrics; +import com.google.auth.RequestMetadataCallback; +import com.google.auth.oauth2.ServiceAccountCredentials; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.Executor; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class MutableCredentialsTest { + ServiceAccountCredentials initialCredentials = mock(ServiceAccountCredentials.class); + ServiceAccountCredentials initialScopedCredentials = mock(ServiceAccountCredentials.class); + ServiceAccountCredentials updatedCredentials = mock(ServiceAccountCredentials.class); + ServiceAccountCredentials updatedScopedCredentials = mock(ServiceAccountCredentials.class); + Set scopes = new HashSet<>(Arrays.asList("scope-a", "scope-b")); + Map> initialMetadata = + Collections.singletonMap("Authorization", Collections.singletonList("v1")); + Map> updatedMetadata = + Collections.singletonMap("Authorization", Collections.singletonList("v2")); + String initialAuthType = "auth-1"; + String updatedAuthType = "auth-2"; + String initialUniverseDomain = "googleapis.com"; + String updatedUniverseDomain = "abc.goog"; + CredentialTypeForMetrics initialMetricsCredentialType = + CredentialTypeForMetrics.SERVICE_ACCOUNT_CREDENTIALS_JWT; + CredentialTypeForMetrics updatedMetricsCredentialType = + CredentialTypeForMetrics.SERVICE_ACCOUNT_CREDENTIALS_AT; + + @Test + public void testCreateMutableCredentials() throws IOException { + setupInitialCredentials(); + + MutableCredentials credentials = new MutableCredentials(initialCredentials, scopes); + URI testUri = URI.create("https://spanner.googleapis.com"); + Executor executor = mock(Executor.class); + RequestMetadataCallback callback = mock(RequestMetadataCallback.class); + + validateInitialDelegatedCredentialsAreSet(credentials, testUri); + + credentials.getRequestMetadata(testUri, executor, callback); + + credentials.refresh(); + + verify(initialScopedCredentials, times(1)).getRequestMetadata(testUri, executor, callback); + verify(initialScopedCredentials, times(1)).refresh(); + } + + @Test + public void testCreateMutableCredentialsWithDefaultScopes() throws IOException { + Set defaultScopes = SpannerOptions.SCOPES; + when(initialCredentials.createScoped(defaultScopes)).thenReturn(initialScopedCredentials); + when(initialScopedCredentials.getAuthenticationType()).thenReturn(initialAuthType); + when(initialScopedCredentials.getRequestMetadata(any(URI.class))).thenReturn(initialMetadata); + when(initialScopedCredentials.getUniverseDomain()).thenReturn(initialUniverseDomain); + when(initialScopedCredentials.getMetricsCredentialType()) + .thenReturn(initialMetricsCredentialType); + when(initialScopedCredentials.hasRequestMetadata()).thenReturn(true); + when(initialScopedCredentials.hasRequestMetadataOnly()).thenReturn(true); + + MutableCredentials credentials = new MutableCredentials(initialCredentials); + URI testUri = URI.create("https://spanner.googleapis.com"); + + validateInitialDelegatedCredentialsAreSet(credentials, testUri); + verify(initialCredentials).createScoped(defaultScopes); + } + + @Test + public void testUpdateMutableCredentials() throws IOException { + setupInitialCredentials(); + setupUpdatedCredentials(); + + MutableCredentials credentials = new MutableCredentials(initialCredentials, scopes); + URI testUri = URI.create("https://example.com"); + Executor executor = mock(Executor.class); + RequestMetadataCallback callback = mock(RequestMetadataCallback.class); + + validateInitialDelegatedCredentialsAreSet(credentials, testUri); + + credentials.updateCredentials(updatedCredentials); + + assertEquals(updatedAuthType, credentials.getAuthenticationType()); + assertFalse(credentials.hasRequestMetadata()); + assertFalse(credentials.hasRequestMetadataOnly()); + assertSame(updatedMetadata, credentials.getRequestMetadata(testUri)); + assertEquals(updatedUniverseDomain, credentials.getUniverseDomain()); + assertEquals(updatedMetricsCredentialType, credentials.getMetricsCredentialType()); + + credentials.getRequestMetadata(testUri, executor, callback); + + credentials.refresh(); + + verify(updatedScopedCredentials, times(1)).getRequestMetadata(testUri, executor, callback); + verify(updatedScopedCredentials, times(1)).refresh(); + } + + @Test(expected = IllegalArgumentException.class) + public void testCreateMutableCredentialsEmptyScopesThrowsError() { + new MutableCredentials(initialCredentials, Collections.emptySet()); + } + + @Test + public void testCreateMutableCredentialsNullCredentialsThrowsError() { + NullPointerException exception = + assertThrows(NullPointerException.class, () -> new MutableCredentials(null, scopes)); + assertEquals("credentials must not be null", exception.getMessage()); + } + + @Test + public void testCreateMutableCredentialsNullScopesThrowsError() { + NullPointerException exception = + assertThrows( + NullPointerException.class, () -> new MutableCredentials(initialCredentials, null)); + assertEquals("scopes must not be null", exception.getMessage()); + } + + @Test + public void testUpdateMutableCredentialsNullCredentialsThrowsError() throws IOException { + setupInitialCredentials(); + MutableCredentials credentials = new MutableCredentials(initialCredentials, scopes); + + NullPointerException exception = + assertThrows(NullPointerException.class, () -> credentials.updateCredentials(null)); + assertEquals("credentials must not be null", exception.getMessage()); + } + + private void validateInitialDelegatedCredentialsAreSet( + MutableCredentials credentials, URI testUri) throws IOException { + assertEquals(initialAuthType, credentials.getAuthenticationType()); + assertTrue(credentials.hasRequestMetadata()); + assertTrue(credentials.hasRequestMetadataOnly()); + assertEquals(initialMetadata, credentials.getRequestMetadata(testUri)); + assertEquals(initialUniverseDomain, credentials.getUniverseDomain()); + assertEquals(initialMetricsCredentialType, credentials.getMetricsCredentialType()); + } + + private void setupInitialCredentials() throws IOException { + when(initialCredentials.createScoped(scopes)).thenReturn(initialScopedCredentials); + when(initialCredentials.createScoped(Collections.emptyList())) + .thenReturn(initialScopedCredentials); + when(initialScopedCredentials.getAuthenticationType()).thenReturn(initialAuthType); + when(initialScopedCredentials.getRequestMetadata(any(URI.class))).thenReturn(initialMetadata); + when(initialScopedCredentials.getUniverseDomain()).thenReturn(initialUniverseDomain); + when(initialScopedCredentials.getMetricsCredentialType()) + .thenReturn(initialMetricsCredentialType); + when(initialScopedCredentials.hasRequestMetadata()).thenReturn(true); + when(initialScopedCredentials.hasRequestMetadataOnly()).thenReturn(true); + } + + private void setupUpdatedCredentials() throws IOException { + when(updatedCredentials.createScoped(scopes)).thenReturn(updatedScopedCredentials); + when(updatedScopedCredentials.getAuthenticationType()).thenReturn(updatedAuthType); + when(updatedScopedCredentials.getRequestMetadata(any(URI.class))).thenReturn(updatedMetadata); + when(updatedScopedCredentials.getUniverseDomain()).thenReturn(updatedUniverseDomain); + when(updatedScopedCredentials.getMetricsCredentialType()) + .thenReturn(updatedMetricsCredentialType); + when(updatedScopedCredentials.hasRequestMetadata()).thenReturn(false); + when(updatedScopedCredentials.hasRequestMetadataOnly()).thenReturn(false); + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutationTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutationTest.java index a8ddfe706a8..fbc34a37daf 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutationTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutationTest.java @@ -30,6 +30,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.testing.EqualsTester; import java.math.BigDecimal; +import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -185,6 +186,64 @@ public void delete() { assertThat(m.toString()).isEqualTo("delete(T1{[k1]})"); } + @Test + public void send() { + Key key = Key.of(123); + Value payload = Value.bytes(ByteArray.copyFrom("payload")); + Instant deliverAt = Instant.now().plusSeconds(3600); + Mutation m = + Mutation.newSendBuilder("TestQueue") + .setKey(key) + .setPayload(payload) + .setDeliveryTime(deliverAt) + .build(); + assertThat(m.getOperation()).isEqualTo(Mutation.Op.SEND); + assertThat(m.getQueue()).isEqualTo("TestQueue"); + assertThat(m.getKey()).isEqualTo(key); + assertThat(m.getPayload()).isEqualTo(payload); + assertThat(m.getDeliveryTime()).isEqualTo(deliverAt); + assertThat(m.toString()) + .isEqualTo( + "send(TestQueue{key=[123], payload=" + payload + ", deliveryTime=" + deliverAt + "})"); + } + + @Test + public void sendMissingKey() { + IllegalStateException e = + assertThrows( + IllegalStateException.class, + () -> Mutation.newSendBuilder("TestQueue").setPayload(Value.string("payload")).build()); + assertThat(e.getMessage()).contains("Key must be set"); + } + + @Test + public void sendMissingPayload() { + IllegalStateException e = + assertThrows( + IllegalStateException.class, + () -> Mutation.newSendBuilder("TestQueue").setKey(Key.of("k1")).build()); + assertThat(e.getMessage()).contains("Payload must be set"); + } + + @Test + public void ackIgnoreNotFound() { + Key key = Key.of("k1"); + Mutation m = Mutation.newAckBuilder("TestQueue").setKey(key).setIgnoreNotFound(true).build(); + assertThat(m.getOperation()).isEqualTo(Mutation.Op.ACK); + assertThat(m.getQueue()).isEqualTo("TestQueue"); + assertThat(m.getKey()).isEqualTo(key); + assertTrue(m.getIgnoreNotFound()); + assertThat(m.toString()).isEqualTo("ack(TestQueue{key=[k1], ignoreNotFound=true})"); + } + + @Test + public void ackMissingKey() { + IllegalStateException e = + assertThrows( + IllegalStateException.class, () -> Mutation.newAckBuilder("TestQueue").build()); + assertThat(e.getMessage()).contains("Key must be set"); + } + @Test public void equalsAndHashCode() { EqualsTester tester = new EqualsTester(); @@ -305,15 +364,84 @@ public void equalsAndHashCode() { tester.testEquals(); } + @Test + public void equalsAndHashCode_sendAndAck() { + EqualsTester tester = new EqualsTester(); + + Key key1 = Key.of("k1"); + Key key2 = Key.of("k2"); + Value payload1 = Value.string("p1"); + Value payload2 = Value.string("p2"); + Instant time1 = Instant.now(); + Instant time2 = time1.plusSeconds(10); + + // SEND + tester.addEqualityGroup( + Mutation.newSendBuilder("TestQueue").setKey(key1).setPayload(payload1).build(), + Mutation.newSendBuilder("TestQueue").setKey(key1).setPayload(payload1).build()); + // Different key + tester.addEqualityGroup( + Mutation.newSendBuilder("TestQueue").setKey(key2).setPayload(payload1).build()); + // Different payload + tester.addEqualityGroup( + Mutation.newSendBuilder("TestQueue").setKey(key1).setPayload(payload2).build()); + // Different queue + tester.addEqualityGroup( + Mutation.newSendBuilder("TestQueue2").setKey(key1).setPayload(payload1).build()); + // Different time + tester.addEqualityGroup( + Mutation.newSendBuilder("TestQueue") + .setKey(key1) + .setPayload(payload1) + .setDeliveryTime(time1) + .build(), + Mutation.newSendBuilder("TestQueue") + .setKey(key1) + .setPayload(payload1) + .setDeliveryTime(time1) + .build()); + tester.addEqualityGroup( + Mutation.newSendBuilder("TestQueue") + .setKey(key1) + .setPayload(payload1) + .setDeliveryTime(time2) + .build()); + + // ACK + tester.addEqualityGroup( + Mutation.newAckBuilder("TestQueue").setKey(key1).build(), + Mutation.newAckBuilder("TestQueue").setKey(key1).build()); + // Different key + tester.addEqualityGroup(Mutation.newAckBuilder("TestQueue").setKey(key2).build()); + // Different queue + tester.addEqualityGroup(Mutation.newAckBuilder("TestQueue2").setKey(key1).build()); + // Different ignoreNotFound + tester.addEqualityGroup( + Mutation.newAckBuilder("TestQueue").setKey(key1).setIgnoreNotFound(true).build(), + Mutation.newAckBuilder("TestQueue").setKey(key1).setIgnoreNotFound(true).build()); + + // Distinct Op types + tester.addEqualityGroup(Mutation.newInsertBuilder("TestQueue").build()); + + tester.testEquals(); + } + @Test public void serializationBasic() { + Instant time = Instant.now(); List mutations = Arrays.asList( Mutation.newInsertBuilder("T").set("C").to("V").build(), Mutation.newUpdateBuilder("T").set("C").to("V").build(), Mutation.newInsertOrUpdateBuilder("T").set("C").to("V").build(), Mutation.newReplaceBuilder("T").set("C").to("V").build(), - Mutation.delete("T", KeySet.singleKey(Key.of("k")))); + Mutation.delete("T", KeySet.singleKey(Key.of("k"))), + Mutation.newSendBuilder("Q") + .setKey(Key.of("k")) + .setPayload(Value.string("p")) + .setDeliveryTime(time) + .build(), + Mutation.newAckBuilder("Q").setKey(Key.of("k")).setIgnoreNotFound(true).build()); List proto = new ArrayList<>(); @@ -328,7 +456,7 @@ public void serializationBasic() { assertThat(proto.get(0)).isSameInstanceAs(existingProto); proto.remove(0); - assertThat(proto.size()).isEqualTo(5); + assertThat(proto.size()).isEqualTo(7); MatcherAssert.assertThat( proto.get(0), matchesProto("insert { table: 'T' columns: 'C' values { values { string_value: 'V' } } }")); @@ -347,6 +475,18 @@ public void serializationBasic() { MatcherAssert.assertThat( proto.get(4), matchesProto("delete { table: 'T' key_set { keys { values { string_value: 'k' } } } }")); + MatcherAssert.assertThat( + proto.get(5), + matchesProto( + "send { queue: 'Q' key { values { string_value: 'k' } } deliver_time { seconds: " + + time.getEpochSecond() + + " nanos: " + + time.getNano() + + " } payload { string_value: 'p' } }")); + MatcherAssert.assertThat( + proto.get(6), + matchesProto( + "ack { queue: 'Q' key { values { string_value: 'k' } } ignore_not_found: true }")); } @Test diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryBuiltInMetricsTracerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryBuiltInMetricsTracerTest.java index aeb9487e2ec..a3273c2a6aa 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryBuiltInMetricsTracerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryBuiltInMetricsTracerTest.java @@ -69,21 +69,17 @@ public class OpenTelemetryBuiltInMetricsTracerTest extends AbstractNettyMockServ private static final Statement SELECT_RANDOM = Statement.of("SELECT * FROM random"); private static final Statement UPDATE_RANDOM = Statement.of("UPDATE random SET foo=1 WHERE id=1"); private static InMemoryMetricReader metricReader; - private static Map attributes = + private static final Map attributes = BuiltInMetricsProvider.INSTANCE.createClientAttributes(); - private static Attributes expectedCommonBaseAttributes = + private static final Attributes expectedCommonBaseAttributes = Attributes.builder() .put(BuiltInMetricsConstant.CLIENT_NAME_KEY, "spanner-java/") .put(BuiltInMetricsConstant.CLIENT_UID_KEY, attributes.get("client_uid")) .put(BuiltInMetricsConstant.INSTANCE_ID_KEY, "i") .put(BuiltInMetricsConstant.DATABASE_KEY, "d") .put(BuiltInMetricsConstant.DIRECT_PATH_ENABLED_KEY, "false") + .put(BuiltInMetricsConstant.DIRECT_PATH_USED_KEY, "false") .build(); - ; - private static Attributes expectedCommonRequestAttributes = - Attributes.builder().put(BuiltInMetricsConstant.DIRECT_PATH_USED_KEY, "false").build(); - ; - private static final double MIN_LATENCY = 0; private DatabaseClient client; @@ -175,7 +171,6 @@ public void testMetricsSingleUseQuery() { double elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); Attributes expectedAttributes = expectedCommonBaseAttributes.toBuilder() - .putAll(expectedCommonRequestAttributes) .put(BuiltInMetricsConstant.STATUS_KEY, "OK") .put(BuiltInMetricsConstant.METHOD_KEY, "Spanner.ExecuteStreamingSql") .build(); @@ -237,7 +232,6 @@ public void testMetricsWithGaxRetryUnaryRpc() { Attributes expectedAttributesBeginTransactionOK = expectedCommonBaseAttributes.toBuilder() - .putAll(expectedCommonRequestAttributes) .put(BuiltInMetricsConstant.STATUS_KEY, "OK") .put(BuiltInMetricsConstant.METHOD_KEY, "Spanner.BeginTransaction") .build(); @@ -284,8 +278,7 @@ public void testNoNetworkConnection() { // This tells the Spanner client to fail directly if it gets an UNAVAILABLE exception. // The 10-second deadline is chosen to ensure that: // 1. The test fails within a reasonable amount of time if retries for whatever reason - // has - // been re-enabled. + // has been re-enabled. // 2. The timeout is long enough to never be triggered during normal tests. input.setSimpleTimeoutNoRetriesDuration(Duration.ofSeconds(10L)); return null; @@ -323,7 +316,6 @@ public void testNoNetworkConnection() { Attributes expectedAttributesCreateSessionOK = expectedCommonBaseAttributes.toBuilder() - .putAll(expectedCommonRequestAttributes) .put(BuiltInMetricsConstant.STATUS_KEY, "OK") .put(BuiltInMetricsConstant.METHOD_KEY, "Spanner.CreateSession") // Include the additional attributes that are added by the HeaderInterceptor in the @@ -347,6 +339,10 @@ public void testNoNetworkConnection() { // Attempt count should have a failed metric point for CreateSession. assertEquals( 1, getAggregatedValue(attemptCountMetricData, expectedAttributesCreateSessionFailed), 0); + assertTrue( + checkIfMetricExists(metricReader, BuiltInMetricsConstant.GFE_CONNECTIVITY_ERROR_NAME)); + assertTrue( + checkIfMetricExists(metricReader, BuiltInMetricsConstant.AFE_CONNECTIVITY_ERROR_NAME)); } @Test @@ -383,15 +379,15 @@ public void testNoServerTimingHeader() throws IOException, InterruptedException Attributes expectedAttributes = expectedCommonBaseAttributes.toBuilder() - .putAll(expectedCommonRequestAttributes) .put(BuiltInMetricsConstant.STATUS_KEY, "OK") .put(BuiltInMetricsConstant.METHOD_KEY, "Spanner.ExecuteSql") .build(); assertFalse(checkIfMetricExists(metricReader, BuiltInMetricsConstant.AFE_LATENCIES_NAME)); assertFalse(checkIfMetricExists(metricReader, BuiltInMetricsConstant.GFE_LATENCIES_NAME)); - // Metric is disabled currently - assertFalse( + assertTrue( + checkIfMetricExists(metricReader, BuiltInMetricsConstant.GFE_CONNECTIVITY_ERROR_NAME)); + assertTrue( checkIfMetricExists(metricReader, BuiltInMetricsConstant.AFE_CONNECTIVITY_ERROR_NAME)); spannerNoHeader.close(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java index 732709a7310..8ff8827664d 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; @@ -117,14 +116,6 @@ public class OpenTelemetrySpanTest { ImmutableList.of("Request for 1 multiplexed session returned 1 session"); private int expectedCreateMultiplexedSessionsRequestEventsCount = 1; - private List expectedBatchCreateSessionsRequestEvents = - ImmutableList.of("Requesting 2 sessions", "Request for 2 sessions returned 2 sessions"); - - private int expectedBatchCreateSessionsRequestEventsCount = 2; - - private List expectedBatchCreateSessionsEvents = ImmutableList.of("Creating 2 sessions"); - - private int expectedBatchCreateSessionsEventsCount = 1; private List expectedExecuteStreamingQueryEvents = ImmutableList.of("Starting/Resuming stream"); @@ -175,7 +166,6 @@ public static void setupOpenTelemetry() { @BeforeClass public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); // Incorporating OpenCensus tracer to ensure that OpenTraces traces are utilized if enabled, // regardless of the presence of OpenCensus tracer. java.lang.reflect.Field field = Tracing.class.getDeclaredField("traceComponent"); @@ -276,18 +266,10 @@ public void singleUse() { List expectedReadOnlyTransactionSingleUseEvents = getExpectedReadOnlyTransactionSingleUseEvents(); List expectedReadOnlyTransactionSpans = - isMultiplexedSessionsEnabled() - ? ImmutableList.of( - "CloudSpannerOperation.CreateMultiplexedSession", - "CloudSpannerOperation.BatchCreateSessionsRequest", - "CloudSpannerOperation.ExecuteStreamingQuery", - "CloudSpannerOperation.BatchCreateSessions", - "CloudSpanner.ReadOnlyTransaction") - : ImmutableList.of( - "CloudSpannerOperation.BatchCreateSessionsRequest", - "CloudSpannerOperation.ExecuteStreamingQuery", - "CloudSpannerOperation.BatchCreateSessions", - "CloudSpanner.ReadOnlyTransaction"); + ImmutableList.of( + "CloudSpannerOperation.CreateMultiplexedSession", + "CloudSpannerOperation.ExecuteStreamingQuery", + "CloudSpanner.ReadOnlyTransaction"); int expectedReadOnlyTransactionSingleUseEventsCount = expectedReadOnlyTransactionSingleUseEvents.size(); @@ -314,18 +296,6 @@ public void singleUse() { expectedCreateMultiplexedSessionsRequestEvents, expectedCreateMultiplexedSessionsRequestEventsCount); break; - case "CloudSpannerOperation.BatchCreateSessionsRequest": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsRequestEvents, - expectedBatchCreateSessionsRequestEventsCount); - break; - case "CloudSpannerOperation.BatchCreateSessions": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsEvents, - expectedBatchCreateSessionsEventsCount); - break; case "CloudSpannerOperation.ExecuteStreamingQuery": verifyRequestEvents( spanItem, @@ -361,31 +331,12 @@ private List getExpectedReadOnlyTransactionSingleUseEvents() { @Test public void multiUse() { List expectedReadOnlyTransactionSpans = - isMultiplexedSessionsEnabled() - ? ImmutableList.of( - "CloudSpannerOperation.CreateMultiplexedSession", - "CloudSpannerOperation.BatchCreateSessionsRequest", - "CloudSpannerOperation.ExecuteStreamingQuery", - "CloudSpannerOperation.BatchCreateSessions", - "CloudSpanner.ReadOnlyTransaction") - : ImmutableList.of( - "CloudSpannerOperation.BatchCreateSessionsRequest", - "CloudSpannerOperation.ExecuteStreamingQuery", - "CloudSpannerOperation.BatchCreateSessions", - "CloudSpanner.ReadOnlyTransaction"); - List expectedReadOnlyTransactionMultiUseEvents; - if (isMultiplexedSessionsEnabled()) { - expectedReadOnlyTransactionMultiUseEvents = - ImmutableList.of("Creating Transaction", "Transaction Creation Done"); - } else { - expectedReadOnlyTransactionMultiUseEvents = - ImmutableList.of( - "Acquiring session", - "Acquired session", - "Using Session", - "Creating Transaction", - "Transaction Creation Done"); - } + ImmutableList.of( + "CloudSpannerOperation.CreateMultiplexedSession", + "CloudSpannerOperation.ExecuteStreamingQuery", + "CloudSpanner.ReadOnlyTransaction"); + List expectedReadOnlyTransactionMultiUseEvents = + ImmutableList.of("Creating Transaction", "Transaction Creation Done"); int expectedReadOnlyTransactionMultiUseEventsCount = expectedReadOnlyTransactionMultiUseEvents.size(); @@ -411,18 +362,6 @@ public void multiUse() { expectedCreateMultiplexedSessionsRequestEvents, expectedCreateMultiplexedSessionsRequestEventsCount); break; - case "CloudSpannerOperation.BatchCreateSessionsRequest": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsRequestEvents, - expectedBatchCreateSessionsRequestEventsCount); - break; - case "CloudSpannerOperation.BatchCreateSessions": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsEvents, - expectedBatchCreateSessionsEventsCount); - break; case "CloudSpannerOperation.ExecuteStreamingQuery": verifyRequestEvents( spanItem, @@ -447,38 +386,27 @@ public void multiUse() { @Test public void transactionRunner() { List expectedReadWriteTransactionWithCommitSpans = - isMultiplexedSessionsEnabled() - ? ImmutableList.of( - "CloudSpannerOperation.CreateMultiplexedSession", - "CloudSpannerOperation.BatchCreateSessionsRequest", - "CloudSpannerOperation.ExecuteUpdate", - "CloudSpannerOperation.Commit", - "CloudSpannerOperation.BatchCreateSessions", - "CloudSpanner.ReadWriteTransaction") - : ImmutableList.of( - "CloudSpannerOperation.BatchCreateSessionsRequest", - "CloudSpannerOperation.ExecuteUpdate", - "CloudSpannerOperation.Commit", - "CloudSpannerOperation.BatchCreateSessions", - "CloudSpanner.ReadWriteTransaction"); - - if (isMultiplexedSessionsEnabledForRW()) { - expectedReadWriteTransactionEvents = - ImmutableList.of( - "Starting Transaction Attempt", - "Starting Commit", - "Commit Done", - "Transaction Attempt Succeeded"); - expectedReadWriteTransactionEventsCount = 4; - } + ImmutableList.of( + "CloudSpannerOperation.CreateMultiplexedSession", + "CloudSpannerOperation.ExecuteUpdate", + "CloudSpannerOperation.Commit", + "CloudSpanner.ReadWriteTransaction"); + + expectedReadWriteTransactionEvents = + ImmutableList.of( + "Starting Transaction Attempt", + "Starting Commit", + "Commit Done", + "Transaction Attempt Succeeded"); + expectedReadWriteTransactionEventsCount = 4; DatabaseClient client = getClient(); TransactionRunner runner = client.readWriteTransaction(); runner.run(transaction -> transaction.executeUpdate(UPDATE_STATEMENT)); - // Wait until the list of spans contains "CloudSpannerOperation.BatchCreateSessions", as this is + // Wait until the list of spans contains "CloudSpannerOperation.CreateSession", as this is // an async operation. Stopwatch stopwatch = Stopwatch.createStarted(); while (spanExporter.getFinishedSpanItems().stream() - .noneMatch(span -> span.getName().equals("CloudSpannerOperation.BatchCreateSessions")) + .noneMatch(span -> span.getName().equals("CloudSpannerOperation.CreateSession")) && stopwatch.elapsed(TimeUnit.MILLISECONDS) < 100) { Thread.yield(); } @@ -495,18 +423,6 @@ public void transactionRunner() { expectedCreateMultiplexedSessionsRequestEvents, expectedCreateMultiplexedSessionsRequestEventsCount); break; - case "CloudSpannerOperation.BatchCreateSessionsRequest": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsRequestEvents, - expectedBatchCreateSessionsRequestEventsCount); - break; - case "CloudSpannerOperation.BatchCreateSessions": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsEvents, - expectedBatchCreateSessionsEventsCount); - break; case "CloudSpannerOperation.Commit": case "CloudSpannerOperation.ExecuteUpdate": assertEquals(0, spanItem.getEvents().size()); @@ -529,26 +445,16 @@ public void transactionRunner() { @Test public void transactionRunnerWithError() { List expectedReadWriteTransactionSpans = - isMultiplexedSessionsEnabled() - ? ImmutableList.of( - "CloudSpannerOperation.CreateMultiplexedSession", - "CloudSpannerOperation.BatchCreateSessionsRequest", - "CloudSpannerOperation.BatchCreateSessions", - "CloudSpannerOperation.ExecuteUpdate", - "CloudSpanner.ReadWriteTransaction") - : ImmutableList.of( - "CloudSpannerOperation.BatchCreateSessionsRequest", - "CloudSpannerOperation.BatchCreateSessions", - "CloudSpannerOperation.ExecuteUpdate", - "CloudSpanner.ReadWriteTransaction"); - if (isMultiplexedSessionsEnabledForRW()) { - expectedReadWriteTransactionErrorEvents = - ImmutableList.of( - "Starting Transaction Attempt", - "Transaction Attempt Failed in user operation", - "exception"); - expectedReadWriteTransactionErrorEventsCount = 3; - } + ImmutableList.of( + "CloudSpannerOperation.CreateMultiplexedSession", + "CloudSpannerOperation.ExecuteUpdate", + "CloudSpanner.ReadWriteTransaction"); + expectedReadWriteTransactionErrorEvents = + ImmutableList.of( + "Starting Transaction Attempt", + "Transaction Attempt Failed in user operation", + "exception"); + expectedReadWriteTransactionErrorEventsCount = 3; DatabaseClient client = getClient(); TransactionRunner runner = client.readWriteTransaction(); SpannerException e = @@ -570,18 +476,6 @@ public void transactionRunnerWithError() { expectedCreateMultiplexedSessionsRequestEvents, expectedCreateMultiplexedSessionsRequestEventsCount); break; - case "CloudSpannerOperation.BatchCreateSessionsRequest": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsRequestEvents, - expectedBatchCreateSessionsRequestEventsCount); - break; - case "CloudSpannerOperation.BatchCreateSessions": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsEvents, - expectedBatchCreateSessionsEventsCount); - break; case "CloudSpanner.ReadWriteTransaction": verifyRequestEvents( spanItem, @@ -605,23 +499,19 @@ public void transactionRunnerWithFailedAndBeginTransaction() { List expectedReadWriteTransactionWithCommitAndBeginTransactionSpans = ImmutableList.of( "CloudSpannerOperation.BeginTransaction", - "CloudSpannerOperation.BatchCreateSessionsRequest", "CloudSpannerOperation.ExecuteUpdate", "CloudSpannerOperation.Commit", - "CloudSpannerOperation.BatchCreateSessions", "CloudSpanner.ReadWriteTransaction"); - if (isMultiplexedSessionsEnabledForRW()) { - expectedReadWriteTransactionErrorWithBeginTransactionEvents = - ImmutableList.of( - "Starting Transaction Attempt", - "Transaction Attempt Aborted in user operation. Retrying", - "Creating Transaction", - "Transaction Creation Done", - "Starting Commit", - "Commit Done", - "Transaction Attempt Succeeded"); - expectedReadWriteTransactionErrorWithBeginTransactionEventsCount = 8; - } + expectedReadWriteTransactionErrorWithBeginTransactionEvents = + ImmutableList.of( + "Starting Transaction Attempt", + "Transaction Attempt Aborted in user operation. Retrying", + "Creating Transaction", + "Transaction Creation Done", + "Starting Commit", + "Commit Done", + "Transaction Attempt Succeeded"); + expectedReadWriteTransactionErrorWithBeginTransactionEventsCount = 8; DatabaseClient client = getClient(); assertEquals( Long.valueOf(1L), @@ -641,7 +531,7 @@ public void transactionRunnerWithFailedAndBeginTransaction() { return transaction.executeUpdate(UPDATE_STATEMENT); })); // Wait for all spans to finish. Failing to do so can cause the test to miss the - // BatchCreateSessions span, as that span is executed asynchronously in the SessionClient, and + // CreateSession span, as that span is executed asynchronously in the SessionClient, and // the SessionClient returns the session to the pool before the span has finished fully. Stopwatch stopwatch = Stopwatch.createStarted(); while (spanExporter.getFinishedSpanItems().size() @@ -667,18 +557,6 @@ public void transactionRunnerWithFailedAndBeginTransaction() { expectedCreateMultiplexedSessionsRequestEvents, expectedCreateMultiplexedSessionsRequestEventsCount); break; - case "CloudSpannerOperation.BatchCreateSessionsRequest": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsRequestEvents, - expectedBatchCreateSessionsRequestEventsCount); - break; - case "CloudSpannerOperation.BatchCreateSessions": - verifyRequestEvents( - spanItem, - expectedBatchCreateSessionsEvents, - expectedBatchCreateSessionsEventsCount); - break; case "CloudSpannerOperation.Commit": case "CloudSpannerOperation.BeginTransaction": case "CloudSpannerOperation.ExecuteUpdate": @@ -718,7 +596,7 @@ public void testTransactionRunnerWithRetryOnBeginTransaction() { }); assertEquals(2, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); - int numExpectedSpans = isMultiplexedSessionsEnabled() ? 10 : 8; + int numExpectedSpans = 7; waitForFinishedSpans(numExpectedSpans); List finishedSpans = spanExporter.getFinishedSpanItems(); List finishedSpanNames = @@ -731,13 +609,7 @@ public void testTransactionRunnerWithRetryOnBeginTransaction() { assertTrue( actualSpanNames, finishedSpanNames.contains("CloudSpannerOperation.BeginTransaction")); assertTrue(actualSpanNames, finishedSpanNames.contains("CloudSpannerOperation.Commit")); - assertTrue( - actualSpanNames, finishedSpanNames.contains("CloudSpannerOperation.BatchCreateSessions")); - assertTrue( - actualSpanNames, - finishedSpanNames.contains("CloudSpannerOperation.BatchCreateSessionsRequest")); - assertTrue(actualSpanNames, finishedSpanNames.contains("Spanner.BatchCreateSessions")); assertTrue(actualSpanNames, finishedSpanNames.contains("Spanner.BeginTransaction")); assertTrue(actualSpanNames, finishedSpanNames.contains("Spanner.Commit")); @@ -768,7 +640,7 @@ public void testSingleUseRetryOnExecuteStreamingSql() { } assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - int numExpectedSpans = isMultiplexedSessionsEnabled() ? 9 : 7; + int numExpectedSpans = 6; waitForFinishedSpans(numExpectedSpans); List finishedSpans = spanExporter.getFinishedSpanItems(); List finishedSpanNames = @@ -780,13 +652,7 @@ public void testSingleUseRetryOnExecuteStreamingSql() { assertTrue(actualSpanNames, finishedSpanNames.contains("CloudSpanner.ReadOnlyTransaction")); assertTrue( actualSpanNames, finishedSpanNames.contains("CloudSpannerOperation.ExecuteStreamingQuery")); - assertTrue( - actualSpanNames, finishedSpanNames.contains("CloudSpannerOperation.BatchCreateSessions")); - assertTrue( - actualSpanNames, - finishedSpanNames.contains("CloudSpannerOperation.BatchCreateSessionsRequest")); - assertTrue(actualSpanNames, finishedSpanNames.contains("Spanner.BatchCreateSessions")); assertTrue(actualSpanNames, finishedSpanNames.contains("Spanner.ExecuteStreamingSql")); // UNAVAILABLE errors on ExecuteStreamingSql are handled manually in the client library, which @@ -817,7 +683,7 @@ public void testRetryOnExecuteSql() { .run(transaction -> transaction.executeUpdate(UPDATE_STATEMENT)); assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - int numExpectedSpans = isMultiplexedSessionsEnabled() ? 10 : 8; + int numExpectedSpans = 7; waitForFinishedSpans(numExpectedSpans); List finishedSpans = spanExporter.getFinishedSpanItems(); List finishedSpanNames = @@ -828,13 +694,6 @@ public void testRetryOnExecuteSql() { assertTrue(actualSpanNames, finishedSpanNames.contains("CloudSpanner.ReadWriteTransaction")); assertTrue(actualSpanNames, finishedSpanNames.contains("CloudSpannerOperation.Commit")); - assertTrue( - actualSpanNames, finishedSpanNames.contains("CloudSpannerOperation.BatchCreateSessions")); - assertTrue( - actualSpanNames, - finishedSpanNames.contains("CloudSpannerOperation.BatchCreateSessionsRequest")); - - assertTrue(actualSpanNames, finishedSpanNames.contains("Spanner.BatchCreateSessions")); assertTrue(actualSpanNames, finishedSpanNames.contains("Spanner.ExecuteSql")); assertTrue(actualSpanNames, finishedSpanNames.contains("Spanner.Commit")); @@ -912,6 +771,11 @@ private static void verifyCommonAttributes(SpanData span) { assertEquals( span.getAttributes().get(AttributeKey.stringKey("gcp.client.version")), GaxProperties.getLibraryVersion(TraceWrapper.class)); + assertEquals( + span.getAttributes().get(AttributeKey.stringKey("gcp.resource.name")), + String.format( + "//spanner.googleapis.com/projects/%s/instances/%s/databases/%s", + TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); } private static void verifyTableAttributes(SpanData span) { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java index 8571c42b3dd..5bd594e83c1 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OptionsTest.java @@ -34,6 +34,7 @@ import com.google.spanner.v1.DirectedReadOptions.ReplicaSelection; import com.google.spanner.v1.ReadRequest.LockHint; import com.google.spanner.v1.ReadRequest.OrderBy; +import com.google.spanner.v1.RequestOptions; import com.google.spanner.v1.RequestOptions.Priority; import com.google.spanner.v1.TransactionOptions.IsolationLevel; import com.google.spanner.v1.TransactionOptions.ReadWrite; @@ -53,6 +54,32 @@ public class OptionsTest { ReplicaSelection.newBuilder().setLocation("us-west1").build())) .build(); + @Test + public void testToRequestOptionsProto() { + RequestOptions.ClientContext clientContext = + RequestOptions.ClientContext.newBuilder() + .putSecureContext( + "key", com.google.protobuf.Value.newBuilder().setStringValue("value").build()) + .build(); + Options options = + Options.fromQueryOptions( + Options.priority(RpcPriority.HIGH), + Options.tag("tag"), + Options.clientContext(clientContext)); + + RequestOptions protoForStatement = options.toRequestOptionsProto(false); + assertEquals(RequestOptions.Priority.PRIORITY_HIGH, protoForStatement.getPriority()); + assertEquals("tag", protoForStatement.getRequestTag()); + assertEquals("", protoForStatement.getTransactionTag()); + assertEquals(clientContext, protoForStatement.getClientContext()); + + RequestOptions protoForTransaction = options.toRequestOptionsProto(true); + assertEquals(RequestOptions.Priority.PRIORITY_HIGH, protoForTransaction.getPriority()); + assertEquals("", protoForTransaction.getRequestTag()); + assertEquals("tag", protoForTransaction.getTransactionTag()); + assertEquals(clientContext, protoForTransaction.getClientContext()); + } + @Test public void negativeLimitsNotAllowed() { IllegalArgumentException e = diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OrphanedTransactionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OrphanedTransactionTest.java new file mode 100644 index 00000000000..2e0a72086ed --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OrphanedTransactionTest.java @@ -0,0 +1,147 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner; + +import static org.junit.Assert.assertNull; + +import com.google.api.core.ApiFuture; +import com.google.cloud.NoCredentials; +import com.google.cloud.spanner.AsyncTransactionManager.TransactionContextFuture; +import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; +import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; +import com.google.cloud.spanner.connection.AbstractMockServerTest; +import com.google.cloud.spanner.connection.RandomResultSetGenerator; +import com.google.common.base.Function; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.RollbackRequest; +import io.grpc.ManagedChannelBuilder; +import io.grpc.Status; +import java.util.Objects; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.threeten.bp.Duration; + +@RunWith(JUnit4.class) +public class OrphanedTransactionTest extends AbstractMockServerTest { + private static final Statement STATEMENT = Statement.of("SELECT * FROM random"); + + @BeforeClass + public static void setupReadResult() { + com.google.cloud.spanner.connection.RandomResultSetGenerator generator = + new RandomResultSetGenerator(10); + mockSpanner.putStatementResult(StatementResult.query(STATEMENT, generator.generate())); + } + + private Spanner createSpanner() { + return SpannerOptions.newBuilder() + .setProjectId("fake-project") + .setHost("http://localhost:" + getPort()) + .setCredentials(NoCredentials.getInstance()) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setSessionPoolOption( + SessionPoolOptions.newBuilder().setWaitForMinSessions(Duration.ofSeconds(5L)).build()) + .build() + .getService(); + } + + @Test + public void testOrphanedTransaction() throws Exception { + ExecutorService executor = Executors.newCachedThreadPool(); + try (Spanner spanner = createSpanner()) { + DatabaseClient client = + spanner.getDatabaseClient( + DatabaseId.of("fake-project", "fake-instance", "fake-database")); + // Freeze the mock server to ensure that the request lands on the mock server before we + // proceed. + mockSpanner.freeze(); + AsyncTransactionManager manager = client.transactionManagerAsync(); + TransactionContextFuture context = manager.beginAsync(); + context.then( + (txn, input) -> { + try (AsyncResultSet resultSet = txn.executeQueryAsync(STATEMENT)) { + resultSet.toListAsync( + (Function) + row -> Objects.requireNonNull(row).getValue(0).getAsString(), + executor); + } + return null; + }, + executor); + // Wait for the ExecuteSqlRequest to land on the mock server. + mockSpanner.waitForRequestsToContain( + input -> + input instanceof ExecuteSqlRequest + && ((ExecuteSqlRequest) input).getSql().equals(STATEMENT.getSql()), + 5000L); + // Now close the transaction. This should (eventually) trigger a rollback, even though the + // client has not yet received a transaction ID. + manager.closeAsync(); + // Unfreeze the mock server and wait for the Rollback request to be received. + mockSpanner.unfreeze(); + mockSpanner.waitForLastRequestToBe(RollbackRequest.class, 5000L); + } finally { + executor.shutdown(); + } + } + + @Test + public void testOrphanedTransactionWithFailedFirstQuery() throws Exception { + ExecutorService executor = Executors.newCachedThreadPool(); + mockSpanner.setExecuteStreamingSqlExecutionTime( + SimulatedExecutionTime.ofException( + Status.INVALID_ARGUMENT.withDescription("table not found").asRuntimeException())); + try (Spanner spanner = createSpanner()) { + DatabaseClient client = + spanner.getDatabaseClient( + DatabaseId.of("fake-project", "fake-instance", "fake-database")); + // Freeze the mock server to ensure that the request lands on the mock server before we + // proceed. + mockSpanner.freeze(); + AsyncTransactionManager manager = client.transactionManagerAsync(); + TransactionContextFuture context = manager.beginAsync(); + context.then( + (txn, input) -> { + try (AsyncResultSet resultSet = txn.executeQueryAsync(STATEMENT)) { + resultSet.toListAsync( + (Function) + row -> Objects.requireNonNull(row).getValue(0).getAsString(), + executor); + } + return null; + }, + executor); + // Wait for the ExecuteSqlRequest to land on the mock server. + mockSpanner.waitForRequestsToContain( + input -> + input instanceof ExecuteSqlRequest + && ((ExecuteSqlRequest) input).getSql().equals(STATEMENT.getSql()), + 5000L); + // Now close the transaction. This will not trigger a Rollback, as the statement failed. + // The closeResult will be done when the error for the failed statement is returned to the + // client. + ApiFuture closeResult = manager.closeAsync(); + mockSpanner.unfreeze(); + assertNull(closeResult.get()); + } finally { + executor.shutdown(); + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java index 8f71b1278f3..c6155f0cbb6 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java @@ -33,6 +33,7 @@ import com.google.api.gax.rpc.ServerStream; import com.google.api.gax.rpc.UnavailableException; import com.google.cloud.spanner.Options.RpcPriority; +import com.google.cloud.spanner.XGoogSpannerRequestId.NoopRequestIdCreator; import com.google.cloud.spanner.spi.v1.SpannerRpc; import com.google.common.base.Ticker; import com.google.common.collect.ImmutableList; @@ -96,11 +97,9 @@ public class PartitionedDmlTransactionTest { public void setup() { MockitoAnnotations.initMocks(this); when(session.getName()).thenReturn(sessionId); - when(session.getRequestIdCreator()) - .thenReturn(new XGoogSpannerRequestId.NoopRequestIdCreator()); + when(session.getRequestIdCreator()).thenReturn(NoopRequestIdCreator.INSTANCE); when(session.getOptions()).thenReturn(Collections.EMPTY_MAP); - when(session.getRequestIdCreator()) - .thenReturn(new XGoogSpannerRequestId.NoopRequestIdCreator()); + when(session.getRequestIdCreator()).thenReturn(NoopRequestIdCreator.INSTANCE); when(rpc.beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true))) .thenReturn(Transaction.newBuilder().setId(txId).build()); @@ -115,7 +114,7 @@ public void testExecuteStreamingPartitionedUpdate() { ServerStream stream = mock(ServerStream.class); when(stream.iterator()).thenReturn(ImmutableList.of(p1, p2).iterator()); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream); long count = tx.executeStreamingPartitionedUpdate(Statement.of(sql), Duration.ofMinutes(10)); @@ -124,7 +123,7 @@ public void testExecuteStreamingPartitionedUpdate() { verify(rpc).beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class)); } @Test @@ -135,7 +134,7 @@ public void testExecuteStreamingPartitionedUpdateWithUpdateOptions() { ServerStream stream = mock(ServerStream.class); when(stream.iterator()).thenReturn(ImmutableList.of(p1, p2).iterator()); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithRequestOptions), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithRequestOptions), anyMap(), any(), any(Duration.class))) .thenReturn(stream); long count = @@ -146,7 +145,7 @@ public void testExecuteStreamingPartitionedUpdateWithUpdateOptions() { verify(rpc).beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithRequestOptions), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithRequestOptions), anyMap(), any(), any(Duration.class)); } @Test @@ -166,7 +165,7 @@ public void testExecuteStreamingPartitionedUpdateAborted() { ServerStream stream2 = mock(ServerStream.class); when(stream2.iterator()).thenReturn(ImmutableList.of(p1, p2).iterator()); when(rpc.executeStreamingPartitionedDml( - any(ExecuteSqlRequest.class), anyMap(), any(Duration.class))) + any(ExecuteSqlRequest.class), anyMap(), any(), any(Duration.class))) .thenReturn(stream1, stream2); long count = tx.executeStreamingPartitionedUpdate(Statement.of(sql), Duration.ofMinutes(10)); @@ -175,7 +174,7 @@ public void testExecuteStreamingPartitionedUpdateAborted() { verify(rpc, times(2)).beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true)); verify(rpc, times(2)) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class)); } @Test @@ -195,10 +194,10 @@ public void testExecuteStreamingPartitionedUpdateUnavailable() { ServerStream stream2 = mock(ServerStream.class); when(stream2.iterator()).thenReturn(ImmutableList.of(p1, p2).iterator()); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream1); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream2); long count = tx.executeStreamingPartitionedUpdate(Statement.of(sql), Duration.ofMinutes(10)); @@ -207,10 +206,10 @@ public void testExecuteStreamingPartitionedUpdateUnavailable() { verify(rpc).beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithResumeToken), anyMap(), any(), any(Duration.class)); } @Test @@ -226,7 +225,7 @@ public void testExecuteStreamingPartitionedUpdateUnavailableAndThenDeadlineExcee "temporary unavailable", null, GrpcStatusCode.of(Code.UNAVAILABLE), true)); when(stream1.iterator()).thenReturn(iterator); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream1); when(ticker.read()).thenReturn(0L, 1L, TimeUnit.NANOSECONDS.convert(10L, TimeUnit.MINUTES)); @@ -238,7 +237,7 @@ public void testExecuteStreamingPartitionedUpdateUnavailableAndThenDeadlineExcee verify(rpc).beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class)); } @Test @@ -254,7 +253,7 @@ public void testExecuteStreamingPartitionedUpdateAbortedAndThenDeadlineExceeded( "transaction aborted", null, GrpcStatusCode.of(Code.ABORTED), true)); when(stream1.iterator()).thenReturn(iterator); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream1); when(ticker.read()).thenReturn(0L, 1L, TimeUnit.NANOSECONDS.convert(10L, TimeUnit.MINUTES)); @@ -266,7 +265,7 @@ public void testExecuteStreamingPartitionedUpdateAbortedAndThenDeadlineExceeded( verify(rpc, times(2)).beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class)); } @Test @@ -282,7 +281,7 @@ public void testExecuteStreamingPartitionedUpdateMultipleAbortsUntilDeadlineExce "transaction aborted", null, GrpcStatusCode.of(Code.ABORTED), true)); when(stream1.iterator()).thenReturn(iterator); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream1); when(ticker.read()) .thenAnswer( @@ -306,7 +305,7 @@ public Long answer(InvocationOnMock invocation) { // means that the execute method is only executed 9 times. verify(rpc, times(9)) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class)); } @Test @@ -329,10 +328,10 @@ public void testExecuteStreamingPartitionedUpdateUnexpectedEOS() { ServerStream stream2 = mock(ServerStream.class); when(stream2.iterator()).thenReturn(ImmutableList.of(p1, p2).iterator()); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream1); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream2); PartitionedDmlTransaction tx = new PartitionedDmlTransaction(session, rpc, ticker); @@ -342,10 +341,10 @@ public void testExecuteStreamingPartitionedUpdateUnexpectedEOS() { verify(rpc).beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithResumeToken), anyMap(), any(), any(Duration.class)); } @Test @@ -368,10 +367,10 @@ public void testExecuteStreamingPartitionedUpdateRSTstream() { ServerStream stream2 = mock(ServerStream.class); when(stream2.iterator()).thenReturn(ImmutableList.of(p1, p2).iterator()); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream1); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream2); PartitionedDmlTransaction tx = new PartitionedDmlTransaction(session, rpc, ticker); @@ -381,10 +380,10 @@ public void testExecuteStreamingPartitionedUpdateRSTstream() { verify(rpc).beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithResumeToken), anyMap(), any(), any(Duration.class)); } @Test @@ -400,7 +399,7 @@ public void testExecuteStreamingPartitionedUpdateGenericInternalException() { "INTERNAL: Error", null, GrpcStatusCode.of(Code.INTERNAL), false)); when(stream1.iterator()).thenReturn(iterator); when(rpc.executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class))) + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class))) .thenReturn(stream1); PartitionedDmlTransaction tx = new PartitionedDmlTransaction(session, rpc, ticker); @@ -412,7 +411,7 @@ public void testExecuteStreamingPartitionedUpdateGenericInternalException() { verify(rpc).beginTransaction(any(BeginTransactionRequest.class), anyMap(), eq(true)); verify(rpc) .executeStreamingPartitionedDml( - Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(Duration.class)); + Mockito.eq(executeRequestWithoutResumeToken), anyMap(), any(), any(Duration.class)); } @Test diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PgNumericTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PgNumericTest.java index a3266d0505c..40591d17fe8 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PgNumericTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PgNumericTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -84,7 +83,6 @@ public class PgNumericTest { @BeforeClass public static void beforeClass() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadAsyncTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadAsyncTest.java index 3704b118906..1251ee270fa 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadAsyncTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadAsyncTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.cloud.spanner.MockSpannerTestUtil.*; import static com.google.cloud.spanner.SpannerApiFutures.get; import static com.google.common.truth.Truth.assertThat; @@ -70,7 +69,6 @@ public class ReadAsyncTest { @BeforeClass public static void setup() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.putStatementResult( StatementResult.query(READ_ONE_KEY_VALUE_STATEMENT, READ_ONE_KEY_VALUE_RESULTSET)); @@ -231,9 +229,6 @@ public void closeTransactionBeforeEndOfAsyncQuery() throws Exception { ApiFuture closed; DatabaseClientImpl clientImpl = (DatabaseClientImpl) client; - // There should currently not be any sessions checked out of the pool. - assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(0); - final CountDownLatch dataReceived = new CountDownLatch(1); try (ReadOnlyTransaction tx = client.readOnlyTransaction()) { try (AsyncResultSet rs = @@ -264,22 +259,6 @@ public void closeTransactionBeforeEndOfAsyncQuery() throws Exception { // Wait until at least one row has been fetched. At that moment there should be one session // checked out. dataReceived.await(); - - if (isMultiplexedSessionsEnabled()) { - assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(0); - } else { - assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(1); - } - } - // The read-only transaction is now closed, but the ready callback will continue to receive - // data. As it tries to put the data into a synchronous queue and the underlying buffer can also - // only hold 1 row, the async result set has not yet finished. The read-only transaction will - // release the session back into the pool when all async statements have finished. The number of - // sessions in use is therefore still 1. - if (isMultiplexedSessionsEnabled()) { - assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(0); - } else { - assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(1); } List resultList = new ArrayList<>(); do { @@ -287,10 +266,7 @@ public void closeTransactionBeforeEndOfAsyncQuery() throws Exception { } while (!finished.isDone() || results.size() > 0); assertThat(finished.get()).isTrue(); assertThat(resultList).containsExactly("k1", "k2", "k3"); - // The session will be released back into the pool by the asynchronous result set when it has - // returned all rows. As this is done in the background, it could take a couple of milliseconds. closed.get(); - assertThat(clientImpl.pool.getNumberOfSessionsInUse()).isEqualTo(0); } @Test diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadFormatTestRunner.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadFormatTestRunner.java index 588ed64e884..ff26f774b4b 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadFormatTestRunner.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadFormatTestRunner.java @@ -51,7 +51,8 @@ public void onTransactionMetadata(Transaction transaction, boolean shouldInclude throws SpannerException {} @Override - public SpannerException onError(SpannerException e, boolean withBeginTransaction) { + public SpannerException onError( + SpannerException e, boolean withBeginTransaction, boolean lastStatement) { return e; } @@ -118,7 +119,9 @@ private static class TestCaseRunner { } private void run() throws Exception { - stream = new GrpcStreamIterator(10, /* cancelQueryWhenClientIsClosed= */ false); + stream = + new GrpcStreamIterator( + /* lastStatement= */ false, 10, /* cancelQueryWhenClientIsClosed= */ false); stream.setCall( new SpannerRpc.StreamingCall() { @Override diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadWriteTransactionWithInlineBeginTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadWriteTransactionWithInlineBeginTest.java index 3078cab0cbe..492252d486c 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadWriteTransactionWithInlineBeginTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ReadWriteTransactionWithInlineBeginTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThrows; @@ -102,7 +101,6 @@ public class ReadWriteTransactionWithInlineBeginTest { @BeforeClass public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RequestIdMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RequestIdMockServerTest.java new file mode 100644 index 00000000000..eac63010915 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RequestIdMockServerTest.java @@ -0,0 +1,725 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeTrue; + +import com.google.cloud.NoCredentials; +import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; +import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; +import com.google.cloud.spanner.connection.RandomResultSetGenerator; +import com.google.common.collect.ImmutableList; +import com.google.protobuf.ByteString; +import com.google.protobuf.ListValue; +import com.google.protobuf.Value; +import com.google.rpc.RetryInfo; +import com.google.spanner.v1.BeginTransactionRequest; +import com.google.spanner.v1.CommitRequest; +import com.google.spanner.v1.CreateSessionRequest; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.ReadRequest; +import com.google.spanner.v1.ResultSetMetadata; +import com.google.spanner.v1.ResultSetStats; +import com.google.spanner.v1.StructType; +import com.google.spanner.v1.StructType.Field; +import com.google.spanner.v1.Type; +import com.google.spanner.v1.TypeCode; +import io.grpc.Context; +import io.grpc.Contexts; +import io.grpc.ManagedChannelBuilder; +import io.grpc.Metadata; +import io.grpc.Server; +import io.grpc.ServerCall; +import io.grpc.ServerCallHandler; +import io.grpc.ServerInterceptor; +import io.grpc.Status; +import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder; +import io.grpc.protobuf.ProtoUtils; +import java.net.InetSocketAddress; +import java.util.List; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.TimeUnit; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.threeten.bp.Duration; + +@SuppressWarnings({"StatementWithEmptyBody", "resource"}) +@RunWith(JUnit4.class) +public class RequestIdMockServerTest { + private static MockSpannerServiceImpl mockSpanner; + private static Server server; + private static Spanner spanner; + + private static final Statement SELECT1 = Statement.of("SELECT 1"); + private static final com.google.spanner.v1.ResultSet SELECT1_RESULT_SET = + com.google.spanner.v1.ResultSet.newBuilder() + .setMetadata( + ResultSetMetadata.newBuilder() + .setRowType( + StructType.newBuilder() + .addFields( + Field.newBuilder() + .setName("c") + .setType(Type.newBuilder().setCode(TypeCode.INT64).build()) + .build()) + .build()) + .build()) + .addRows( + ListValue.newBuilder() + .addValues(Value.newBuilder().setStringValue("1").build()) + .build()) + .build(); + private static final Statement DML = Statement.of("insert into test_table (id) values (1)"); + + private static final ConcurrentLinkedQueue requestIds = + new ConcurrentLinkedQueue<>(); + + @BeforeClass + public static void setup() throws Exception { + assumeTrue(System.getenv("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS") == null); + assumeTrue(System.getenv("GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW") == null); + + mockSpanner = new MockSpannerServiceImpl(); + mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. + + InetSocketAddress address = new InetSocketAddress("localhost", 0); + server = + NettyServerBuilder.forAddress(address) + .addService(mockSpanner) + .intercept( + new ServerInterceptor() { + @Override + public ServerCall.Listener interceptCall( + ServerCall call, + Metadata headers, + ServerCallHandler next) { + try { + String requestId = headers.get(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY); + if (requestId != null) { + requestIds.add(XGoogSpannerRequestId.of(requestId)); + } else { + requestIds.add(XGoogSpannerRequestId.of(0, 0, 0, 0)); + } + } catch (Throwable t) { + // Ignore and continue + } + return Contexts.interceptCall(Context.current(), call, headers, next); + } + }) + .build() + .start(); + spanner = createSpanner(); + + setupResults(); + } + + private static Spanner createSpanner() { + return SpannerOptions.newBuilder() + .setProjectId("test-project") + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setHost("http://localhost:" + server.getPort()) + .setCredentials(NoCredentials.getInstance()) + .setSessionPoolOption( + SessionPoolOptions.newBuilder() + .setFailOnSessionLeak() + .setMinSessions(0) + .setSkipVerifyingBeginTransactionForMuxRW(true) + .setWaitForMinSessions(Duration.ofSeconds(5)) + .build()) + .build() + .getService(); + } + + private static void setupResults() { + mockSpanner.putStatementResult(StatementResult.query(SELECT1, SELECT1_RESULT_SET)); + mockSpanner.putStatementResult(StatementResult.update(DML, 1L)); + } + + static Metadata createMinimalRetryInfo() { + Metadata trailers = new Metadata(); + RetryInfo retryInfo = + RetryInfo.newBuilder() + .setRetryDelay( + com.google.protobuf.Duration.newBuilder() + .setNanos((int) TimeUnit.MILLISECONDS.toNanos(1L)) + .setSeconds(0L)) + .build(); + trailers.put(ProtoUtils.keyForProto(RetryInfo.getDefaultInstance()), retryInfo); + return trailers; + } + + @AfterClass + public static void teardown() throws InterruptedException { + if (spanner != null) { + spanner.close(); + } + if (server != null) { + server.shutdown(); + server.awaitTermination(); + } + } + + @Before + public void prepareTest() { + // Call getClient() to make sure the multiplexed session has been created. + // Then clear all requests that were received as part of that so we don't need to include + // that in the test verifications. + getClient(); + mockSpanner.reset(); + requestIds.clear(); + ((SpannerImpl) spanner).resetRequestIdCounters(); + } + + private DatabaseClient getClient() { + return spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); + } + + private long getClientId() { + return ((SpannerImpl) spanner).getRequestIdClientId(); + } + + @Test + public void testSingleUseQuery() { + try (ResultSet resultSet = getClient().singleUse().executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + + assertEquals(ImmutableList.of(ExecuteSqlRequest.class), mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds(ImmutableList.of(XGoogSpannerRequestId.of(getClientId(), -1, 1, 1)), actual); + } + + @Test + public void testQueryError() { + Statement query = Statement.of("select * from invalid_table"); + mockSpanner.putStatementResult( + StatementResult.exception( + query, Status.NOT_FOUND.withDescription("Table not found").asRuntimeException())); + + XGoogSpannerRequestId requestIdFromException; + try (ResultSet resultSet = getClient().singleUse().executeQuery(query)) { + SpannerException exception = assertThrows(SpannerException.class, resultSet::next); + assertEquals(ErrorCode.NOT_FOUND, exception.getErrorCode()); + assertNotNull(exception.getRequestId()); + assertNotEquals("Request ID should not be empty", "", exception.getRequestId()); + requestIdFromException = XGoogSpannerRequestId.of(exception.getRequestId()); + } + + assertEquals(ImmutableList.of(ExecuteSqlRequest.class), mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds(ImmutableList.of(XGoogSpannerRequestId.of(getClientId(), -1, 1, 1)), actual); + assertEquals(actual.get(0), requestIdFromException); + } + + @Test + public void testMultiUseReadOnlyTransaction() { + try (ReadOnlyTransaction transaction = getClient().readOnlyTransaction()) { + for (int i = 0; i < 2; i++) { + try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + } + } + + assertEquals( + ImmutableList.of( + BeginTransactionRequest.class, ExecuteSqlRequest.class, ExecuteSqlRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 3, 1)), + actual); + verifySameChannelId(actual); + } + + @Test + public void testDml() { + getClient().readWriteTransaction().run(transaction -> transaction.executeUpdate(DML)); + + assertEquals( + ImmutableList.of(ExecuteSqlRequest.class, CommitRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 1)), + actual); + verifySameChannelId(actual); + } + + @Test + public void testDmlError() { + Statement invalidDml = Statement.of("insert into invalid_table (id) values (1)"); + mockSpanner.putStatementResult( + StatementResult.exception( + invalidDml, Status.NOT_FOUND.withDescription("Table not found").asRuntimeException())); + + SpannerException exception = + assertThrows( + SpannerException.class, + () -> + getClient() + .readWriteTransaction() + .run(transaction -> transaction.executeUpdate(invalidDml))); + assertEquals(ErrorCode.NOT_FOUND, exception.getErrorCode()); + assertNotNull(exception.getRequestId()); + assertNotEquals("Request ID should not be empty", "", exception.getRequestId()); + XGoogSpannerRequestId requestIdFromException = + XGoogSpannerRequestId.of(exception.getRequestId()); + + assertEquals(ImmutableList.of(ExecuteSqlRequest.class), mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds(ImmutableList.of(XGoogSpannerRequestId.of(getClientId(), -1, 1, 1)), actual); + assertEquals(actual.get(0), requestIdFromException); + } + + @Test + public void testAbortedTransaction() { + mockSpanner.setCommitExecutionTime( + SimulatedExecutionTime.ofException( + Status.ABORTED.asRuntimeException(createMinimalRetryInfo()))); + getClient() + .readWriteTransaction() + .run( + transaction -> { + try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + return transaction.executeUpdate(DML); + }); + + assertEquals( + ImmutableList.of( + ExecuteSqlRequest.class, + ExecuteSqlRequest.class, + CommitRequest.class, + ExecuteSqlRequest.class, + ExecuteSqlRequest.class, + CommitRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + int requestId = 0; + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1)), + actual); + verifySameChannelId(actual.subList(0, 3)); + verifySameChannelId(actual.subList(3, 6)); + } + + @Test + public void testMix() { + getClient() + .readWriteTransaction() + .run( + transaction -> { + try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + return transaction.executeUpdate(DML); + }); + try (ReadOnlyTransaction transaction = getClient().readOnlyTransaction()) { + for (int i = 0; i < 2; i++) { + try (ResultSet resultSet = transaction.executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + } + } + try (ResultSet resultSet = getClient().singleUse().executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + mockSpanner.putStatementResult( + StatementResult.query( + Statement.of("SELECT my_column FROM my_table WHERE 1=1"), SELECT1_RESULT_SET)); + try (ResultSet resultSet = + getClient().singleUse().read("my_table", KeySet.all(), ImmutableList.of("my_column"))) { + while (resultSet.next()) {} + } + + assertEquals( + ImmutableList.of( + ExecuteSqlRequest.class, + ExecuteSqlRequest.class, + CommitRequest.class, + BeginTransactionRequest.class, + ExecuteSqlRequest.class, + ExecuteSqlRequest.class, + ExecuteSqlRequest.class, + ReadRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + int requestId = 0; + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1), + XGoogSpannerRequestId.of(getClientId(), -1, ++requestId, 1)), + actual); + verifySameChannelId(actual.subList(0, 3)); + verifySameChannelId(actual.subList(3, 6)); + } + + @Test + public void testUnaryUnavailable() { + mockSpanner.setExecuteSqlExecutionTime( + SimulatedExecutionTime.ofException( + Status.UNAVAILABLE.asRuntimeException(createMinimalRetryInfo()))); + + getClient().readWriteTransaction().run(transaction -> transaction.executeUpdate(DML)); + + assertEquals( + ImmutableList.of(ExecuteSqlRequest.class, ExecuteSqlRequest.class, CommitRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 1, 2), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 1)), + actual); + verifySameChannelId(actual); + } + + @Test + public void testStreamingQueryUnavailable() { + mockSpanner.setExecuteStreamingSqlExecutionTime( + SimulatedExecutionTime.ofException( + Status.UNAVAILABLE.asRuntimeException(createMinimalRetryInfo()))); + + try (ResultSet resultSet = getClient().singleUse().executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + + assertEquals( + ImmutableList.of(ExecuteSqlRequest.class, ExecuteSqlRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 1, 2)), + actual); + } + + @Test + public void testStreamingQueryUnavailableHalfway() { + int numRows = 5; + Statement statement = Statement.of("select * from random"); + mockSpanner.putStatementResult( + StatementResult.query(statement, new RandomResultSetGenerator(numRows).generate())); + mockSpanner.setExecuteStreamingSqlExecutionTime( + SimulatedExecutionTime.ofStreamException( + Status.UNAVAILABLE.asRuntimeException(createMinimalRetryInfo()), 2)); + + try (ResultSet resultSet = getClient().singleUse().executeQuery(statement)) { + while (resultSet.next()) {} + } + + assertEquals( + ImmutableList.of(ExecuteSqlRequest.class, ExecuteSqlRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 1, 2)), + actual); + List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); + assertEquals(ByteString.empty(), requests.get(0).getResumeToken()); + assertNotEquals(ByteString.empty(), requests.get(1).getResumeToken()); + } + + @Test + public void testStreamingReadUnavailable() { + mockSpanner.setStreamingReadExecutionTime( + SimulatedExecutionTime.ofException( + Status.UNAVAILABLE.asRuntimeException(createMinimalRetryInfo()))); + + mockSpanner.putStatementResult( + StatementResult.query( + Statement.of("SELECT my_column FROM my_table WHERE 1=1"), SELECT1_RESULT_SET)); + try (ResultSet resultSet = + getClient().singleUse().read("my_table", KeySet.all(), ImmutableList.of("my_column"))) { + while (resultSet.next()) {} + } + + assertEquals( + ImmutableList.of(ReadRequest.class, ReadRequest.class), mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 1, 2)), + actual); + } + + @Test + public void testStreamingReadUnavailableHalfway() { + int numRows = 5; + Statement statement = Statement.of("SELECT my_column FROM my_table WHERE 1=1"); + mockSpanner.putStatementResult( + StatementResult.query(statement, new RandomResultSetGenerator(numRows).generate())); + mockSpanner.setStreamingReadExecutionTime( + SimulatedExecutionTime.ofStreamException( + Status.UNAVAILABLE.asRuntimeException(createMinimalRetryInfo()), 2)); + + try (ResultSet resultSet = + getClient().singleUse().read("my_table", KeySet.all(), ImmutableList.of("my_column"))) { + while (resultSet.next()) {} + } + + assertEquals( + ImmutableList.of(ReadRequest.class, ReadRequest.class), mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 1, 2)), + actual); + List requests = mockSpanner.getRequestsOfType(ReadRequest.class); + assertEquals(ByteString.empty(), requests.get(0).getResumeToken()); + assertNotEquals(ByteString.empty(), requests.get(1).getResumeToken()); + } + + @Test + public void testPartitionedDml() { + getClient().executePartitionedUpdate(DML); + + assertEquals( + ImmutableList.of(BeginTransactionRequest.class, ExecuteSqlRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 1)), + actual); + verifySameChannelId(actual); + } + + @Test + public void testPartitionedDmlError() { + Statement invalidDml = Statement.of("update invalid_table set col=true where col=false"); + mockSpanner.putStatementResult( + StatementResult.exception( + invalidDml, Status.NOT_FOUND.withDescription("Table not found").asRuntimeException())); + + SpannerException exception = + assertThrows( + SpannerException.class, () -> getClient().executePartitionedUpdate(invalidDml)); + assertEquals(ErrorCode.NOT_FOUND, exception.getErrorCode()); + assertNotNull(exception.getRequestId()); + assertNotEquals("", exception.getRequestId()); + + assertEquals( + ImmutableList.of(BeginTransactionRequest.class, ExecuteSqlRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 1)), + actual); + verifySameChannelId(actual); + assertEquals(XGoogSpannerRequestId.of(exception.getRequestId()), actual.get(1)); + } + + @Test + public void testPartitionedDmlAborted() { + mockSpanner.setExecuteStreamingSqlExecutionTime( + SimulatedExecutionTime.ofException( + Status.ABORTED.asRuntimeException(createMinimalRetryInfo()))); + + getClient().executePartitionedUpdate(DML); + + assertEquals( + ImmutableList.of( + BeginTransactionRequest.class, + ExecuteSqlRequest.class, + BeginTransactionRequest.class, + ExecuteSqlRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 3, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 4, 1)), + actual); + verifySameChannelId(actual); + } + + @Test + public void testPartitionedDmlUnavailable() { + mockSpanner.setExecuteStreamingSqlExecutionTime( + SimulatedExecutionTime.ofException( + Status.UNAVAILABLE.asRuntimeException(createMinimalRetryInfo()))); + + getClient().executePartitionedUpdate(DML); + + assertEquals( + ImmutableList.of( + BeginTransactionRequest.class, + ExecuteSqlRequest.class, + BeginTransactionRequest.class, + ExecuteSqlRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 3, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 4, 1)), + actual); + verifySameChannelId(actual); + } + + @Test + public void testPartitionedDmlUnavailableWithResumeToken() { + Statement update = Statement.of("UPDATE my_table SET active=true where 1=1"); + mockSpanner.putStatementResult( + StatementResult.query( + update, + com.google.spanner.v1.ResultSet.newBuilder() + .setMetadata( + ResultSetMetadata.newBuilder() + .setRowType(StructType.newBuilder().build()) + .build()) + .addRows(ListValue.newBuilder().build()) + .addRows(ListValue.newBuilder().build()) + .addRows(ListValue.newBuilder().build()) + .setStats(ResultSetStats.newBuilder().setRowCountLowerBound(100L).build()) + .build())); + mockSpanner.setExecuteStreamingSqlExecutionTime( + SimulatedExecutionTime.ofStreamException( + Status.UNAVAILABLE.asRuntimeException(createMinimalRetryInfo()), 2L)); + + getClient().executePartitionedUpdate(update); + + assertEquals( + ImmutableList.of( + BeginTransactionRequest.class, ExecuteSqlRequest.class, ExecuteSqlRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 2)), + actual); + verifySameChannelId(actual); + } + + @Test + public void testOtherClientId() { + // Execute a query with the default client from this test class. + try (ResultSet resultSet = getClient().singleUse().executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + // Create a new client and use that to execute a query. This should use a different client ID. + long otherClientId; + try (Spanner spanner = createSpanner()) { + otherClientId = ((SpannerImpl) spanner).getRequestIdClientId(); + DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); + try (ResultSet resultSet = client.singleUse().executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + } + // Execute another query with the default client. This should use the original client ID. + try (ResultSet resultSet = getClient().singleUse().executeQuery(SELECT1)) { + while (resultSet.next()) {} + } + assertEquals( + ImmutableList.of( + ExecuteSqlRequest.class, + CreateSessionRequest.class, + ExecuteSqlRequest.class, + ExecuteSqlRequest.class), + mockSpanner.getRequestTypes()); + List actual = ImmutableList.copyOf(requestIds); + verifyRequestIds( + ImmutableList.of( + XGoogSpannerRequestId.of(getClientId(), -1, 1, 1), + // The CreateSession RPC from the initialization of the second client is included in + // the requests that we see. This request does not include a channel hint, hence the + // zero value for the channel number in the request ID. + XGoogSpannerRequestId.of(otherClientId, 0, 1, 1), + XGoogSpannerRequestId.of(otherClientId, -1, 2, 1), + XGoogSpannerRequestId.of(getClientId(), -1, 2, 1)), + actual); + } + + private void verifyRequestIds( + List expectedIds, List actualIds) { + assertEquals(message(expectedIds, actualIds), expectedIds.size(), actualIds.size()); + int i = 0; + for (XGoogSpannerRequestId actual : actualIds) { + XGoogSpannerRequestId expected = expectedIds.get(i); + if (expected.getNthChannelId() > -1) { + assertEquals(expected, actual); + } else { + assertTrue(message(expectedIds, actualIds), equalsIgnoringChannelId(expected, actual)); + assertTrue(message(expectedIds, actualIds), actual.hasChannelId()); + } + i++; + } + } + + private void verifySameChannelId(List requestIds) { + for (int i = 0; i < requestIds.size() - 1; i++) { + XGoogSpannerRequestId requestId = requestIds.get(i); + assertTrue(requestId.hasChannelId()); + assertEquals(requestId.getNthChannelId(), requestIds.get(i + 1).getNthChannelId()); + } + } + + private boolean equalsIgnoringChannelId( + XGoogSpannerRequestId expected, XGoogSpannerRequestId actual) { + return expected.getNthClientId() == actual.getNthClientId() + && expected.getNthRequest() == actual.getNthRequest() + && expected.getAttempt() == actual.getAttempt(); + } + + private String message(List expected, List actual) { + return String.format("\n Got: %s\nWant: %s", actual, expected); + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResultSetsHelper.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResultSetsHelper.java index 404973336ba..4ab506f73bb 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResultSetsHelper.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResultSetsHelper.java @@ -47,6 +47,11 @@ public boolean isWithBeginTransaction() { return false; } + @Override + public boolean isLastStatement() { + return false; + } + @Override public boolean hasNext() { return first || iterator.hasNext(); @@ -77,7 +82,8 @@ public void onTransactionMetadata(Transaction transaction, boolean shouldInclude throws SpannerException {} @Override - public SpannerException onError(SpannerException e, boolean withBeginTransaction) { + public SpannerException onError( + SpannerException e, boolean withBeginTransaction, boolean isLastStatement) { return e; } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResumableStreamIteratorTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResumableStreamIteratorTest.java index 5588b47866f..f13c0bb1237 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResumableStreamIteratorTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResumableStreamIteratorTest.java @@ -25,6 +25,7 @@ import com.google.api.client.util.BackOff; import com.google.cloud.spanner.ErrorHandler.DefaultErrorHandler; +import com.google.cloud.spanner.XGoogSpannerRequestId.NoopRequestIdCreator; import com.google.cloud.spanner.v1.stub.SpannerStubSettings; import com.google.common.collect.AbstractIterator; import com.google.common.collect.ImmutableList; @@ -140,6 +141,11 @@ public void close(@Nullable String message) { public boolean isWithBeginTransaction() { return false; } + + @Override + public boolean isLastStatement() { + return false; + } } Starter starter = Mockito.mock(Starter.class); @@ -163,11 +169,12 @@ private void initWithLimit(int maxBufferSize) { DefaultErrorHandler.INSTANCE, SpannerStubSettings.newBuilder().executeStreamingSqlSettings().getRetrySettings(), SpannerStubSettings.newBuilder().executeStreamingSqlSettings().getRetryableCodes(), - new XGoogSpannerRequestId.NoopRequestIdCreator()) { + NoopRequestIdCreator.INSTANCE) { @Override AbstractResultSet.CloseableIterator startStream( @Nullable ByteString resumeToken, - AsyncResultSet.StreamMessageListener streamMessageListener) { + AsyncResultSet.StreamMessageListener streamMessageListener, + XGoogSpannerRequestId requestId) { return starter.startStream(resumeToken, null); } }; diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnDifferentGrpcChannelMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnDifferentGrpcChannelMockServerTest.java index e7ef9955d4f..5f722759229 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnDifferentGrpcChannelMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnDifferentGrpcChannelMockServerTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static io.grpc.Grpc.TRANSPORT_ATTR_REMOTE_ADDR; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; @@ -24,25 +23,24 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeFalse; +import com.google.api.gax.grpc.GrpcInterceptorProvider; import com.google.cloud.NoCredentials; +import com.google.cloud.grpc.GcpManagedChannel; import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; import com.google.cloud.spanner.connection.AbstractMockServerTest; -import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableList; import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.ExecuteSqlRequest; -import io.grpc.Attributes; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; import io.grpc.Context; import io.grpc.Deadline; import io.grpc.ManagedChannelBuilder; -import io.grpc.Metadata; -import io.grpc.ServerCall; -import io.grpc.ServerCall.Listener; -import io.grpc.ServerCallHandler; -import io.grpc.ServerInterceptor; +import io.grpc.MethodDescriptor; import io.grpc.Status; -import java.io.IOException; -import java.net.InetSocketAddress; import java.time.Duration; import java.util.HashMap; import java.util.HashSet; @@ -63,12 +61,14 @@ @RunWith(JUnit4.class) public class RetryOnDifferentGrpcChannelMockServerTest extends AbstractMockServerTest { - private static final Map> SERVER_ADDRESSES = new HashMap<>(); + /** Tracks the logical affinity keys before grpc-gcp routes the request. */ + private static final Map> LOGICAL_AFFINITY_KEYS = new HashMap<>(); @BeforeClass - public static void startStaticServer() throws IOException { + public static void setupAndStartServer() throws Exception { System.setProperty("spanner.retry_deadline_exceeded_on_different_channel", "true"); - startStaticServer(createServerInterceptor()); + // Call the parent's startStaticServer to set up the mock server + AbstractMockServerTest.startStaticServer(); } @AfterClass @@ -78,40 +78,36 @@ public static void removeSystemProperty() { @After public void clearRequests() { - SERVER_ADDRESSES.clear(); + LOGICAL_AFFINITY_KEYS.clear(); mockSpanner.clearRequests(); mockSpanner.removeAllExecutionTimes(); } - static ServerInterceptor createServerInterceptor() { - return new ServerInterceptor() { - @Override - public Listener interceptCall( - ServerCall serverCall, - Metadata metadata, - ServerCallHandler serverCallHandler) { - Attributes attributes = serverCall.getAttributes(); - //noinspection unchecked,deprecation - Attributes.Key key = - (Attributes.Key) - attributes.keys().stream() - .filter(k -> k.equals(TRANSPORT_ATTR_REMOTE_ADDR)) - .findFirst() - .orElse(null); - if (key != null) { - InetSocketAddress address = attributes.get(key); - synchronized (SERVER_ADDRESSES) { - Set addresses = - SERVER_ADDRESSES.getOrDefault( - serverCall.getMethodDescriptor().getFullMethodName(), new HashSet<>()); - addresses.add(address); - SERVER_ADDRESSES.putIfAbsent( - serverCall.getMethodDescriptor().getFullMethodName(), addresses); - } - } - return serverCallHandler.startCall(serverCall, metadata); - } - }; + /** + * Creates a client interceptor that captures the logical affinity key before grpc-gcp routes the + * request. This allows us to verify that retry logic uses distinct logical channel hints, even + * when DCP maps them to fewer physical channels. + */ + static GrpcInterceptorProvider createAffinityKeyInterceptorProvider() { + return () -> + ImmutableList.of( + new ClientInterceptor() { + @Override + public ClientCall interceptCall( + MethodDescriptor method, CallOptions callOptions, Channel next) { + // Capture the AFFINITY_KEY before grpc-gcp processes it + String affinityKey = callOptions.getOption(GcpManagedChannel.AFFINITY_KEY); + if (affinityKey != null) { + String methodName = method.getFullMethodName(); + synchronized (LOGICAL_AFFINITY_KEYS) { + Set keys = + LOGICAL_AFFINITY_KEYS.computeIfAbsent(methodName, k -> new HashSet<>()); + keys.add(affinityKey); + } + } + return next.newCall(method, callOptions); + } + }); } SpannerOptions.Builder createSpannerOptionsBuilder() { @@ -119,7 +115,8 @@ SpannerOptions.Builder createSpannerOptionsBuilder() { .setProjectId("my-project") .setHost(String.format("http://localhost:%d", getPort())) .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) - .setCredentials(NoCredentials.getInstance()); + .setCredentials(NoCredentials.getInstance()) + .setInterceptorProvider(createAffinityKeyInterceptorProvider()); } @Test @@ -155,10 +152,11 @@ public void testReadWriteTransaction_retriesOnNewChannel() { List requests = mockSpanner.getRequestsOfType(BeginTransactionRequest.class); assertNotEquals(requests.get(0).getSession(), requests.get(1).getSession()); + // Verify that the retry used 2 distinct logical affinity keys (before grpc-gcp routing). assertEquals( 2, - SERVER_ADDRESSES - .getOrDefault("google.spanner.v1.Spanner/BeginTransaction", ImmutableSet.of()) + LOGICAL_AFFINITY_KEYS + .getOrDefault("google.spanner.v1.Spanner/BeginTransaction", new HashSet<>()) .size()); } @@ -199,10 +197,12 @@ public void testReadWriteTransaction_stopsRetrying() { Set sessions = requests.stream().map(BeginTransactionRequest::getSession).collect(Collectors.toSet()); assertEquals(numChannels, sessions.size()); + // Verify that the retry logic used distinct logical affinity keys (before grpc-gcp routing). + // This confirms each retry attempt targeted a different logical channel. assertEquals( numChannels, - SERVER_ADDRESSES - .getOrDefault("google.spanner.v1.Spanner/BeginTransaction", ImmutableSet.of()) + LOGICAL_AFFINITY_KEYS + .getOrDefault("google.spanner.v1.Spanner/BeginTransaction", new HashSet<>()) .size()); } } @@ -273,10 +273,12 @@ public void testDenyListedChannelIsCleared() { // of the first transaction. That fails, the session is deny-listed, the transaction is // retried on yet another session and succeeds. assertEquals(numChannels + 1, sessions.size()); + // Verify that the retry logic used distinct logical affinity keys (before grpc-gcp routing). + // This confirms each retry attempt targeted a different logical channel. assertEquals( numChannels, - SERVER_ADDRESSES - .getOrDefault("google.spanner.v1.Spanner/BeginTransaction", ImmutableSet.of()) + LOGICAL_AFFINITY_KEYS + .getOrDefault("google.spanner.v1.Spanner/BeginTransaction", new HashSet<>()) .size()); assertEquals(numChannels, mockSpanner.countRequestsOfType(BatchCreateSessionsRequest.class)); } @@ -303,11 +305,11 @@ public void testSingleUseQuery_retriesOnNewChannel() { List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); // The requests use the same multiplexed session. assertEquals(requests.get(0).getSession(), requests.get(1).getSession()); - // The requests use two different gRPC channels. + // Verify that the retry used 2 distinct logical affinity keys (before grpc-gcp routing). assertEquals( 2, - SERVER_ADDRESSES - .getOrDefault("google.spanner.v1.Spanner/ExecuteStreamingSql", ImmutableSet.of()) + LOGICAL_AFFINITY_KEYS + .getOrDefault("google.spanner.v1.Spanner/ExecuteStreamingSql", new HashSet<>()) .size()); } @@ -327,19 +329,21 @@ public void testSingleUseQuery_stopsRetrying() { assertEquals(ErrorCode.DEADLINE_EXCEEDED, exception.getErrorCode()); } int numChannels = spanner.getOptions().getNumChannels(); - assertEquals(numChannels, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); List requests = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class); // The requests use the same multiplexed session. String session = requests.get(0).getSession(); for (ExecuteSqlRequest request : requests) { assertEquals(session, request.getSession()); } - // The requests use all gRPC channels. - assertEquals( - numChannels, - SERVER_ADDRESSES - .getOrDefault("google.spanner.v1.Spanner/ExecuteStreamingSql", ImmutableSet.of()) - .size()); + // Verify that the retry mechanism is working (made numChannels requests). + int totalRequests = mockSpanner.countRequestsOfType(ExecuteSqlRequest.class); + assertEquals(numChannels, totalRequests); + // Verify each attempt used a distinct logical affinity key (before grpc-gcp routing). + int distinctLogicalKeys = + LOGICAL_AFFINITY_KEYS + .getOrDefault("google.spanner.v1.Spanner/ExecuteStreamingSql", new HashSet<>()) + .size(); + assertEquals(totalRequests, distinctLogicalKeys); } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java deleted file mode 100644 index 6a0f16c02b1..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java +++ /dev/null @@ -1,1797 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; -import static com.google.cloud.spanner.SpannerApiFutures.get; -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; -import static org.junit.Assert.fail; -import static org.junit.Assume.assumeFalse; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.cloud.NoCredentials; -import com.google.cloud.spanner.AsyncResultSet.CallbackResponse; -import com.google.cloud.spanner.AsyncTransactionManager.AsyncTransactionStep; -import com.google.cloud.spanner.AsyncTransactionManager.CommitTimestampFuture; -import com.google.cloud.spanner.AsyncTransactionManager.TransactionContextFuture; -import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; -import com.google.cloud.spanner.v1.SpannerClient; -import com.google.cloud.spanner.v1.SpannerClient.ListSessionsPagedResponse; -import com.google.cloud.spanner.v1.SpannerSettings; -import com.google.common.base.Function; -import com.google.common.base.Stopwatch; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.protobuf.ListValue; -import com.google.spanner.v1.ResultSetMetadata; -import com.google.spanner.v1.StructType; -import com.google.spanner.v1.StructType.Field; -import com.google.spanner.v1.TypeCode; -import io.grpc.Server; -import io.grpc.inprocess.InProcessServerBuilder; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; -import java.util.function.Supplier; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameter; -import org.junit.runners.Parameterized.Parameters; - -@RunWith(Parameterized.class) -public class RetryOnInvalidatedSessionTest { - private static final class ToLongTransformer implements Function { - @Override - public Long apply(StructReader input) { - return input.getLong(0); - } - } - - private static final ToLongTransformer TO_LONG = new ToLongTransformer(); - - @Parameter(0) - public boolean failOnInvalidatedSession; - - @Parameters(name = "fail on invalidated session = {0}") - public static Collection data() { - List params = new ArrayList<>(); - params.add(new Object[] {false}); - params.add(new Object[] {true}); - return params; - } - - private static final ResultSetMetadata READ_METADATA = - ResultSetMetadata.newBuilder() - .setRowType( - StructType.newBuilder() - .addFields( - Field.newBuilder() - .setName("BAR") - .setType( - com.google.spanner.v1.Type.newBuilder() - .setCode(TypeCode.INT64) - .build()) - .build()) - .build()) - .build(); - private static final com.google.spanner.v1.ResultSet READ_RESULTSET = - com.google.spanner.v1.ResultSet.newBuilder() - .addRows( - ListValue.newBuilder() - .addValues(com.google.protobuf.Value.newBuilder().setStringValue("1").build()) - .build()) - .addRows( - ListValue.newBuilder() - .addValues(com.google.protobuf.Value.newBuilder().setStringValue("2").build()) - .build()) - .setMetadata(READ_METADATA) - .build(); - private static final com.google.spanner.v1.ResultSet READ_ROW_RESULTSET = - com.google.spanner.v1.ResultSet.newBuilder() - .addRows( - ListValue.newBuilder() - .addValues(com.google.protobuf.Value.newBuilder().setStringValue("1").build()) - .build()) - .setMetadata(READ_METADATA) - .build(); - private static final Statement SELECT1AND2 = - Statement.of("SELECT 1 AS COL1 UNION ALL SELECT 2 AS COL1"); - private static final ResultSetMetadata SELECT1AND2_METADATA = - ResultSetMetadata.newBuilder() - .setRowType( - StructType.newBuilder() - .addFields( - Field.newBuilder() - .setName("COL1") - .setType( - com.google.spanner.v1.Type.newBuilder() - .setCode(TypeCode.INT64) - .build()) - .build()) - .build()) - .build(); - private static final com.google.spanner.v1.ResultSet SELECT1_RESULTSET = - com.google.spanner.v1.ResultSet.newBuilder() - .addRows( - ListValue.newBuilder() - .addValues(com.google.protobuf.Value.newBuilder().setStringValue("1").build()) - .build()) - .addRows( - ListValue.newBuilder() - .addValues(com.google.protobuf.Value.newBuilder().setStringValue("2").build()) - .build()) - .setMetadata(SELECT1AND2_METADATA) - .build(); - private static final Statement UPDATE_STATEMENT = - Statement.of("UPDATE FOO SET BAR=1 WHERE BAZ=2"); - private static final long UPDATE_COUNT = 1L; - private static MockSpannerServiceImpl mockSpanner; - private static Server server; - private static LocalChannelProvider channelProvider; - private static SpannerClient spannerClient; - private static Spanner spanner; - private static DatabaseClient client; - private static ExecutorService executor; - - @BeforeClass - public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); - mockSpanner = new MockSpannerServiceImpl(); - mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. - mockSpanner.putStatementResult( - StatementResult.read( - "FOO", KeySet.all(), Collections.singletonList("BAR"), READ_RESULTSET)); - mockSpanner.putStatementResult( - StatementResult.read( - "FOO", - KeySet.singleKey(Key.of()), - Collections.singletonList("BAR"), - READ_ROW_RESULTSET)); - mockSpanner.putStatementResult(StatementResult.query(SELECT1AND2, SELECT1_RESULTSET)); - mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT)); - - String uniqueName = InProcessServerBuilder.generateName(); - server = - InProcessServerBuilder.forName(uniqueName) - .directExecutor() - .addService(mockSpanner) - .build() - .start(); - channelProvider = LocalChannelProvider.create(uniqueName); - - SpannerSettings settings = - SpannerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - spannerClient = SpannerClient.create(settings); - executor = Executors.newSingleThreadExecutor(); - } - - @AfterClass - public static void stopServer() throws InterruptedException { - spannerClient.close(); - server.shutdown(); - server.awaitTermination(); - executor.shutdown(); - } - - @Before - public void setUp() throws InterruptedException { - mockSpanner.reset(); - if (spanner == null - || spanner.getOptions().getSessionPoolOptions().isFailIfSessionNotFound() - != failOnInvalidatedSession) { - if (spanner != null) { - spanner.close(); - } - SessionPoolOptions.Builder builder = SessionPoolOptions.newBuilder().setFailOnSessionLeak(); - if (failOnInvalidatedSession) { - builder.setFailIfSessionNotFound(); - } - // This prevents repeated retries for a large number of sessions in the pool. - builder.setMinSessions(1); - SessionPoolOptions sessionPoolOptions = builder.build(); - spanner = - SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setSessionPoolOption(sessionPoolOptions) - .setCredentials(NoCredentials.getInstance()) - .build() - .getService(); - client = spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - } - invalidateSessionPool(client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - - private static void invalidateSessionPool(DatabaseClient client, int minSessions) - throws InterruptedException { - // Wait for all sessions to have been created, and then delete them. - Stopwatch watch = Stopwatch.createStarted(); - while (((DatabaseClientImpl) client).pool.totalSessions() < minSessions) { - if (watch.elapsed(TimeUnit.SECONDS) > 5L) { - fail(String.format("Failed to create MinSessions=%d", minSessions)); - } - Thread.sleep(1L); - } - - ListSessionsPagedResponse response = - spannerClient.listSessions("projects/[PROJECT]/instances/[INSTANCE]/databases/[DATABASE]"); - for (com.google.spanner.v1.Session session : response.iterateAll()) { - spannerClient.deleteSession(session.getName()); - } - } - - private T assertThrowsSessionNotFoundIfShouldFail(Supplier supplier) { - if (failOnInvalidatedSession) { - assertThrows(SessionNotFoundException.class, () -> supplier.get()); - return null; - } else { - return supplier.get(); - } - } - - @Test - public void singleUseSelect() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - // This call will receive an invalidated session that will be replaced on the first call to - // rs.next(). - try (ReadContext context = client.singleUse()) { - try (ResultSet rs = context.executeQuery(SELECT1AND2)) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - } - } - - @Test - public void singleUseSelectAsync() throws Exception { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - ApiFuture> list; - try (AsyncResultSet rs = client.singleUse().executeQueryAsync(SELECT1AND2)) { - list = rs.toListAsync(TO_LONG, executor); - assertThrowsSessionNotFoundIfShouldFail(() -> get(list)); - } - } - - @Test - public void singleUseRead() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.singleUse()) { - try (ResultSet rs = context.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - } - } - - @Test - public void singleUseReadUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.singleUse()) { - try (ResultSet rs = - context.readUsingIndex("FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - } - } - - @Test - public void singleUseReadRow() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.singleUse()) { - assertThrowsSessionNotFoundIfShouldFail( - () -> context.readRow("FOO", Key.of(), Collections.singletonList("BAR"))); - } - } - - @Test - public void singleUseReadRowUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.singleUse()) { - assertThrowsSessionNotFoundIfShouldFail( - () -> - context.readRowUsingIndex("FOO", "IDX", Key.of(), Collections.singletonList("BAR"))); - } - } - - @Test - public void singleUseReadOnlyTransactionSelect() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.singleUseReadOnlyTransaction()) { - try (ResultSet rs = context.executeQuery(SELECT1AND2)) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - } - } - - @Test - public void singleUseReadOnlyTransactionRead() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.singleUseReadOnlyTransaction()) { - try (ResultSet rs = context.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - } - } - - @Test - public void singlUseReadOnlyTransactionReadUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.singleUseReadOnlyTransaction()) { - try (ResultSet rs = - context.readUsingIndex("FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - } - } - - @Test - public void singleUseReadOnlyTransactionReadRow() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.singleUseReadOnlyTransaction()) { - assertThrowsSessionNotFoundIfShouldFail( - () -> context.readRow("FOO", Key.of(), Collections.singletonList("BAR"))); - } - } - - @Test - public void singleUseReadOnlyTransactionReadRowUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.singleUseReadOnlyTransaction()) { - assertThrowsSessionNotFoundIfShouldFail( - () -> - context.readRowUsingIndex("FOO", "IDX", Key.of(), Collections.singletonList("BAR"))); - } - } - - @Test - public void readOnlyTransactionSelect() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - try (ResultSet rs = context.executeQuery(SELECT1AND2)) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - } - } - - @Test - public void readOnlyTransactionRead() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - try (ResultSet rs = context.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - } - } - - @Test - public void readOnlyTransactionReadUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - try (ResultSet rs = - context.readUsingIndex("FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - } - } - - @Test - public void readOnlyTransactionReadRow() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - assertThrowsSessionNotFoundIfShouldFail( - () -> context.readRow("FOO", Key.of(), Collections.singletonList("BAR"))); - } - } - - @Test - public void readOnlyTransactionReadRowUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - assertThrowsSessionNotFoundIfShouldFail( - () -> - context.readRowUsingIndex("FOO", "IDX", Key.of(), Collections.singletonList("BAR"))); - } - } - - @Test - public void readOnlyTransactionSelectNonRecoverable() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - try (ResultSet rs = context.executeQuery(SELECT1AND2)) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - // Invalidate the session pool while in a transaction. This is not recoverable. - invalidateSessionPool(client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - try (ResultSet rs = context.executeQuery(SELECT1AND2)) { - assertThrows(SessionNotFoundException.class, () -> rs.next()); - } - } - } - - @Test - public void readOnlyTransactionReadNonRecoverable() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - try (ResultSet rs = context.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - invalidateSessionPool(client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - try (ResultSet rs = context.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrows(SessionNotFoundException.class, () -> rs.next()); - } - } - } - - @Test - public void readOnlyTransactionReadUsingIndexNonRecoverable() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - try (ResultSet rs = - context.readUsingIndex("FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - invalidateSessionPool(client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - try (ResultSet rs = - context.readUsingIndex("FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrows(SessionNotFoundException.class, () -> rs.next()); - } - } - } - - @Test - public void readOnlyTransactionReadRowNonRecoverable() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - assertThrowsSessionNotFoundIfShouldFail( - () -> context.readRow("FOO", Key.of(), Collections.singletonList("BAR"))); - invalidateSessionPool(client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - assertThrows( - SessionNotFoundException.class, - () -> context.readRow("FOO", Key.of(), Collections.singletonList("BAR"))); - } - } - - @Test - public void readOnlyTransactionReadRowUsingIndexNonRecoverable() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - try (ReadContext context = client.readOnlyTransaction()) { - assertThrowsSessionNotFoundIfShouldFail( - () -> - context.readRowUsingIndex("FOO", "IDX", Key.of(), Collections.singletonList("BAR"))); - invalidateSessionPool(client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - assertThrows( - SessionNotFoundException.class, - () -> - context.readRowUsingIndex("FOO", "IDX", Key.of(), Collections.singletonList("BAR"))); - } - } - - @Test - public void readWriteTransactionReadOnlySessionInPool() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - SessionPoolOptions.Builder builder = SessionPoolOptions.newBuilder(); - if (failOnInvalidatedSession) { - builder.setFailIfSessionNotFound(); - } - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setSessionPoolOption(builder.build()) - .setCredentials(NoCredentials.getInstance()) - .build() - .getService()) { - DatabaseClient client = - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - invalidateSessionPool(client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - TransactionRunner runner = client.readWriteTransaction(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - try (ResultSet rs = transaction.executeQuery(SELECT1AND2)) { - while (rs.next()) {} - } - return null; - })); - } - } - - @Test - public void readWriteTransactionSelect() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - try (ResultSet rs = transaction.executeQuery(SELECT1AND2)) { - while (rs.next()) {} - } - return null; - })); - } - - @Test - public void readWriteTransactionRead() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - try (ResultSet rs = - transaction.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - while (rs.next()) {} - } - return null; - })); - } - - @Test - public void readWriteTransactionReadWithOptimisticLock() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(Options.optimisticLock()); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - try (ResultSet rs = - transaction.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - while (rs.next()) {} - } - return null; - })); - } - - @Test - public void readWriteTransactionReadUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - try (ResultSet rs = - transaction.readUsingIndex( - "FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - while (rs.next()) {} - } - return null; - })); - } - - @Test - public void readWriteTransactionReadRow() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> - transaction.readRow("FOO", Key.of(), Collections.singletonList("BAR")))); - } - - @Test - public void readWriteTransactionReadRowUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> - transaction.readRowUsingIndex( - "FOO", "IDX", Key.of(), Collections.singletonList("BAR")))); - } - - @Test - public void readWriteTransactionUpdate() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - assertThrowsSessionNotFoundIfShouldFail( - () -> runner.run(transaction -> transaction.executeUpdate(UPDATE_STATEMENT))); - } - - @Test - public void readWriteTransactionBatchUpdate() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> - transaction.batchUpdate(Collections.singletonList(UPDATE_STATEMENT)))); - } - - @Test - public void readWriteTransactionBuffer() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - transaction.buffer(Mutation.newInsertBuilder("FOO").set("BAR").to(1L).build()); - return null; - })); - } - - @Test - public void readWriteTransactionSelectInvalidatedDuringTransaction() { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - final AtomicInteger attempt = new AtomicInteger(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - attempt.incrementAndGet(); - try (ResultSet rs = transaction.executeQuery(SELECT1AND2)) { - while (rs.next()) {} - } - if (attempt.get() == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - try (ResultSet rs = transaction.executeQuery(SELECT1AND2)) { - while (rs.next()) {} - } - assertThat(attempt.get()).isGreaterThan(1); - return null; - })); - } - - @Test - public void readWriteTransactionReadInvalidatedDuringTransaction() { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - final AtomicInteger attempt = new AtomicInteger(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - attempt.incrementAndGet(); - try (ResultSet rs = - transaction.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - while (rs.next()) {} - } - if (attempt.get() == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - try (ResultSet rs = - transaction.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - while (rs.next()) {} - } - assertThat(attempt.get()).isGreaterThan(1); - return null; - })); - } - - @Test - public void readWriteTransactionReadUsingIndexInvalidatedDuringTransaction() { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - final AtomicInteger attempt = new AtomicInteger(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - attempt.incrementAndGet(); - try (ResultSet rs = - transaction.readUsingIndex( - "FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - while (rs.next()) {} - } - if (attempt.get() == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - try (ResultSet rs = - transaction.readUsingIndex( - "FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - while (rs.next()) {} - } - assertThat(attempt.get()).isGreaterThan(1); - return null; - })); - } - - @Test - public void readWriteTransactionReadRowInvalidatedDuringTransaction() { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - final AtomicInteger attempt = new AtomicInteger(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - attempt.incrementAndGet(); - Struct row = - transaction.readRow("FOO", Key.of(), Collections.singletonList("BAR")); - assertThat(row.getLong(0)).isEqualTo(1L); - if (attempt.get() == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - transaction.readRow("FOO", Key.of(), Collections.singletonList("BAR")); - assertThat(attempt.get()).isGreaterThan(1); - return null; - })); - } - - @Test - public void readWriteTransactionReadRowUsingIndexInvalidatedDuringTransaction() { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - TransactionRunner runner = client.readWriteTransaction(); - final AtomicInteger attempt = new AtomicInteger(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - runner.run( - transaction -> { - attempt.incrementAndGet(); - Struct row = - transaction.readRowUsingIndex( - "FOO", "IDX", Key.of(), Collections.singletonList("BAR")); - assertThat(row.getLong(0)).isEqualTo(1L); - if (attempt.get() == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - transaction.readRowUsingIndex( - "FOO", "IDX", Key.of(), Collections.singletonList("BAR")); - assertThat(attempt.get()).isGreaterThan(1); - return null; - })); - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerReadOnlySessionInPool() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - try (ResultSet rs = transaction.executeQuery(SELECT1AND2)) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - manager.commit(); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - break; - } - } - } - } - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerSelect() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - try (ResultSet rs = transaction.executeQuery(SELECT1AND2)) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - manager.commit(); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - break; - } - } - } - } - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerRead() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - try (ResultSet rs = - transaction.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - manager.commit(); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - break; - } - } - } - } - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerReadUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - try (ResultSet rs = - transaction.readUsingIndex( - "FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()); - } - manager.commit(); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - break; - } - } - } - } - } - - @Test - public void transactionManagerReadRow() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - TransactionContext context = transaction; - assertThrowsSessionNotFoundIfShouldFail( - () -> context.readRow("FOO", Key.of(), Collections.singletonList("BAR"))); - manager.commit(); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - break; - } - } - } - } - } - - @Test - public void transactionManagerReadRowUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - TransactionContext context = transaction; - assertThrowsSessionNotFoundIfShouldFail( - () -> - context.readRowUsingIndex( - "FOO", "IDX", Key.of(), Collections.singletonList("BAR"))); - manager.commit(); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - break; - } - } - } - } - } - - @Test - public void transactionManagerUpdate() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (TransactionManager manager = client.transactionManager(Options.commitStats())) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - TransactionContext context = transaction; - assertThrowsSessionNotFoundIfShouldFail(() -> context.executeUpdate(UPDATE_STATEMENT)); - manager.commit(); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - break; - } - } - } - } - } - - @Test - public void transactionManagerAborted_thenSessionNotFoundOnBeginTransaction() - throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - int attempt = 0; - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - attempt++; - if (attempt == 1) { - mockSpanner.abortNextStatement(); - } - if (attempt == 2) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - TransactionContext context = transaction; - assertThrowsSessionNotFoundIfShouldFail(() -> context.executeUpdate(UPDATE_STATEMENT)); - manager.commit(); - // The actual number of attempts depends on when the transaction manager will actually get - // a valid session, as we invalidate the entire session pool. - assertThat(attempt).isAtLeast(3); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - break; - } - } - } - } - } - - @Test - public void transactionManagerBatchUpdate() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - try { - TransactionContext context = transaction; - assertThrowsSessionNotFoundIfShouldFail( - () -> context.batchUpdate(Collections.singletonList(UPDATE_STATEMENT))); - manager.commit(); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - manager.close(); - break; - } - } - } - } - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerBuffer() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (TransactionManager manager = client.transactionManager()) { - TransactionContext transaction = manager.begin(); - while (true) { - transaction.buffer(Mutation.newInsertBuilder("FOO").set("BAR").to(1L).build()); - try { - manager.commit(); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - if (transaction == null) { - break; - } - } - } - assertThat(manager.getCommitTimestamp()).isNotNull(); - assertThat(failOnInvalidatedSession).isFalse(); - } catch (SessionNotFoundException e) { - assertThat(failOnInvalidatedSession).isTrue(); - } - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerSelectInvalidatedDuringTransaction() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - SessionPoolOptions.Builder builder = SessionPoolOptions.newBuilder(); - if (failOnInvalidatedSession) { - builder.setFailIfSessionNotFound(); - } - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setSessionPoolOption(builder.build()) - .setCredentials(NoCredentials.getInstance()) - .build() - .getService()) { - DatabaseClient client = - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - try (TransactionManager manager = client.transactionManager()) { - int attempts = 0; - TransactionContext transaction = manager.begin(); - while (true) { - attempts++; - try { - try (ResultSet rs = transaction.executeQuery(SELECT1AND2)) { - while (rs.next()) {} - } - if (attempts == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - try (ResultSet rs = transaction.executeQuery(SELECT1AND2)) { - if (assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()) == null) { - break; - } - } - manager.commit(); - assertThat(attempts).isGreaterThan(1); - break; - } catch (AbortedException e) { - transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry()); - } - } - } - } - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerReadInvalidatedDuringTransaction() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - SessionPoolOptions.Builder builder = SessionPoolOptions.newBuilder(); - if (failOnInvalidatedSession) { - builder.setFailIfSessionNotFound(); - } - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setSessionPoolOption(builder.build()) - .setCredentials(NoCredentials.getInstance()) - .build() - .getService()) { - DatabaseClient client = - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - try (TransactionManager manager = client.transactionManager()) { - int attempts = 0; - TransactionContext transaction = manager.begin(); - while (true) { - attempts++; - try { - try (ResultSet rs = - transaction.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - while (rs.next()) {} - } - if (attempts == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - try (ResultSet rs = - transaction.read("FOO", KeySet.all(), Collections.singletonList("BAR"))) { - if (assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()) == null) { - break; - } - } - manager.commit(); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - } - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerReadUsingIndexInvalidatedDuringTransaction() - throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - SessionPoolOptions.Builder builder = SessionPoolOptions.newBuilder(); - if (failOnInvalidatedSession) { - builder.setFailIfSessionNotFound(); - } - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setSessionPoolOption(builder.build()) - .setCredentials(NoCredentials.getInstance()) - .build() - .getService()) { - DatabaseClient client = - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - try (TransactionManager manager = client.transactionManager()) { - int attempts = 0; - TransactionContext transaction = manager.begin(); - while (true) { - attempts++; - try { - try (ResultSet rs = - transaction.readUsingIndex( - "FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - while (rs.next()) {} - } - if (attempts == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - try (ResultSet rs = - transaction.readUsingIndex( - "FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))) { - if (assertThrowsSessionNotFoundIfShouldFail(() -> rs.next()) == null) { - break; - } - } - manager.commit(); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - } - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerReadRowInvalidatedDuringTransaction() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - SessionPoolOptions.Builder builder = SessionPoolOptions.newBuilder(); - if (failOnInvalidatedSession) { - builder.setFailIfSessionNotFound(); - } - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setSessionPoolOption(builder.build()) - .setCredentials(NoCredentials.getInstance()) - .build() - .getService()) { - DatabaseClient client = - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - try (TransactionManager manager = client.transactionManager()) { - int attempts = 0; - TransactionContext transaction = manager.begin(); - while (true) { - attempts++; - try { - Struct row = transaction.readRow("FOO", Key.of(), Collections.singletonList("BAR")); - assertThat(row.getLong(0)).isEqualTo(1L); - if (attempts == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - TransactionContext context = transaction; - if (assertThrowsSessionNotFoundIfShouldFail( - () -> context.readRow("FOO", Key.of(), Collections.singletonList("BAR"))) - == null) { - break; - } - manager.commit(); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - } - } - - @SuppressWarnings("resource") - @Test - public void transactionManagerReadRowUsingIndexInvalidatedDuringTransaction() - throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - SessionPoolOptions.Builder builder = SessionPoolOptions.newBuilder(); - if (failOnInvalidatedSession) { - builder.setFailIfSessionNotFound(); - } - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setSessionPoolOption(builder.build()) - .setCredentials(NoCredentials.getInstance()) - .build() - .getService()) { - DatabaseClient client = - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - try (TransactionManager manager = client.transactionManager()) { - int attempts = 0; - TransactionContext transaction = manager.begin(); - while (true) { - attempts++; - try { - Struct row = - transaction.readRowUsingIndex( - "FOO", "IDX", Key.of(), Collections.singletonList("BAR")); - assertThat(row.getLong(0)).isEqualTo(1L); - if (attempts == 1) { - invalidateSessionPool( - client, spanner.getOptions().getSessionPoolOptions().getMinSessions()); - } - TransactionContext context = transaction; - if (assertThrowsSessionNotFoundIfShouldFail( - () -> - context.readRowUsingIndex( - "FOO", "IDX", Key.of(), Collections.singletonList("BAR"))) - == null) { - break; - } - manager.commit(); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetry(); - } - } - } - } - } - - @Test - public void partitionedDml() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionPartitionedOps()); - assertThrowsSessionNotFoundIfShouldFail( - () -> client.executePartitionedUpdate(UPDATE_STATEMENT)); - } - - @Test - public void write() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - assertThrowsSessionNotFoundIfShouldFail( - () -> client.write(Collections.singletonList(Mutation.delete("FOO", KeySet.all())))); - } - - @Test - public void writeAtLeastOnce() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - assertThrowsSessionNotFoundIfShouldFail( - () -> - client.writeAtLeastOnce( - Collections.singletonList(Mutation.delete("FOO", KeySet.all())))); - } - - @Test - public void asyncRunnerSelect() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncRunner_withReadFunction(input -> input.executeQueryAsync(SELECT1AND2)); - } - - @Test - public void asyncRunnerRead() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncRunner_withReadFunction( - input -> input.readAsync("FOO", KeySet.all(), Collections.singletonList("BAR"))); - } - - @Test - public void asyncRunnerReadUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncRunner_withReadFunction( - input -> - input.readUsingIndexAsync( - "FOO", "IDX", KeySet.all(), Collections.singletonList("BAR"))); - } - - private void asyncRunner_withReadFunction( - final Function readFunction) throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - final ExecutorService queryExecutor = Executors.newSingleThreadExecutor(); - try { - AsyncRunner runner = client.runAsync(); - final AtomicLong counter = new AtomicLong(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - get( - runner.runAsync( - txn -> { - AsyncResultSet rs = readFunction.apply(txn); - ApiFuture fut = - rs.setCallback( - queryExecutor, - resultSet -> { - while (true) { - switch (resultSet.tryNext()) { - case OK: - counter.incrementAndGet(); - break; - case DONE: - return CallbackResponse.DONE; - case NOT_READY: - return CallbackResponse.CONTINUE; - } - } - }); - return ApiFutures.transform( - fut, input -> counter.get(), MoreExecutors.directExecutor()); - }, - executor))); - } finally { - queryExecutor.shutdown(); - } - } - - @Test - public void asyncRunnerReadRow() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - AsyncRunner runner = client.runAsync(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - get( - runner.runAsync( - txn -> txn.readRowAsync("FOO", Key.of(), Collections.singletonList("BAR")), - executor))); - } - - @Test - public void asyncRunnerReadRowUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - AsyncRunner runner = client.runAsync(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - get( - runner.runAsync( - txn -> - txn.readRowUsingIndexAsync( - "FOO", "IDX", Key.of(), Collections.singletonList("BAR")), - executor))); - } - - @Test - public void asyncRunnerUpdate() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - AsyncRunner runner = client.runAsync(); - assertThrowsSessionNotFoundIfShouldFail( - () -> get(runner.runAsync(txn -> txn.executeUpdateAsync(UPDATE_STATEMENT), executor))); - } - - @Test - public void asyncRunnerBatchUpdate() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - AsyncRunner runner = client.runAsync(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - get( - runner.runAsync( - txn -> txn.batchUpdateAsync(Arrays.asList(UPDATE_STATEMENT, UPDATE_STATEMENT)), - executor))); - } - - @Test - public void asyncRunnerBuffer() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - AsyncRunner runner = client.runAsync(); - assertThrowsSessionNotFoundIfShouldFail( - () -> - get( - runner.runAsync( - txn -> { - txn.buffer(Mutation.newInsertBuilder("FOO").set("BAR").to(1L).build()); - return ApiFutures.immediateFuture(null); - }, - executor))); - } - - @Test - public void asyncTransactionManagerAsyncSelect() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readAsync(input -> input.executeQueryAsync(SELECT1AND2)); - } - - @Test - public void asyncTransactionManagerAsyncRead() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readAsync( - input -> input.readAsync("FOO", KeySet.all(), Collections.singletonList("BAR"))); - } - - @Test - public void asyncTransactionManagerAsyncReadUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readAsync( - input -> - input.readUsingIndexAsync( - "FOO", "idx", KeySet.all(), Collections.singletonList("BAR"))); - } - - private void asyncTransactionManager_readAsync( - final Function fn) throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - final ExecutorService queryExecutor = Executors.newSingleThreadExecutor(); - try (AsyncTransactionManager manager = client.transactionManagerAsync()) { - TransactionContextFuture context = manager.beginAsync(); - while (true) { - try { - final AtomicLong counter = new AtomicLong(); - AsyncTransactionStep count = - context.then( - (transaction, ignored) -> { - AsyncResultSet rs = fn.apply(transaction); - ApiFuture fut = - rs.setCallback( - queryExecutor, - resultSet -> { - while (true) { - switch (resultSet.tryNext()) { - case OK: - counter.incrementAndGet(); - break; - case DONE: - return CallbackResponse.DONE; - case NOT_READY: - return CallbackResponse.CONTINUE; - } - } - }); - return ApiFutures.transform( - fut, input -> counter.get(), MoreExecutors.directExecutor()); - }, - executor); - CommitTimestampFuture ts = count.commitAsync(); - assertThrowsSessionNotFoundIfShouldFail(() -> get(ts)); - break; - } catch (AbortedException e) { - context = manager.resetForRetryAsync(); - } - } - } finally { - queryExecutor.shutdown(); - } - } - - @Test - public void asyncTransactionManagerSelect() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readSync(input -> input.executeQuery(SELECT1AND2)); - } - - @Test - public void asyncTransactionManagerRead() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readSync( - input -> input.read("FOO", KeySet.all(), Collections.singletonList("BAR"))); - } - - @Test - public void asyncTransactionManagerReadUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readSync( - input -> - input.readUsingIndex("FOO", "idx", KeySet.all(), Collections.singletonList("BAR"))); - } - - private void asyncTransactionManager_readSync(final Function fn) - throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - final ExecutorService queryExecutor = Executors.newSingleThreadExecutor(); - try (AsyncTransactionManager manager = client.transactionManagerAsync()) { - TransactionContextFuture context = manager.beginAsync(); - while (true) { - try { - AsyncTransactionStep count = - context.then( - (transaction, ignored) -> { - long counter = 0L; - try (ResultSet rs = fn.apply(transaction)) { - while (rs.next()) { - counter++; - } - } - return ApiFutures.immediateFuture(counter); - }, - executor); - CommitTimestampFuture ts = count.commitAsync(); - assertThrowsSessionNotFoundIfShouldFail(() -> get(ts)); - break; - } catch (AbortedException e) { - context = manager.resetForRetryAsync(); - } - } - } finally { - queryExecutor.shutdown(); - } - } - - @Test - public void asyncTransactionManagerReadRow() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readRowFunction( - input -> - ApiFutures.immediateFuture( - input.readRow("FOO", Key.of("foo"), Collections.singletonList("BAR")))); - } - - @Test - public void asyncTransactionManagerReadRowUsingIndex() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readRowFunction( - input -> - ApiFutures.immediateFuture( - input.readRowUsingIndex( - "FOO", "idx", Key.of("foo"), Collections.singletonList("BAR")))); - } - - @Test - public void asyncTransactionManagerReadRowAsync() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readRowFunction( - input -> input.readRowAsync("FOO", Key.of("foo"), Collections.singletonList("BAR"))); - } - - @Test - public void asyncTransactionManagerReadRowUsingIndexAsync() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_readRowFunction( - input -> - input.readRowUsingIndexAsync( - "FOO", "idx", Key.of("foo"), Collections.singletonList("BAR"))); - } - - private void asyncTransactionManager_readRowFunction( - final Function> fn) throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - final ExecutorService queryExecutor = Executors.newSingleThreadExecutor(); - try (AsyncTransactionManager manager = client.transactionManagerAsync()) { - TransactionContextFuture context = manager.beginAsync(); - while (true) { - try { - AsyncTransactionStep row = - context.then((transaction, ignored) -> fn.apply(transaction), executor); - CommitTimestampFuture ts = row.commitAsync(); - assertThrowsSessionNotFoundIfShouldFail(() -> get(ts)); - break; - } catch (AbortedException e) { - context = manager.resetForRetryAsync(); - } - } - } finally { - queryExecutor.shutdown(); - } - } - - @Test - public void asyncTransactionManagerUpdateAsync() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_updateFunction( - input -> input.executeUpdateAsync(UPDATE_STATEMENT), UPDATE_COUNT); - } - - @Test - public void asyncTransactionManagerUpdate() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_updateFunction( - input -> ApiFutures.immediateFuture(input.executeUpdate(UPDATE_STATEMENT)), UPDATE_COUNT); - } - - @Test - public void asyncTransactionManagerBatchUpdateAsync() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_updateFunction( - input -> input.batchUpdateAsync(Arrays.asList(UPDATE_STATEMENT, UPDATE_STATEMENT)), - new long[] {UPDATE_COUNT, UPDATE_COUNT}); - } - - @Test - public void asyncTransactionManagerBatchUpdate() throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - asyncTransactionManager_updateFunction( - input -> - ApiFutures.immediateFuture( - input.batchUpdate(Arrays.asList(UPDATE_STATEMENT, UPDATE_STATEMENT))), - new long[] {UPDATE_COUNT, UPDATE_COUNT}); - } - - private void asyncTransactionManager_updateFunction( - final Function> fn, T expected) throws InterruptedException { - assumeFalse( - "Multiplexed session do not throw a SessionNotFound errors. ", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW()); - try (AsyncTransactionManager manager = client.transactionManagerAsync()) { - TransactionContextFuture transaction = manager.beginAsync(); - while (true) { - try { - AsyncTransactionStep res = - transaction.then((txn, input) -> fn.apply(txn), executor); - CommitTimestampFuture ts = res.commitAsync(); - assertThrowsSessionNotFoundIfShouldFail(() -> get(ts)); - break; - } catch (AbortedException e) { - transaction = manager.resetForRetryAsync(); - } - } - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java index 3106bd16526..2e9d4185cb9 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java @@ -23,7 +23,7 @@ import com.google.cloud.NoCredentials; import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; import com.google.cloud.spanner.connection.AbstractMockServerTest; -import com.google.spanner.v1.BatchCreateSessionsRequest; +import com.google.spanner.v1.CreateSessionRequest; import com.google.spanner.v1.ExecuteSqlRequest; import io.grpc.ManagedChannelBuilder; import io.grpc.Status; @@ -36,7 +36,7 @@ public class RetryableInternalErrorTest extends AbstractMockServerTest { @Test public void testTranslateInternalException() { - mockSpanner.setBatchCreateSessionsExecutionTime( + mockSpanner.setCreateSessionExecutionTime( SimulatedExecutionTime.ofException( Status.INTERNAL .withDescription("Authentication backend internal server error. Please retry.") @@ -69,9 +69,9 @@ public void testTranslateInternalException() { assertTrue(resultSet.next()); assertFalse(resultSet.next()); } - // Verify that both the BatchCreateSessions call and the ExecuteStreamingSql call were + // Verify that both the CreateSession call and the ExecuteStreamingSql call were // retried. - assertEquals(2, mockSpanner.countRequestsOfType(BatchCreateSessionsRequest.class)); + assertEquals(2, mockSpanner.countRequestsOfType(CreateSessionRequest.class)); assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); // Clear the requests before the next test. mockSpanner.clearRequests(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SelectRandomBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SelectRandomBenchmark.java index e18cddd3bf5..e1f93d334dc 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SelectRandomBenchmark.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SelectRandomBenchmark.java @@ -16,8 +16,6 @@ package com.google.cloud.spanner; -import static com.google.common.truth.Truth.assertThat; - import com.google.api.gax.rpc.TransportChannelProvider; import com.google.cloud.NoCredentials; import com.google.common.util.concurrent.Futures; @@ -99,8 +97,7 @@ public void setup() throws Exception { (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); // Wait until the session pool has initialized. - while (client.pool.getNumberOfSessionsInPool() - < spanner.getOptions().getSessionPoolOptions().getMinSessions()) { + while (client.multiplexedSessionDatabaseClient.getCurrentSessionReference() == null) { Thread.sleep(1L); } } @@ -119,8 +116,6 @@ public void burstRead(final BenchmarkState server) throws Exception { int parallelThreads = server.maxSessions * 2; final DatabaseClient client = server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(server.minSessions); ListeningScheduledExecutorService service = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionClientTests.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionClientTests.java index 5d3ed2bca53..07a76970bfd 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionClientTests.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionClientTests.java @@ -18,7 +18,7 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; @@ -163,7 +163,6 @@ public void createAndCloseSession() { assertEquals( deleteOptionsCaptor.getValue().get(SpannerRpc.Option.CHANNEL_HINT), options.getValue().get(SpannerRpc.Option.CHANNEL_HINT)); - assertTrue(deleteOptionsCaptor.getValue().containsKey(SpannerRpc.Option.REQUEST_ID)); } } @@ -207,9 +206,7 @@ public void onSessionCreateFailure(Throwable t, int createFailureForSessionCount client.createMultiplexedSession(consumer); } // for multiplexed session there is no channel hint pass in the RPC options - assertNotNull(options.getValue()); - assertEquals(options.getValue().get(Option.CHANNEL_HINT), null); - assertNotNull(options.getValue().get(Option.REQUEST_ID)); + assertNull(options.getValue()); assertEquals(1, returnedSessionCount.get()); } @@ -241,9 +238,7 @@ public void onSessionCreateFailure(Throwable t, int createFailureForSessionCount client.createMultiplexedSession(consumer); } // for multiplexed session there is no channel hint pass in the RPC options - assertNotNull(options.getValue()); - assertEquals(options.getValue().get(Option.CHANNEL_HINT), null); - assertNotNull(options.getValue().get(Option.REQUEST_ID)); + assertNull(options.getValue()); } @SuppressWarnings("unchecked") diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionImplTest.java index df957f75ebf..53ab2c333d6 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionImplTest.java @@ -21,6 +21,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThrows; import static org.junit.Assert.fail; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyMap; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; @@ -34,6 +35,7 @@ import com.google.cloud.Timestamp; import com.google.cloud.grpc.GrpcTransportOptions; import com.google.cloud.grpc.GrpcTransportOptions.ExecutorFactory; +import com.google.cloud.spanner.XGoogSpannerRequestId.NoopRequestIdCreator; import com.google.cloud.spanner.spi.v1.SpannerRpc; import com.google.cloud.spanner.v1.stub.SpannerStubSettings; import com.google.protobuf.ByteString; @@ -45,6 +47,7 @@ import com.google.spanner.v1.CommitResponse; import com.google.spanner.v1.Mutation.Write; import com.google.spanner.v1.PartialResultSet; +import com.google.spanner.v1.RequestOptions; import com.google.spanner.v1.ResultSetMetadata; import com.google.spanner.v1.RollbackRequest; import com.google.spanner.v1.Session; @@ -144,8 +147,8 @@ public void setUp() { SpannerStubSettings.newBuilder().executeStreamingSqlSettings().getRetryableCodes()); when(rpc.getCommitRetrySettings()) .thenReturn(SpannerStubSettings.newBuilder().commitSettings().getRetrySettings()); + when(rpc.getRequestIdCreator()).thenReturn(NoopRequestIdCreator.INSTANCE); session = spanner.getSessionClient(db).createSession(); - ((SessionImpl) session).setRequestIdCreator(new XGoogSpannerRequestId.NoopRequestIdCreator()); Span oTspan = mock(Span.class); ISpan span = new OpenTelemetrySpan(oTspan); when(oTspan.makeCurrent()).thenReturn(mock(Scope.class)); @@ -165,6 +168,42 @@ private void doNestedRwTransaction() { }); } + @Test + public void testBeginTransactionWithClientContext() { + RequestOptions.ClientContext clientContext = + RequestOptions.ClientContext.newBuilder() + .putSecureContext( + "key", com.google.protobuf.Value.newBuilder().setStringValue("value").build()) + .build(); + Mockito.when( + rpc.beginTransactionAsync( + Mockito.any(BeginTransactionRequest.class), anyMap(), eq(true))) + .thenReturn( + ApiFutures.immediateFuture( + Transaction.newBuilder().setId(ByteString.copyFromUtf8("tx")).build())); + + ((SessionImpl) session) + .beginTransactionAsync( + Options.fromTransactionOptions( + Options.priority(Options.RpcPriority.HIGH), + Options.tag("tag"), + Options.clientContext(clientContext)), + true, + Collections.emptyMap(), + null, + null); + + ArgumentCaptor requestCaptor = + ArgumentCaptor.forClass(BeginTransactionRequest.class); + Mockito.verify(rpc).beginTransactionAsync(requestCaptor.capture(), anyMap(), eq(true)); + BeginTransactionRequest request = requestCaptor.getValue(); + RequestOptions requestOptions = request.getRequestOptions(); + assertEquals(RequestOptions.Priority.PRIORITY_HIGH, requestOptions.getPriority()); + // TransactionTag should NOT be set because session is not multiplexed. + assertEquals("", requestOptions.getTransactionTag()); + assertEquals(clientContext, requestOptions.getClientContext()); + } + @Test public void nestedReadWriteTxnThrows() { SpannerException e = assertThrows(SpannerException.class, () -> doNestedRwTransaction()); @@ -446,7 +485,7 @@ public void request(int numMessages) {} private void mockRead(final PartialResultSet myResultSet) { final ArgumentCaptor consumer = ArgumentCaptor.forClass(SpannerRpc.ResultStreamConsumer.class); - Mockito.when(rpc.read(Mockito.any(), consumer.capture(), anyMap(), eq(false))) + Mockito.when(rpc.read(Mockito.any(), consumer.capture(), anyMap(), any(), eq(false))) .then( invocation -> { consumer.getValue().onPartialResultSet(myResultSet); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolBenchmark.java deleted file mode 100644 index 4415ba7d707..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolBenchmark.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.cloud.NoCredentials; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.ListeningScheduledExecutorService; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.spanner.v1.BatchCreateSessionsRequest; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import org.openjdk.jmh.annotations.AuxCounters; -import org.openjdk.jmh.annotations.Benchmark; -import org.openjdk.jmh.annotations.BenchmarkMode; -import org.openjdk.jmh.annotations.Fork; -import org.openjdk.jmh.annotations.Level; -import org.openjdk.jmh.annotations.Measurement; -import org.openjdk.jmh.annotations.Mode; -import org.openjdk.jmh.annotations.OutputTimeUnit; -import org.openjdk.jmh.annotations.Param; -import org.openjdk.jmh.annotations.Scope; -import org.openjdk.jmh.annotations.Setup; -import org.openjdk.jmh.annotations.State; -import org.openjdk.jmh.annotations.TearDown; -import org.openjdk.jmh.annotations.Warmup; - -/** - * Benchmarks for common session pool scenarios. The simulated execution times are based on - * reasonable estimates and are primarily intended to keep the benchmarks comparable with each other - * before and after changes have been made to the pool. The benchmarks are bound to the Maven - * profile `benchmark` and can be executed like this: - * mvn clean test -DskipTests -Pbenchmark -Dbenchmark.name=SessionPoolBenchmark - * - */ -@BenchmarkMode(Mode.AverageTime) -@Fork(value = 1, warmups = 0) -@Measurement(batchSize = 1, iterations = 1, timeUnit = TimeUnit.MILLISECONDS) -@Warmup(batchSize = 0, iterations = 0) -@OutputTimeUnit(TimeUnit.MILLISECONDS) -public class SessionPoolBenchmark { - private static final String TEST_PROJECT = "my-project"; - private static final String TEST_INSTANCE = "my-instance"; - private static final String TEST_DATABASE = "my-database"; - private static final int HOLD_SESSION_TIME = 100; - private static final int RND_WAIT_TIME_BETWEEN_REQUESTS = 10; - private static final Random RND = new Random(); - - @State(Scope.Thread) - @AuxCounters(org.openjdk.jmh.annotations.AuxCounters.Type.EVENTS) - public static class BenchmarkState { - private StandardBenchmarkMockServer mockServer; - private Spanner spanner; - private DatabaseClientImpl client; - - @Param({"100"}) - int minSessions; - - @Param({"400"}) - int maxSessions; - - @Param({"1", "10", "20", "25", "30", "40", "50", "100"}) - int incStep; - - @Param({"4"}) - int numChannels; - - @Param({"0.2"}) - float writeFraction; - - /** AuxCounter for number of RPCs. */ - public int numBatchCreateSessionsRpcs() { - return mockServer.countRequests(BatchCreateSessionsRequest.class); - } - - /** AuxCounter for number of sessions created. */ - public int sessionsCreated() { - return mockServer.getMockSpanner().numSessionsCreated(); - } - - @Setup(Level.Invocation) - public void setup() throws Exception { - mockServer = new StandardBenchmarkMockServer(); - TransportChannelProvider channelProvider = mockServer.start(); - - SpannerOptions options = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) - .setNumChannels(numChannels) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption( - SessionPoolOptions.newBuilder() - .setMinSessions(minSessions) - .setMaxSessions(maxSessions) - .setIncStep(incStep) - .setWriteSessionsFraction(writeFraction) - .build()) - .build(); - - spanner = options.getService(); - client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - // Wait until the session pool has initialized. - while (client.pool.getNumberOfSessionsInPool() - < spanner.getOptions().getSessionPoolOptions().getMinSessions()) { - Thread.sleep(1L); - } - } - - @TearDown(Level.Invocation) - public void teardown() throws Exception { - spanner.close(); - mockServer.shutdown(); - } - - int expectedStepsToMax() { - int remainder = (maxSessions - minSessions) % incStep == 0 ? 0 : 1; - return numChannels + ((maxSessions - minSessions) / incStep) + remainder; - } - } - - /** Measures the time needed to execute a burst of read requests. */ - @Benchmark - public void burstRead(final BenchmarkState server) throws Exception { - int totalQueries = server.maxSessions * 8; - int parallelThreads = server.maxSessions * 2; - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(server.minSessions); - - ListeningScheduledExecutorService service = - MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); - List> futures = new ArrayList<>(totalQueries); - for (int i = 0; i < totalQueries; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - try (ResultSet rs = - client.singleUse().executeQuery(StandardBenchmarkMockServer.SELECT1)) { - while (rs.next()) { - Thread.sleep(RND.nextInt(HOLD_SESSION_TIME)); - } - return null; - } - })); - } - Futures.allAsList(futures).get(); - service.shutdown(); - } - - /** Measures the time needed to execute a burst of write requests. */ - @Benchmark - public void burstWrite(final BenchmarkState server) throws Exception { - int totalWrites = server.maxSessions * 8; - int parallelThreads = server.maxSessions * 2; - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(server.minSessions); - - ListeningScheduledExecutorService service = - MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); - List> futures = new ArrayList<>(totalWrites); - for (int i = 0; i < totalWrites; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - TransactionRunner runner = client.readWriteTransaction(); - return runner.run( - transaction -> - transaction.executeUpdate(StandardBenchmarkMockServer.UPDATE_STATEMENT)); - })); - } - Futures.allAsList(futures).get(); - service.shutdown(); - } - - /** Measures the time needed to execute a burst of read and write requests. */ - @Benchmark - public void burstReadAndWrite(final BenchmarkState server) throws Exception { - int totalWrites = server.maxSessions * 4; - int totalReads = server.maxSessions * 4; - int parallelThreads = server.maxSessions * 2; - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(server.minSessions); - - ListeningScheduledExecutorService service = - MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); - List> futures = new ArrayList<>(totalReads + totalWrites); - for (int i = 0; i < totalWrites; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - TransactionRunner runner = client.readWriteTransaction(); - return runner.run( - transaction -> - transaction.executeUpdate(StandardBenchmarkMockServer.UPDATE_STATEMENT)); - })); - } - for (int i = 0; i < totalReads; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - try (ResultSet rs = - client.singleUse().executeQuery(StandardBenchmarkMockServer.SELECT1)) { - while (rs.next()) { - Thread.sleep(RND.nextInt(HOLD_SESSION_TIME)); - } - return null; - } - })); - } - Futures.allAsList(futures).get(); - service.shutdown(); - } - - /** Measures the time needed to acquire MaxSessions session sequentially. */ - @Benchmark - public void steadyIncrease(BenchmarkState server) { - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(server.minSessions); - - // Checkout maxSessions sessions by starting maxSessions read-only transactions sequentially. - List transactions = new ArrayList<>(server.maxSessions); - for (int i = 0; i < server.maxSessions; i++) { - ReadOnlyTransaction tx = client.readOnlyTransaction(); - tx.executeQuery(StandardBenchmarkMockServer.SELECT1); - transactions.add(tx); - } - for (ReadOnlyTransaction tx : transactions) { - tx.close(); - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolLeakTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolLeakTest.java deleted file mode 100644 index 080091e6615..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolLeakTest.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * 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; - -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThrows; -import static org.junit.Assume.assumeFalse; - -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.cloud.NoCredentials; -import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; -import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; -import com.google.cloud.spanner.SessionPool.LeakedSessionException; -import com.google.protobuf.ListValue; -import com.google.protobuf.Value; -import com.google.spanner.v1.ResultSetMetadata; -import com.google.spanner.v1.StructType; -import com.google.spanner.v1.StructType.Field; -import com.google.spanner.v1.Type; -import com.google.spanner.v1.TypeCode; -import io.grpc.Server; -import io.grpc.StatusRuntimeException; -import io.grpc.inprocess.InProcessServerBuilder; -import java.util.concurrent.ScheduledThreadPoolExecutor; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class SessionPoolLeakTest { - private static final StatusRuntimeException FAILED_PRECONDITION = - io.grpc.Status.FAILED_PRECONDITION - .withDescription("Non-retryable test exception.") - .asRuntimeException(); - private static MockSpannerServiceImpl mockSpanner; - private static Server server; - private static LocalChannelProvider channelProvider; - private Spanner spanner; - private DatabaseClient client; - private SessionPool pool; - - @BeforeClass - public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); - mockSpanner = new MockSpannerServiceImpl(); - mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. - String uniqueName = InProcessServerBuilder.generateName(); - server = - InProcessServerBuilder.forName(uniqueName) - .scheduledExecutorService(new ScheduledThreadPoolExecutor(1)) - .addService(mockSpanner) - .build() - .start(); - channelProvider = LocalChannelProvider.create(uniqueName); - } - - @AfterClass - public static void stopServer() throws InterruptedException { - server.shutdown(); - server.awaitTermination(); - } - - @Before - public void setUp() { - mockSpanner.reset(); - mockSpanner.removeAllExecutionTimes(); - SpannerOptions.Builder builder = - SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()); - // Make sure the session pool is empty by default, does not contain any sessions, - // contains at most 2 sessions, and creates sessions in steps of 1. - builder.setSessionPoolOption( - SessionPoolOptions.newBuilder().setMinSessions(0).setMaxSessions(2).setIncStep(1).build()); - spanner = builder.build().getService(); - client = spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - pool = ((DatabaseClientImpl) client).pool; - } - - @After - public void tearDown() { - spanner.close(); - } - - @Test - public void testIgnoreLeakedSession() { - for (boolean trackStackTraceofSessionCheckout : new boolean[] {true, false}) { - SessionPoolOptions sessionPoolOptions = - SessionPoolOptions.newBuilder() - .setMinSessions(0) - .setMaxSessions(2) - .setIncStep(1) - .setFailOnSessionLeak() - .setTrackStackTraceOfSessionCheckout(trackStackTraceofSessionCheckout) - .build(); - assumeFalse( - "Session Leaks do not occur with Multiplexed Sessions", - sessionPoolOptions.getUseMultiplexedSession()); - SpannerOptions.Builder builder = - SpannerOptions.newBuilder() - .setProjectId("[PROJECT]") - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()); - builder.setSessionPoolOption(sessionPoolOptions); - Spanner spanner = builder.build().getService(); - DatabaseClient client = - spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); - mockSpanner.putStatementResult( - StatementResult.query( - Statement.of("SELECT 1"), - com.google.spanner.v1.ResultSet.newBuilder() - .setMetadata( - ResultSetMetadata.newBuilder() - .setRowType( - StructType.newBuilder() - .addFields( - Field.newBuilder() - .setName("c") - .setType( - Type.newBuilder().setCode(TypeCode.INT64).build()) - .build()) - .build()) - .build()) - .addRows( - ListValue.newBuilder() - .addValues(Value.newBuilder().setStringValue("1").build()) - .build()) - .build())); - - // Start a read-only transaction without closing it before closing the Spanner instance. - // This will cause a session leak. - ReadOnlyTransaction transaction = client.readOnlyTransaction(); - try (ResultSet resultSet = transaction.executeQuery(Statement.of("SELECT 1"))) { - //noinspection StatementWithEmptyBody - while (resultSet.next()) { - // ignore - } - } - LeakedSessionException exception = assertThrows(LeakedSessionException.class, spanner::close); - // The top of the stack trace will be "markCheckedOut" if we keep track of the point where the - // session was checked out, while it will be "closeAsync" if we don't. In the latter case, we - // get the stack trace of the method that tries to close the Spanner instance, while in the - // former the stack trace will contain the method that checked out the session. - assertEquals( - trackStackTraceofSessionCheckout ? "markCheckedOut" : "closeAsync", - exception.getStackTrace()[0].getMethodName()); - } - } - - @Test - public void testReadWriteTransactionExceptionOnCreateSession() { - assumeFalse( - "Session Leaks do not occur with Multiplexed Sessions", - isMultiplexedSessionsEnabledForRW()); - readWriteTransactionTest( - () -> - mockSpanner.setBatchCreateSessionsExecutionTime( - SimulatedExecutionTime.ofException(FAILED_PRECONDITION)), - 0); - } - - @Test - public void testReadWriteTransactionExceptionOnBegin() { - assumeFalse( - "Session Leaks do not occur with Multiplexed Sessions", - isMultiplexedSessionsEnabledForRW()); - readWriteTransactionTest( - () -> - mockSpanner.setBeginTransactionExecutionTime( - SimulatedExecutionTime.ofException(FAILED_PRECONDITION)), - 1); - } - - private void readWriteTransactionTest( - Runnable setup, int expectedNumberOfSessionsAfterExecution) { - assertEquals(0, pool.getNumberOfSessionsInPool()); - setup.run(); - SpannerException e = - assertThrows( - SpannerException.class, () -> client.readWriteTransaction().run(transaction -> null)); - assertEquals(ErrorCode.FAILED_PRECONDITION, e.getErrorCode()); - assertEquals(expectedNumberOfSessionsAfterExecution, pool.getNumberOfSessionsInPool()); - } - - @Test - public void testTransactionManagerExceptionOnCreateSession() { - assumeFalse( - "Session Leaks do not occur with Multiplexed Sessions", - isMultiplexedSessionsEnabledForRW()); - transactionManagerTest( - () -> - mockSpanner.setBatchCreateSessionsExecutionTime( - SimulatedExecutionTime.ofException(FAILED_PRECONDITION)), - 0); - } - - @Test - public void testTransactionManagerExceptionOnBegin() { - assumeFalse( - "Session Leaks do not occur with Multiplexed Sessions", - isMultiplexedSessionsEnabledForRW()); - assertThat(pool.getNumberOfSessionsInPool(), is(equalTo(0))); - mockSpanner.setBeginTransactionExecutionTime( - SimulatedExecutionTime.ofException(FAILED_PRECONDITION)); - try (TransactionManager txManager = client.transactionManager()) { - // This should not cause an error, as the actual BeginTransaction will be included with the - // first statement of the transaction. - txManager.begin(); - } - assertThat(pool.getNumberOfSessionsInPool(), is(equalTo(1))); - } - - private void transactionManagerTest(Runnable setup, int expectedNumberOfSessionsAfterExecution) { - assertEquals(0, pool.getNumberOfSessionsInPool()); - setup.run(); - try (TransactionManager txManager = client.transactionManager()) { - SpannerException e = assertThrows(SpannerException.class, txManager::begin); - assertEquals(ErrorCode.FAILED_PRECONDITION, e.getErrorCode()); - } - assertEquals(expectedNumberOfSessionsAfterExecution, pool.getNumberOfSessionsInPool()); - } - - private boolean isMultiplexedSessionsEnabledForRW() { - if (spanner.getOptions() == null || spanner.getOptions().getSessionPoolOptions() == null) { - return false; - } - return spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionForRW(); - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerBenchmark.java deleted file mode 100644 index 0370f5420e2..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerBenchmark.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.cloud.NoCredentials; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.ListeningScheduledExecutorService; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.spanner.v1.BatchCreateSessionsRequest; -import com.google.spanner.v1.BeginTransactionRequest; -import com.google.spanner.v1.DeleteSessionRequest; -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import org.openjdk.jmh.annotations.AuxCounters; -import org.openjdk.jmh.annotations.Benchmark; -import org.openjdk.jmh.annotations.BenchmarkMode; -import org.openjdk.jmh.annotations.Fork; -import org.openjdk.jmh.annotations.Level; -import org.openjdk.jmh.annotations.Measurement; -import org.openjdk.jmh.annotations.Mode; -import org.openjdk.jmh.annotations.OutputTimeUnit; -import org.openjdk.jmh.annotations.Param; -import org.openjdk.jmh.annotations.Scope; -import org.openjdk.jmh.annotations.Setup; -import org.openjdk.jmh.annotations.State; -import org.openjdk.jmh.annotations.TearDown; -import org.openjdk.jmh.annotations.Warmup; - -/** - * Benchmarks for the SessionPoolMaintainer. Run these benchmarks from the command line like this: - * - * mvn clean test -DskipTests -Pbenchmark -Dbenchmark.name=SessionPoolMaintainerBenchmark - * - */ -@BenchmarkMode(Mode.AverageTime) -@Fork(value = 1, warmups = 0) -@Measurement(batchSize = 1, iterations = 1, timeUnit = TimeUnit.MILLISECONDS) -@Warmup(batchSize = 0, iterations = 0) -@OutputTimeUnit(TimeUnit.MILLISECONDS) -public class SessionPoolMaintainerBenchmark { - private static final String TEST_PROJECT = "my-project"; - private static final String TEST_INSTANCE = "my-instance"; - private static final String TEST_DATABASE = "my-database"; - private static final int HOLD_SESSION_TIME = 10; - private static final int RND_WAIT_TIME_BETWEEN_REQUESTS = 100; - private static final Random RND = new Random(); - - @State(Scope.Thread) - @AuxCounters(org.openjdk.jmh.annotations.AuxCounters.Type.EVENTS) - public static class MockServer { - private StandardBenchmarkMockServer mockServer; - private Spanner spanner; - private DatabaseClientImpl client; - - /** - * The tests set the session idle timeout to an extremely low value to force timeouts and - * sessions to be evicted from the pool. This is not intended to replicate a realistic scenario, - * only to detect whether certain changes to the client library might cause the number of RPCs - * or the execution time to change drastically. - */ - @Param({"100"}) - long idleTimeout; - - /** AuxCounter for number of create RPCs. */ - public int numBatchCreateSessionsRpcs() { - return mockServer.countRequests(BatchCreateSessionsRequest.class); - } - - /** AuxCounter for number of delete RPCs. */ - public int numDeleteSessionRpcs() { - return mockServer.countRequests(DeleteSessionRequest.class); - } - - /** AuxCounter for number of begin tx RPCs. */ - public int numBeginTransactionRpcs() { - return mockServer.countRequests(BeginTransactionRequest.class); - } - - @Setup(Level.Invocation) - public void setup() throws Exception { - mockServer = new StandardBenchmarkMockServer(); - TransportChannelProvider channelProvider = mockServer.start(); - - SpannerOptions options = - SpannerOptions.newBuilder() - .setProjectId(TEST_PROJECT) - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption( - SessionPoolOptions.newBuilder() - // Set idle timeout and loop frequency to very low values. - .setRemoveInactiveSessionAfterDuration(Duration.ofMillis(idleTimeout)) - .setLoopFrequency(idleTimeout / 10) - .build()) - .build(); - - spanner = options.getService(); - client = - (DatabaseClientImpl) - spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - // Wait until the session pool has initialized. - while (client.pool.getNumberOfSessionsInPool() - < spanner.getOptions().getSessionPoolOptions().getMinSessions()) { - Thread.sleep(1L); - } - } - - @TearDown(Level.Invocation) - public void teardown() throws Exception { - spanner.close(); - mockServer.shutdown(); - } - } - - /** Measures the time and RPCs needed to execute read requests. */ - @Benchmark - public void read(final MockServer server) throws Exception { - int min = server.spanner.getOptions().getSessionPoolOptions().getMinSessions(); - int max = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions(); - int totalQueries = max * 4; - int parallelThreads = min; - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(min); - - ListeningScheduledExecutorService service = - MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); - List> futures = new ArrayList<>(totalQueries); - for (int i = 0; i < totalQueries; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - try (ResultSet rs = - client.singleUse().executeQuery(StandardBenchmarkMockServer.SELECT1)) { - while (rs.next()) { - Thread.sleep(RND.nextInt(HOLD_SESSION_TIME)); - } - return null; - } - })); - } - Futures.allAsList(futures).get(); - service.shutdown(); - } - - /** Measures the time and RPCs needed to execute write requests. */ - @Benchmark - public void write(final MockServer server) throws Exception { - int min = server.spanner.getOptions().getSessionPoolOptions().getMinSessions(); - int max = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions(); - int totalWrites = max * 4; - int parallelThreads = max; - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(min); - - ListeningScheduledExecutorService service = - MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); - List> futures = new ArrayList<>(totalWrites); - for (int i = 0; i < totalWrites; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - TransactionRunner runner = client.readWriteTransaction(); - return runner.run( - transaction -> - transaction.executeUpdate(StandardBenchmarkMockServer.UPDATE_STATEMENT)); - })); - } - Futures.allAsList(futures).get(); - service.shutdown(); - } - - /** Measures the time and RPCs needed to execute read and write requests. */ - @Benchmark - public void readAndWrite(final MockServer server) throws Exception { - int min = server.spanner.getOptions().getSessionPoolOptions().getMinSessions(); - int max = server.spanner.getOptions().getSessionPoolOptions().getMaxSessions(); - int totalWrites = max * 2; - int totalReads = max * 2; - int parallelThreads = max; - final DatabaseClient client = - server.spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE)); - SessionPool pool = ((DatabaseClientImpl) client).pool; - assertThat(pool.totalSessions()).isEqualTo(min); - - ListeningScheduledExecutorService service = - MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(parallelThreads)); - List> futures = new ArrayList<>(totalReads + totalWrites); - for (int i = 0; i < totalWrites; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - TransactionRunner runner = client.readWriteTransaction(); - return runner.run( - transaction -> - transaction.executeUpdate(StandardBenchmarkMockServer.UPDATE_STATEMENT)); - })); - } - for (int i = 0; i < totalReads; i++) { - futures.add( - service.submit( - () -> { - Thread.sleep(RND.nextInt(RND_WAIT_TIME_BETWEEN_REQUESTS)); - try (ResultSet rs = - client.singleUse().executeQuery(StandardBenchmarkMockServer.SELECT1)) { - while (rs.next()) { - Thread.sleep(RND.nextInt(HOLD_SESSION_TIME)); - } - return null; - } - })); - } - Futures.allAsList(futures).get(); - service.shutdown(); - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerMockServerTest.java deleted file mode 100644 index 99a773eeb0f..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerMockServerTest.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; - -import com.google.cloud.NoCredentials; -import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; -import com.google.common.base.Stopwatch; -import com.google.protobuf.ListValue; -import com.google.protobuf.Value; -import com.google.spanner.v1.BatchCreateSessionsRequest; -import com.google.spanner.v1.ExecuteSqlRequest; -import com.google.spanner.v1.ResultSetMetadata; -import com.google.spanner.v1.StructType; -import com.google.spanner.v1.StructType.Field; -import com.google.spanner.v1.Type; -import com.google.spanner.v1.TypeCode; -import java.time.Duration; -import java.util.concurrent.TimeUnit; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class SessionPoolMaintainerMockServerTest extends AbstractMockServerTest { - private final FakeClock clock = new FakeClock(); - - @BeforeClass - public static void setupResults() { - mockSpanner.putStatementResult( - StatementResult.query( - Statement.of("SELECT 1"), - com.google.spanner.v1.ResultSet.newBuilder() - .setMetadata( - ResultSetMetadata.newBuilder() - .setRowType( - StructType.newBuilder() - .addFields( - Field.newBuilder() - .setName("C") - .setType(Type.newBuilder().setCode(TypeCode.INT64).build()) - .build()) - .build()) - .build()) - .addRows( - ListValue.newBuilder() - .addValues(Value.newBuilder().setStringValue("1").build()) - .build()) - .build())); - } - - @Before - public void createSpannerInstance() { - clock.currentTimeMillis.set(System.currentTimeMillis()); - spanner = - SpannerOptions.newBuilder() - .setProjectId("p") - .setChannelProvider(channelProvider) - .setCredentials(NoCredentials.getInstance()) - .setSessionPoolOption( - SessionPoolOptions.newBuilder() - .setPoolMaintainerClock(clock) - .setWaitForMinSessionsDuration(Duration.ofSeconds(10L)) - .setFailOnSessionLeak() - .build()) - .build() - .getService(); - } - - @Test - public void testMaintain() { - int minSessions = spanner.getOptions().getSessionPoolOptions().getMinSessions(); - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - assertEquals(minSessions, mockSpanner.getSessions().size()); - assertEquals(0, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - clock.currentTimeMillis.addAndGet(Duration.ofMinutes(35).toMillis()); - client.pool.poolMaintainer.maintainPool(); - assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - client.pool.poolMaintainer.maintainPool(); - assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - clock.currentTimeMillis.addAndGet(Duration.ofMinutes(21).toMillis()); - - // Most sessions are considered idle and are removed. Freeze the mock Spanner server to prevent - // the replenish action to fill the pool again before we check the number of sessions in the - // pool. - mockSpanner.freeze(); - client.pool.poolMaintainer.maintainPool(); - assertEquals(2, client.pool.totalSessions()); - mockSpanner.unfreeze(); - - // The pool should be replenished. - client.pool.poolMaintainer.maintainPool(); - assertEquals(minSessions, client.pool.getTotalSessionsPlusNumSessionsBeingCreated()); - Stopwatch watch = Stopwatch.createStarted(); - //noinspection StatementWithEmptyBody - while (client.pool.totalSessions() < minSessions - && watch.elapsed(TimeUnit.MILLISECONDS) - < spanner.getOptions().getSessionPoolOptions().getWaitForMinSessions().toMillis()) { - // wait for the pool to be replenished. - } - assertEquals(minSessions, client.pool.totalSessions()); - } - - @Test - public void testSessionNotFoundIsRetried() { - assumeFalse( - "Session not found errors are not relevant for multiplexed sessions", - spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - - int minSessions = spanner.getOptions().getSessionPoolOptions().getMinSessions(); - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - assertEquals(minSessions, mockSpanner.getSessions().size()); - - // Remove all sessions from the backend. - mockSpanner.getSessions().clear(); - - // Sessions have been removed from the backend, but this will still succeed, as Session not - // found errors are retried by the client. - try (ResultSet resultSet = client.singleUse().executeQuery(Statement.of("SELECT 1"))) { - assertTrue(resultSet.next()); - assertEquals(1L, resultSet.getLong(0)); - assertFalse(resultSet.next()); - } - - int numRequests = mockSpanner.countRequestsOfType(ExecuteSqlRequest.class); - assertTrue( - String.format("Number of requests should be larger than 1, but was %d", numRequests), - numRequests > 1); - } - - @Test - public void testMaintainerReplenishesPoolIfAllAreInvalid() { - int minSessions = spanner.getOptions().getSessionPoolOptions().getMinSessions(); - DatabaseClientImpl client = - (DatabaseClientImpl) spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); - assertEquals(minSessions, mockSpanner.getSessions().size()); - - // Remove all sessions from the backend. - mockSpanner.getSessions().clear(); - // Advance the clock of the maintainer to mark all sessions are eligible for maintenance. - clock.currentTimeMillis.addAndGet(Duration.ofMinutes(35).toMillis()); - // Run the maintainer. This will ping one session, which again will cause it to be replaced. - client.pool.poolMaintainer.maintainPool(); - assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); - - // The session will be replaced using a single BatchCreateSessions call. - Stopwatch watch = Stopwatch.createStarted(); - //noinspection StatementWithEmptyBody - while (client.pool.totalSessions() < minSessions - && watch.elapsed(TimeUnit.MILLISECONDS) - < spanner.getOptions().getSessionPoolOptions().getWaitForMinSessions().toMillis()) { - // wait for the pool to be replenished. - } - assertEquals(minSessions, client.pool.totalSessions()); - assertEquals( - spanner.getOptions().getNumChannels() + 1, - mockSpanner.countRequestsOfType(BatchCreateSessionsRequest.class)); - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerTest.java deleted file mode 100644 index 276a3ac813f..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerTest.java +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import com.google.cloud.spanner.SessionClient.SessionConsumer; -import com.google.cloud.spanner.SessionPool.PooledSession; -import com.google.cloud.spanner.SessionPool.PooledSessionFuture; -import com.google.cloud.spanner.SessionPool.Position; -import com.google.cloud.spanner.SessionPool.SessionConsumerImpl; -import com.google.common.base.Preconditions; -import io.opencensus.trace.Tracing; -import io.opentelemetry.api.OpenTelemetry; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.Mock; -import org.mockito.Mockito; - -@RunWith(JUnit4.class) -public class SessionPoolMaintainerTest extends BaseSessionPoolTest { - private ExecutorService executor = Executors.newSingleThreadExecutor(); - private @Mock SpannerImpl client; - private @Mock SessionClient sessionClient; - private @Mock SpannerOptions spannerOptions; - private DatabaseId db = DatabaseId.of("projects/p/instances/i/databases/unused"); - private SessionPoolOptions options; - private FakeClock clock = new FakeClock(); - private List idledSessions = new ArrayList<>(); - private Map pingedSessions = new HashMap<>(); - - @Before - public void setUp() { - initMocks(this); - when(client.getOptions()).thenReturn(spannerOptions); - when(client.getSessionClient(db)).thenReturn(sessionClient); - when(sessionClient.getSpanner()).thenReturn(client); - when(spannerOptions.getNumChannels()).thenReturn(4); - when(spannerOptions.getDatabaseRole()).thenReturn("role"); - setupMockSessionCreation(); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxIdleSessions(1) - .setMaxSessions(5) - .setIncStep(1) - .setKeepAliveIntervalMinutes(2) - .setPoolMaintainerClock(clock) - .build(); - when(spannerOptions.getSessionPoolOptions()).thenReturn(options); - idledSessions.clear(); - pingedSessions.clear(); - } - - private void setupMockSessionCreation() { - doAnswer( - invocation -> { - executor.submit( - () -> { - int sessionCount = invocation.getArgument(0, Integer.class); - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - for (int i = 0; i < sessionCount; i++) { - ReadContext mockContext = mock(ReadContext.class); - consumer.onSessionReady( - setupMockSession(buildMockSession(client, mockContext), mockContext)); - } - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions( - Mockito.anyInt(), Mockito.anyBoolean(), any(SessionConsumer.class)); - } - - private SessionImpl setupMockSession(final SessionImpl session, final ReadContext mockContext) { - final ResultSet mockResult = mock(ResultSet.class); - when(mockContext.executeQuery(any(Statement.class))) - .thenAnswer( - invocation -> { - Integer currentValue = pingedSessions.get(session.getName()); - if (currentValue == null) { - currentValue = 0; - } - pingedSessions.put(session.getName(), ++currentValue); - return mockResult; - }); - when(mockResult.next()).thenReturn(true); - return session; - } - - private SessionPool createPool() throws Exception { - return createPool(this.options); - } - - private SessionPool createPool(SessionPoolOptions options) throws Exception { - // Allow sessions to be added to the head of the pool in all cases in this test, as it is - // otherwise impossible to know which session exactly is getting pinged at what point in time. - SessionPool pool = - SessionPool.createPool( - options, - new TestExecutorFactory(), - client.getSessionClient(db), - clock, - Position.FIRST, - new TraceWrapper(Tracing.getTracer(), OpenTelemetry.noop().getTracer(""), false), - OpenTelemetry.noop()); - pool.idleSessionRemovedListener = - input -> { - idledSessions.add(input); - return null; - }; - // Wait until pool has initialized. - while (pool.totalSessions() < options.getMinSessions()) { - Thread.sleep(1L); - } - return pool; - } - - @Test - public void testKeepAlive() throws Exception { - SessionPool pool = createPool(); - assertThat(pingedSessions).isEmpty(); - // Run one maintenance loop. No sessions should get a keep-alive ping. - runMaintenanceLoop(clock, pool, 1); - assertThat(pingedSessions).isEmpty(); - - // Checkout two sessions and do a maintenance loop. Still no sessions should be getting any - // pings. - Session session1 = pool.getSession(); - Session session2 = pool.getSession(); - runMaintenanceLoop(clock, pool, 1); - assertThat(pingedSessions).isEmpty(); - - // Check the sessions back into the pool and do a maintenance loop. - session2.close(); - session1.close(); - runMaintenanceLoop(clock, pool, 1); - assertThat(pingedSessions).isEmpty(); - - // Now advance the time enough for both sessions in the pool to be idled. Then do one - // maintenance loop. This should cause the last session to have been checked back into the pool - // to get a ping, but not the second session. - clock.currentTimeMillis.addAndGet( - TimeUnit.MINUTES.toMillis(options.getKeepAliveIntervalMinutes()) + 1); - runMaintenanceLoop(clock, pool, 1); - assertThat(pingedSessions).containsExactly(session1.getName(), 1); - // Do another maintenance loop. This should cause the other session to also get a ping. - runMaintenanceLoop(clock, pool, 1); - assertThat(pingedSessions).containsExactly(session1.getName(), 1, session2.getName(), 1); - - // Now check out three sessions so the pool will create an additional session. The pool will - // only keep 2 sessions alive, as that is the setting for MinSessions. - Session session3 = pool.getSession(); - Session session4 = pool.getSession(); - Session session5 = pool.getSession(); - // Pinging a session will put it at the back of the pool. A session that needed a ping to be - // kept alive is not one that should be preferred for use. This means that session2 is the last - // session in the pool, and session1 the second-to-last. - assertEquals(session1.getName(), session3.getName()); - assertEquals(session2.getName(), session4.getName()); - session5.close(); - session4.close(); - session3.close(); - // Advance the clock to force pings for the sessions in the pool and do three maintenance loops. - // This should ping the sessions in the following order: - // 1. session3 (=session1) - // 2. session4 (=session2) - // The pinged sessions already contains: {session1: 1, session2: 1} - // Note that the pool only pings up to MinSessions sessions. - clock.currentTimeMillis.addAndGet( - TimeUnit.MINUTES.toMillis(options.getKeepAliveIntervalMinutes()) + 1); - runMaintenanceLoop(clock, pool, 3); - assertThat(pingedSessions).containsExactly(session1.getName(), 2, session2.getName(), 2); - - // Advance the clock to idle all sessions in the pool again and then check out one session. This - // should cause only one session to get a ping. - clock.currentTimeMillis.addAndGet( - TimeUnit.MINUTES.toMillis(options.getKeepAliveIntervalMinutes()) + 1); - // This will be session1, as all sessions were pinged in the previous 3 maintenance loops, and - // this will have brought session1 back to the front of the pool. - Session session6 = pool.getSession(); - // The session that was first in the pool now is equal to the initial first session as each full - // round of pings will swap the order of the first MinSessions sessions in the pool. - assertThat(session6.getName()).isEqualTo(session1.getName()); - runMaintenanceLoop(clock, pool, 3); - // Running 3 cycles will only ping the 2 sessions in the pool once. - assertThat(pool.totalSessions()).isEqualTo(3); - assertThat(pingedSessions).containsExactly(session1.getName(), 2, session2.getName(), 3); - // Update the last use date and release the session to the pool and do another maintenance - // cycle. This should not ping any sessions. - ((PooledSessionFuture) session6).get().markUsed(); - session6.close(); - runMaintenanceLoop(clock, pool, 3); - assertThat(pingedSessions).containsExactly(session1.getName(), 2, session2.getName(), 3); - - // Now check out 3 sessions again and make sure the 'extra' session is checked in last. That - // will make it eligible for pings. - Session session7 = pool.getSession(); - Session session8 = pool.getSession(); - Session session9 = pool.getSession(); - - assertThat(session7.getName()).isEqualTo(session1.getName()); - assertThat(session8.getName()).isEqualTo(session2.getName()); - assertThat(session9.getName()).isEqualTo(session5.getName()); - - session7.close(); - session8.close(); - session9.close(); - - clock.currentTimeMillis.addAndGet( - TimeUnit.MINUTES.toMillis(options.getKeepAliveIntervalMinutes()) + 1); - runMaintenanceLoop(clock, pool, 3); - // session1 will not get a ping this time, as it was checked in first and is now the last - // session in the pool. - assertThat(pingedSessions) - .containsExactly(session1.getName(), 2, session2.getName(), 4, session5.getName(), 1); - } - - @Test - public void testIdleSessions() throws Exception { - SessionPool pool = createPool(); - long loopsToIdleSessions = - Double.valueOf( - Math.ceil( - (double) options.getRemoveInactiveSessionAfter().toMillis() - / pool.poolMaintainer.loopFrequency)) - .longValue() - + 2L; - assertThat(idledSessions).isEmpty(); - // Run one maintenance loop. No sessions should be removed from the pool. - runMaintenanceLoop(clock, pool, 1); - assertThat(idledSessions).isEmpty(); - - // Checkout two sessions and do a maintenance loop. Still no sessions should be removed. - Session session1 = pool.getSession(); - Session session2 = pool.getSession(); - runMaintenanceLoop(clock, pool, 1); - assertThat(idledSessions).isEmpty(); - - // Check the sessions back into the pool and do a maintenance loop. - session2.close(); - session1.close(); - runMaintenanceLoop(clock, pool, 1); - assertThat(idledSessions).isEmpty(); - - // Now advance the time enough for both sessions in the pool to be idled. Both sessions should - // be kept alive by the maintainer and remain in the pool. - runMaintenanceLoop(clock, pool, loopsToIdleSessions); - assertThat(idledSessions).isEmpty(); - - // Now check out three sessions so the pool will create an additional session. The pool will - // only keep 2 sessions alive, as that is the setting for MinSessions. - Session session3 = pool.getSession().get(); - Session session4 = pool.getSession().get(); - Session session5 = pool.getSession().get(); - // Note that pinging sessions does not change the order of the pool. This means that session2 - // is still the last session in the pool. - assertThat(session3.getName()).isEqualTo(session1.getName()); - assertThat(session4.getName()).isEqualTo(session2.getName()); - session5.close(); - session4.close(); - session3.close(); - // Advance the clock to idle sessions. The pool will keep session4 and session3 alive, session5 - // will be idled and removed. - runMaintenanceLoop(clock, pool, loopsToIdleSessions); - assertThat(idledSessions).containsExactly(session5); - assertThat(pool.totalSessions()).isEqualTo(2); - - // Check out three sessions again and keep one session checked out. - Session session6 = pool.getSession().get(); - Session session7 = pool.getSession().get(); - Session session8 = pool.getSession().get(); - session8.close(); - session7.close(); - // Now advance the clock to idle sessions. This should remove session8 from the pool. - runMaintenanceLoop(clock, pool, loopsToIdleSessions); - assertThat(idledSessions).containsExactly(session5, session8); - assertThat(pool.totalSessions()).isEqualTo(2); - ((PooledSession) session6).markUsed(); - session6.close(); - - // Check out three sessions and keep them all checked out. No sessions should be removed from - // the pool. - Session session9 = pool.getSession().get(); - Session session10 = pool.getSession().get(); - Session session11 = pool.getSession().get(); - runMaintenanceLoop(clock, pool, loopsToIdleSessions); - assertThat(idledSessions).containsExactly(session5, session8); - assertThat(pool.totalSessions()).isEqualTo(3); - // Return the sessions to the pool. As they have not been used, they are all into idle time. - // Running the maintainer will now remove all the sessions from the pool and then start the - // replenish method. - session9.close(); - session10.close(); - session11.close(); - runMaintenanceLoop(clock, pool, 1); - assertThat(idledSessions).containsExactly(session5, session8, session9, session10, session11); - // Check that the pool is replenished. - while (pool.totalSessions() < options.getMinSessions()) { - Thread.sleep(1L); - } - assertThat(pool.totalSessions()).isEqualTo(options.getMinSessions()); - } - - @Test - public void testRandomizeThreshold() throws Exception { - SessionPool pool = - createPool( - this.options.toBuilder() - .setMaxSessions(400) - .setLoopFrequency(1000L) - .setRandomizePositionQPSThreshold(4) - .build()); - List sessions; - - // Run a maintenance loop. No sessions have been checked out so far, so the TPS should be 0. - runMaintenanceLoop(clock, pool, 1); - assertFalse(pool.shouldRandomize()); - - // Get and return one session. This means TPS == 1. - returnSessions(1, useSessions(1, pool)); - runMaintenanceLoop(clock, pool, 1); - assertFalse(pool.shouldRandomize()); - - // Get and return four sessions. This means TPS == 4, and that no sessions are checked out. - returnSessions(4, useSessions(4, pool)); - runMaintenanceLoop(clock, pool, 1); - assertFalse(pool.shouldRandomize()); - - // Get four sessions without returning them. - // This means TPS == 4 and that they are all still checked out. - sessions = useSessions(4, pool); - runMaintenanceLoop(clock, pool, 1); - assertTrue(pool.shouldRandomize()); - // Returning one of the sessions reduces the number of checked out sessions enough to stop the - // randomizing. - returnSessions(1, sessions); - runMaintenanceLoop(clock, pool, 1); - assertFalse(pool.shouldRandomize()); - - // Get three more session and run the maintenance loop. - // The TPS is then 3, as we've only gotten 3 sessions since the last maintenance run. - // That means that we should not randomize. - sessions.addAll(useSessions(3, pool)); - runMaintenanceLoop(clock, pool, 1); - assertFalse(pool.shouldRandomize()); - - returnSessions(sessions.size(), sessions); - } - - private List useSessions(int numSessions, SessionPool pool) { - List sessions = new ArrayList<>(numSessions); - for (int i = 0; i < numSessions; i++) { - sessions.add(pool.getSession()); - sessions.get(sessions.size() - 1).singleUse().executeQuery(Statement.of("SELECT 1")).next(); - } - return sessions; - } - - private void returnSessions(int numSessions, List sessions) { - Preconditions.checkArgument(numSessions <= sessions.size()); - for (int i = 0; i < numSessions; i++) { - sessions.remove(0).close(); - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolStressTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolStressTest.java deleted file mode 100644 index 33771962828..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolStressTest.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.common.truth.Truth.assertThat; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.cloud.spanner.SessionClient.SessionConsumer; -import com.google.cloud.spanner.SessionPool.PooledSessionFuture; -import com.google.cloud.spanner.SessionPool.Position; -import com.google.cloud.spanner.SessionPool.SessionConsumerImpl; -import com.google.cloud.spanner.SessionPoolOptions.ActionOnInactiveTransaction; -import com.google.cloud.spanner.SessionPoolOptions.InactiveTransactionRemovalOptions; -import com.google.cloud.spanner.spi.v1.SpannerRpc.Option; -import com.google.common.util.concurrent.Uninterruptibles; -import com.google.protobuf.Empty; -import io.opencensus.trace.Tracing; -import io.opentelemetry.api.OpenTelemetry; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameter; -import org.junit.runners.Parameterized.Parameters; -import org.mockito.Mockito; - -/** - * Stress test for {@code SessionPool} which does multiple operations on the pool, making some of - * them fail and asserts that all the invariants are maintained. - */ -@RunWith(Parameterized.class) -public class SessionPoolStressTest extends BaseSessionPoolTest { - - @Parameter(0) - public boolean shouldBlock; - - DatabaseId db = DatabaseId.of("projects/p/instances/i/databases/unused"); - SessionPool pool; - ExecutorService createExecutor = Executors.newSingleThreadExecutor(); - final Object lock = new Object(); - Random random = new Random(); - FakeClock clock = new FakeClock(); - final Map sessions = new ConcurrentHashMap<>(); - // Exception keeps track of where the session was closed at. - Map closedSessions = new HashMap<>(); - Set expiredSessions = new HashSet<>(); - SpannerImpl mockSpanner; - SpannerOptions spannerOptions; - int maxAliveSessions; - int minSessionsWhenSessionClosed = Integer.MAX_VALUE; - Exception e; - - @Parameters(name = "should block = {0}") - public static Collection data() { - List params = new ArrayList<>(); - params.add(new Object[] {true}); - params.add(new Object[] {false}); - return params; - } - - private void setupSpanner(DatabaseId db) { - ReadContext context = mock(ReadContext.class); - mockSpanner = mock(SpannerImpl.class); - spannerOptions = mock(SpannerOptions.class); - when(spannerOptions.getNumChannels()).thenReturn(4); - when(spannerOptions.getDatabaseRole()).thenReturn("role"); - SessionClient sessionClient = mock(SessionClient.class); - when(sessionClient.getSpanner()).thenReturn(mockSpanner); - when(mockSpanner.getSessionClient(db)).thenReturn(sessionClient); - when(mockSpanner.getOptions()).thenReturn(spannerOptions); - doAnswer( - invocation -> { - createExecutor.submit( - () -> { - int sessionCount = invocation.getArgument(0, Integer.class); - for (int s = 0; s < sessionCount; s++) { - SessionImpl session; - synchronized (lock) { - session = getMockedSession(mockSpanner, context); - setupSession(session, context); - sessions.put(session.getName(), false); - if (sessions.size() > maxAliveSessions) { - maxAliveSessions = sessions.size(); - } - } - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(session); - } - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions( - Mockito.anyInt(), Mockito.anyBoolean(), Mockito.any(SessionConsumer.class)); - } - - SessionImpl getMockedSession(SpannerImpl spanner, ReadContext context) { - Map options = new HashMap<>(); - options.put(Option.CHANNEL_HINT, channelHint.getAndIncrement()); - final SessionImpl session = - new SessionImpl( - spanner, - new SessionReference( - "projects/dummy/instances/dummy/databases/dummy/sessions/session" + sessionIndex, - options)) { - @Override - public ReadContext singleUse(TimestampBound bound) { - // The below stubs are added so that we can mock keep-alive. - return context; - } - - @Override - public ApiFuture asyncClose() { - synchronized (lock) { - if (expiredSessions.contains(this.getName())) { - return ApiFutures.immediateFailedFuture( - SpannerExceptionFactoryTest.newSessionNotFoundException(this.getName())); - } - if (sessions.remove(this.getName()) == null) { - setFailed(closedSessions.get(this.getName())); - } - closedSessions.put(this.getName(), new Exception("Session closed at:")); - if (sessions.size() < minSessionsWhenSessionClosed) { - minSessionsWhenSessionClosed = sessions.size(); - } - } - return ApiFutures.immediateFuture(Empty.getDefaultInstance()); - } - }; - sessionIndex++; - return session; - } - - private void setupSession(final SessionImpl session, final ReadContext mockContext) { - final ResultSet mockResult = mock(ResultSet.class); - when(mockContext.executeQuery(any(Statement.class))) - .thenAnswer( - invocation -> { - resetTransaction(session); - return mockResult; - }); - when(mockResult.next()).thenReturn(true); - } - - private void resetTransaction(SessionImpl session) { - String name = session.getName(); - synchronized (lock) { - sessions.put(name, false); - } - } - - private void setFailed(Exception cause) { - e = new Exception(cause); - } - - private void setFailed() { - e = new Exception(); - } - - private Exception getFailedError() { - synchronized (lock) { - return e; - } - } - - @Test - public void stressTest() throws Exception { - int concurrentThreads = 10; - final int numOperationsPerThread = 1000; - final CountDownLatch releaseThreads = new CountDownLatch(1); - final CountDownLatch threadsDone = new CountDownLatch(concurrentThreads); - setupSpanner(db); - int minSessions = 2; - int maxSessions = concurrentThreads / 2; - SessionPoolOptions.Builder builder = - SessionPoolOptions.newBuilder() - .setPoolMaintainerClock(clock) - .setMinSessions(minSessions) - .setMaxSessions(maxSessions) - .setInactiveTransactionRemovalOptions( - InactiveTransactionRemovalOptions.newBuilder() - .setActionOnInactiveTransaction(ActionOnInactiveTransaction.CLOSE) - .build()); - if (shouldBlock) { - builder.setBlockIfPoolExhausted(); - } else { - builder.setFailIfPoolExhausted(); - } - SessionPoolOptions sessionPoolOptions = builder.build(); - when(spannerOptions.getSessionPoolOptions()).thenReturn(sessionPoolOptions); - pool = - SessionPool.createPool( - sessionPoolOptions, - new TestExecutorFactory(), - mockSpanner.getSessionClient(db), - clock, - Position.RANDOM, - new TraceWrapper(Tracing.getTracer(), OpenTelemetry.noop().getTracer(""), false), - OpenTelemetry.noop()); - pool.idleSessionRemovedListener = - pooled -> { - String name = pooled.getName(); - // We do not take the test lock here, as we already hold the session pool lock. Taking the - // test lock as well here can cause a deadlock. - sessions.remove(name); - return null; - }; - pool.longRunningSessionRemovedListener = - pooled -> { - String name = pooled.getName(); - // We do not take the test lock here, as we already hold the session pool lock. Taking the - // test lock as well here can cause a deadlock. - sessions.remove(name); - return null; - }; - for (int i = 0; i < concurrentThreads; i++) { - new Thread( - () -> { - Uninterruptibles.awaitUninterruptibly(releaseThreads); - for (int j = 0; j < numOperationsPerThread; j++) { - try { - PooledSessionFuture session = pool.getSession(); - session.get(); - Uninterruptibles.sleepUninterruptibly(random.nextInt(2), TimeUnit.MILLISECONDS); - resetTransaction(session.get().delegate); - session.close(); - } catch (SpannerException e) { - if (e.getErrorCode() != ErrorCode.RESOURCE_EXHAUSTED || shouldBlock) { - setFailed(e); - } - } catch (Exception e) { - setFailed(e); - } - } - threadsDone.countDown(); - }) - .start(); - } - // Start maintenance threads in tight loop - final AtomicBoolean stopMaintenance = new AtomicBoolean(false); - new Thread( - () -> { - while (!stopMaintenance.get()) { - runMaintenanceLoop(clock, pool, 1); - // Sleep 1ms between maintenance loops to prevent the long-running session remover - // from stealing all sessions before they can be used. - Uninterruptibles.sleepUninterruptibly(1L, TimeUnit.MILLISECONDS); - } - }) - .start(); - releaseThreads.countDown(); - threadsDone.await(); - synchronized (lock) { - assertThat(pool.totalSessions()).isAtMost(maxSessions); - } - stopMaintenance.set(true); - pool.closeAsync(new SpannerImpl.ClosedException()).get(); - Exception e = getFailedError(); - if (e != null) { - throw e; - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java deleted file mode 100644 index 8d00f0889b8..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java +++ /dev/null @@ -1,2336 +0,0 @@ -/* - * Copyright 2017 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.cloud.spanner.MetricRegistryConstants.GET_SESSION_TIMEOUTS; -import static com.google.cloud.spanner.MetricRegistryConstants.IS_MULTIPLEXED_KEY; -import static com.google.cloud.spanner.MetricRegistryConstants.MAX_ALLOWED_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.MAX_IN_USE_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.METRIC_PREFIX; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_ACQUIRED_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_IN_USE_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_READ_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_RELEASED_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_SESSIONS_AVAILABLE; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_SESSIONS_BEING_PREPARED; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_SESSIONS_IN_POOL; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_SESSIONS_IN_USE; -import static com.google.cloud.spanner.MetricRegistryConstants.NUM_WRITE_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.SPANNER_DEFAULT_LABEL_VALUES; -import static com.google.cloud.spanner.MetricRegistryConstants.SPANNER_LABEL_KEYS; -import static com.google.cloud.spanner.MetricRegistryConstants.SPANNER_LABEL_KEYS_WITH_MULTIPLEXED_SESSIONS; -import static com.google.cloud.spanner.MetricRegistryConstants.SPANNER_LABEL_KEYS_WITH_TYPE; -import static com.google.cloud.spanner.SpannerOptionsTest.runWithSystemProperty; -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThrows; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyInt; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.atMost; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import com.google.api.core.ApiFutures; -import com.google.cloud.Timestamp; -import com.google.cloud.spanner.ErrorHandler.DefaultErrorHandler; -import com.google.cloud.spanner.MetricRegistryTestUtils.FakeMetricRegistry; -import com.google.cloud.spanner.MetricRegistryTestUtils.MetricsRecord; -import com.google.cloud.spanner.MetricRegistryTestUtils.PointWithFunction; -import com.google.cloud.spanner.ReadContext.QueryAnalyzeMode; -import com.google.cloud.spanner.SessionClient.SessionConsumer; -import com.google.cloud.spanner.SessionPool.PooledSession; -import com.google.cloud.spanner.SessionPool.PooledSessionFuture; -import com.google.cloud.spanner.SessionPool.Position; -import com.google.cloud.spanner.SessionPool.SessionConsumerImpl; -import com.google.cloud.spanner.SpannerImpl.ClosedException; -import com.google.cloud.spanner.TransactionRunner.TransactionCallable; -import com.google.cloud.spanner.TransactionRunnerImpl.TransactionContextImpl; -import com.google.cloud.spanner.spi.v1.SpannerRpc; -import com.google.cloud.spanner.spi.v1.SpannerRpc.ResultStreamConsumer; -import com.google.cloud.spanner.v1.stub.SpannerStubSettings; -import com.google.common.base.Stopwatch; -import com.google.common.collect.Lists; -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.Uninterruptibles; -import com.google.protobuf.ByteString; -import com.google.protobuf.Empty; -import com.google.spanner.v1.CommitRequest; -import com.google.spanner.v1.CommitResponse; -import com.google.spanner.v1.ExecuteBatchDmlRequest; -import com.google.spanner.v1.ExecuteSqlRequest; -import com.google.spanner.v1.ResultSetStats; -import com.google.spanner.v1.RollbackRequest; -import com.google.spanner.v1.Transaction; -import com.google.spanner.v1.TransactionOptions; -import io.opencensus.metrics.LabelValue; -import io.opencensus.metrics.MetricRegistry; -import io.opencensus.metrics.Metrics; -import io.opencensus.trace.Tracing; -import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.api.common.AttributeKey; -import io.opentelemetry.api.common.Attributes; -import io.opentelemetry.api.common.AttributesBuilder; -import io.opentelemetry.api.trace.Span; -import io.opentelemetry.context.Scope; -import io.opentelemetry.sdk.OpenTelemetrySdk; -import io.opentelemetry.sdk.metrics.SdkMeterProvider; -import io.opentelemetry.sdk.metrics.data.LongPointData; -import io.opentelemetry.sdk.metrics.data.MetricData; -import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.time.Duration; -import java.time.Instant; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicLong; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.stream.Collectors; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameter; -import org.junit.runners.Parameterized.Parameters; -import org.mockito.Mock; -import org.mockito.Mockito; - -/** Tests for SessionPool that mock out the underlying stub. */ -@RunWith(Parameterized.class) -public class SessionPoolTest extends BaseSessionPoolTest { - private static Level originalLogLevel; - - private final ExecutorService executor = Executors.newSingleThreadExecutor(); - @Parameter public int minSessions; - - @Mock SpannerImpl client; - @Mock SessionClient sessionClient; - @Mock SpannerOptions spannerOptions; - DatabaseId db = DatabaseId.of("projects/p/instances/i/databases/unused"); - SessionPool pool; - SessionPoolOptions options; - private String sessionName = String.format("%s/sessions/s", db.getName()); - private String TEST_DATABASE_ROLE = "my-role"; - - private final TraceWrapper tracer = - new TraceWrapper(Tracing.getTracer(), OpenTelemetry.noop().getTracer(""), false); - - @Parameters(name = "min sessions = {0}") - public static Collection data() { - return Arrays.asList(new Object[][] {{0}, {1}}); - } - - private SessionPool createPool() { - return SessionPool.createPool( - options, - new TestExecutorFactory(), - client.getSessionClient(db), - tracer, - OpenTelemetry.noop()); - } - - private SessionPool createPool(Clock clock) { - return SessionPool.createPool( - options, - new TestExecutorFactory(), - client.getSessionClient(db), - clock, - Position.RANDOM, - tracer, - OpenTelemetry.noop()); - } - - private SessionPool createPool( - Clock clock, MetricRegistry metricRegistry, List labelValues) { - return SessionPool.createPool( - options, - TEST_DATABASE_ROLE, - new TestExecutorFactory(), - client.getSessionClient(db), - clock, - Position.RANDOM, - metricRegistry, - tracer, - labelValues, - OpenTelemetry.noop(), - null, - new AtomicLong(), - new AtomicLong()); - } - - private SessionPool createPool( - Clock clock, - MetricRegistry metricRegistry, - List labelValues, - OpenTelemetry openTelemetry, - Attributes attributes) { - return SessionPool.createPool( - options, - TEST_DATABASE_ROLE, - new TestExecutorFactory(), - client.getSessionClient(db), - clock, - Position.RANDOM, - metricRegistry, - tracer, - labelValues, - openTelemetry, - attributes, - new AtomicLong(), - new AtomicLong()); - } - - @BeforeClass - public static void disableLogging() { - Logger logger = Logger.getLogger(""); - originalLogLevel = logger.getLevel(); - logger.setLevel(Level.OFF); - } - - @AfterClass - public static void resetLogging() { - Logger logger = Logger.getLogger(""); - logger.setLevel(originalLogLevel); - } - - @Before - public void setUp() { - initMocks(this); - SpannerOptions.resetActiveTracingFramework(); - SpannerOptions.enableOpenTelemetryTraces(); - when(client.getOptions()).thenReturn(spannerOptions); - when(client.getSessionClient(db)).thenReturn(sessionClient); - when(sessionClient.getSpanner()).thenReturn(client); - when(spannerOptions.getNumChannels()).thenReturn(4); - when(spannerOptions.getDatabaseRole()).thenReturn("role"); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(minSessions) - .setMaxSessions(2) - .setIncStep(1) - .setBlockIfPoolExhausted() - .build(); - } - - private void setupMockSessionCreation() { - doAnswer( - invocation -> { - executor.submit( - () -> { - int sessionCount = invocation.getArgument(0, Integer.class); - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - for (int i = 0; i < sessionCount; i++) { - consumer.onSessionReady(mockSession()); - } - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions( - Mockito.anyInt(), Mockito.anyBoolean(), any(SessionConsumer.class)); - doAnswer( - invocation -> - executor.submit( - () -> { - SessionConsumer consumer = invocation.getArgument(0, SessionConsumer.class); - consumer.onSessionReady(mockMultiplexedSession()); - })) - .when(sessionClient) - .asyncCreateMultiplexedSession(any(SessionConsumer.class)); - } - - @Test - public void testClosedPoolIncludesClosedException() { - pool = createPool(); - assertTrue(pool.isValid()); - closePoolWithStacktrace(); - IllegalStateException e = assertThrows(IllegalStateException.class, () -> pool.getSession()); - assertThat(e.getCause()).isInstanceOf(ClosedException.class); - StringWriter sw = new StringWriter(); - e.getCause().printStackTrace(new PrintWriter(sw)); - assertThat(sw.toString()).contains("closePoolWithStacktrace"); - } - - private void closePoolWithStacktrace() { - pool.closeAsync(new SpannerImpl.ClosedException()); - } - - @Test - public void sessionCreation() { - setupMockSessionCreation(); - pool = createPool(); - try (Session session = pool.getSession()) { - assertThat(session).isNotNull(); - } - } - - @Test - public void poolLifo() { - setupMockSessionCreation(); - options = - options.toBuilder() - .setMinSessions(2) - .setWaitForMinSessionsDuration(Duration.ofSeconds(10L)) - .build(); - pool = createPool(); - pool.maybeWaitOnMinSessions(); - Session session1 = pool.getSession().get(); - Session session2 = pool.getSession().get(); - assertThat(session1).isNotEqualTo(session2); - - session2.close(); - session1.close(); - - // Check the session out and back in once more to finalize their positions. - session1 = pool.getSession().get(); - session2 = pool.getSession().get(); - session2.close(); - session1.close(); - - Session session3 = pool.getSession().get(); - Session session4 = pool.getSession().get(); - assertThat(session3).isEqualTo(session1); - assertThat(session4).isEqualTo(session2); - session3.close(); - session4.close(); - } - - @Test - public void poolFifo() throws Exception { - setupMockSessionCreation(); - runWithSystemProperty( - "com.google.cloud.spanner.session_pool_release_to_position", - "LAST", - () -> { - options = - options.toBuilder() - .setMinSessions(2) - .setWaitForMinSessionsDuration(Duration.ofSeconds(10L)) - .build(); - pool = createPool(); - pool.maybeWaitOnMinSessions(); - Session session1 = pool.getSession().get(); - Session session2 = pool.getSession().get(); - assertNotEquals(session1, session2); - - session2.close(); - session1.close(); - - // Check the session out and back in once more to finalize their positions. - session1 = pool.getSession().get(); - session2 = pool.getSession().get(); - session2.close(); - session1.close(); - - // Verify that we get the sessions in FIFO order, so in this order: - // 1. session2 - // 2. session1 - Session session3 = pool.getSession().get(); - Session session4 = pool.getSession().get(); - assertEquals(session2, session3); - assertEquals(session1, session4); - session3.close(); - session4.close(); - - return null; - }); - } - - @Test - public void poolAllPositions() throws Exception { - int maxAttempts = 100; - setupMockSessionCreation(); - for (Position position : Position.values()) { - runWithSystemProperty( - "com.google.cloud.spanner.session_pool_release_to_position", - position.name(), - () -> { - int attempt = 0; - while (attempt < maxAttempts) { - int numSessions = 5; - options = - options.toBuilder() - .setMinSessions(numSessions) - .setMaxSessions(numSessions) - .setWaitForMinSessionsDuration(Duration.ofSeconds(10L)) - .build(); - pool = createPool(); - pool.maybeWaitOnMinSessions(); - // First check out and release the sessions twice to the pool, so we know that we have - // finalized the position of them. - for (int n = 0; n < 2; n++) { - checkoutAndReleaseAllSessions(); - } - - // Now verify that if we get all sessions twice, they will be in random order. - List> allSessions = new ArrayList<>(2); - for (int n = 0; n < 2; n++) { - allSessions.add(checkoutAndReleaseAllSessions()); - } - List firstTime = - allSessions.get(0).stream() - .map(PooledSessionFuture::get) - .collect(Collectors.toList()); - List secondTime = - allSessions.get(1).stream() - .map(PooledSessionFuture::get) - .collect(Collectors.toList()); - switch (position) { - case FIRST: - // LIFO: - // First check out all sessions, so we have 1, 2, 3, 4, ..., N - // Then release them all back into the pool in the same order (1, 2, 3, 4, ..., N) - // That will give us the list N, ..., 4, 3, 2, 1 because each session is added at - // the front of the pool. - assertEquals(firstTime, Lists.reverse(secondTime)); - break; - case LAST: - // FIFO: - // First check out all sessions, so we have 1, 2, 3, 4, ..., N - // Then release them all back into the pool in the same order (1, 2, 3, 4, ..., N) - // That will give us the list 1, 2, 3, 4, ..., N because each session is added at - // the end of the pool. - assertEquals(firstTime, secondTime); - break; - case RANDOM: - // Random means that we should not get the same order twice (unless the randomizer - // got lucky, and then we retry). - if (attempt < (maxAttempts - 1)) { - if (Objects.equals(firstTime, secondTime)) { - attempt++; - continue; - } - } - assertNotEquals(firstTime, secondTime); - } - break; - } - return null; - }); - } - } - - private List checkoutAndReleaseAllSessions() { - List sessions = new ArrayList<>(pool.totalSessions()); - for (int i = 0; i < pool.totalSessions(); i++) { - sessions.add(pool.getSession()); - } - for (Session session : sessions) { - session.close(); - } - return sessions; - } - - @Test - public void poolClosure() throws Exception { - setupMockSessionCreation(); - pool = createPool(); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - @Test - public void poolClosureClosesLeakedSessions() throws Exception { - SessionImpl mockSession1 = mockSession(); - SessionImpl mockSession2 = mockSession(); - final LinkedList sessions = - new LinkedList<>(Arrays.asList(mockSession1, mockSession2)); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(sessions.pop()); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - pool = createPool(); - Session session1 = pool.getSession(); - // Leaked sessions - PooledSessionFuture leakedSession = pool.getSession(); - // Clear the leaked exception to suppress logging of expected exceptions. - leakedSession.clearLeakedException(); - session1.close(); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - verify(mockSession1).asyncClose(); - verify(mockSession2).asyncClose(); - } - - @Test - public void poolClosesWhenMaintenanceLoopIsRunning() throws Exception { - setupMockSessionCreation(); - final FakeClock clock = new FakeClock(); - pool = createPool(clock); - final AtomicBoolean stop = new AtomicBoolean(false); - new Thread( - () -> { - // Run in a tight loop. - while (!stop.get()) { - runMaintenanceLoop(clock, pool, 1); - } - }) - .start(); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - stop.set(true); - } - - @Test - public void poolClosureFailsPendingReadWaiters() throws Exception { - final CountDownLatch insideCreation = new CountDownLatch(1); - final CountDownLatch releaseCreation = new CountDownLatch(1); - final SessionImpl session1 = mockSession(); - final SessionImpl session2 = mockSession(); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(session1); - }); - return null; - }) - .doAnswer( - invocation -> { - executor.submit( - () -> { - insideCreation.countDown(); - releaseCreation.await(); - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(session2); - return null; - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - - pool = createPool(); - PooledSessionFuture leakedSession = pool.getSession(); - // Suppress expected leakedSession warning. - leakedSession.clearLeakedException(); - AtomicBoolean failed = new AtomicBoolean(false); - CountDownLatch latch = new CountDownLatch(1); - getSessionAsync(latch, failed); - insideCreation.await(); - pool.closeAsync(new SpannerImpl.ClosedException()); - releaseCreation.countDown(); - latch.await(5L, TimeUnit.SECONDS); - assertThat(failed.get()).isTrue(); - } - - @Test - public void poolClosureFailsPendingWriteWaiters() throws Exception { - final CountDownLatch insideCreation = new CountDownLatch(1); - final CountDownLatch releaseCreation = new CountDownLatch(1); - final SessionImpl session1 = mockSession(); - final SessionImpl session2 = mockSession(); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(session1); - }); - return null; - }) - .doAnswer( - invocation -> { - executor.submit( - () -> { - insideCreation.countDown(); - releaseCreation.await(); - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(session2); - return null; - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - - pool = createPool(); - PooledSessionFuture leakedSession = pool.getSession(); - // Suppress expected leakedSession warning. - leakedSession.clearLeakedException(); - AtomicBoolean failed = new AtomicBoolean(false); - CountDownLatch latch = new CountDownLatch(1); - getSessionAsync(latch, failed); - insideCreation.await(); - pool.closeAsync(new SpannerImpl.ClosedException()); - releaseCreation.countDown(); - latch.await(); - assertThat(failed.get()).isTrue(); - } - - @Test - public void poolClosesEvenIfCreationFails() throws Exception { - final CountDownLatch insideCreation = new CountDownLatch(1); - final CountDownLatch releaseCreation = new CountDownLatch(1); - doAnswer( - invocation -> { - executor.submit( - () -> { - insideCreation.countDown(); - releaseCreation.await(); - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionCreateFailure( - SpannerExceptionFactory.newSpannerException(new RuntimeException()), 1); - return null; - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - pool = createPool(); - AtomicBoolean failed = new AtomicBoolean(false); - CountDownLatch latch = new CountDownLatch(1); - getSessionAsync(latch, failed); - insideCreation.await(); - ListenableFuture f = pool.closeAsync(new SpannerImpl.ClosedException()); - releaseCreation.countDown(); - f.get(); - assertThat(f.isDone()).isTrue(); - } - - @Test - public void poolClosureFailsNewRequests() { - final SessionImpl session = mockSession(); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(session); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - pool = createPool(); - PooledSessionFuture leakedSession = pool.getSession(); - leakedSession.get(); - // Suppress expected leakedSession warning. - leakedSession.clearLeakedException(); - pool.closeAsync(new SpannerImpl.ClosedException()); - IllegalStateException e = assertThrows(IllegalStateException.class, () -> pool.getSession()); - assertNotNull(e.getMessage()); - } - - @Test - public void atMostMaxSessionsCreated() { - setupMockSessionCreation(); - AtomicBoolean failed = new AtomicBoolean(false); - pool = createPool(); - int numSessions = 10; - final CountDownLatch latch = new CountDownLatch(numSessions); - for (int i = 0; i < numSessions; i++) { - getSessionAsync(latch, failed); - } - Uninterruptibles.awaitUninterruptibly(latch); - verify(sessionClient, atMost(options.getMaxSessions())) - .asyncBatchCreateSessions(eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - assertThat(failed.get()).isFalse(); - } - - @Test - public void creationExceptionPropagatesToReadSession() { - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionCreateFailure( - SpannerExceptionFactory.newSpannerException(ErrorCode.INTERNAL, ""), 1); - return null; - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - pool = createPool(); - SpannerException e = assertThrows(SpannerException.class, () -> pool.getSession().get()); - assertEquals(ErrorCode.INTERNAL, e.getErrorCode()); - } - - @Test - public void failOnPoolExhaustion() { - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(1) - .setFailIfPoolExhausted() - .build(); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(mockSession()); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - pool = createPool(); - Session session1 = pool.getSession(); - SpannerException e = assertThrows(SpannerException.class, () -> pool.getSession()); - assertEquals(ErrorCode.RESOURCE_EXHAUSTED, e.getErrorCode()); - session1.close(); - session1 = pool.getSession(); - assertThat(session1).isNotNull(); - session1.close(); - } - - @Test - public void idleSessionCleanup() throws Exception { - ReadContext context = mock(ReadContext.class); - - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - .setIncStep(1) - .setMaxIdleSessions(0) - .setPoolMaintainerClock(clock) - .build(); - SpannerImpl spanner = mock(SpannerImpl.class); - SpannerOptions spannerOptions = mock(SpannerOptions.class); - when(spanner.getOptions()).thenReturn(spannerOptions); - when(spannerOptions.getSessionPoolOptions()).thenReturn(options); - SessionImpl session1 = buildMockSession(spanner, context); - SessionImpl session2 = buildMockSession(spanner, context); - SessionImpl session3 = buildMockSession(spanner, context); - final LinkedList sessions = - new LinkedList<>(Arrays.asList(session1, session2, session3)); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(sessions.pop()); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - - mockKeepAlive(context); - - pool = createPool(clock); - // Make sure pool has been initialized - pool.getSession().close(); - runMaintenanceLoop(clock, pool, pool.poolMaintainer.numClosureCycles); - assertThat(pool.numIdleSessionsRemoved()).isEqualTo(0L); - PooledSessionFuture readSession1 = pool.getSession(); - PooledSessionFuture readSession2 = pool.getSession(); - PooledSessionFuture readSession3 = pool.getSession(); - // Wait until the sessions have actually been gotten in order to make sure they are in use in - // parallel. - readSession1.get(); - readSession2.get(); - readSession3.get(); - readSession1.close(); - readSession2.close(); - readSession3.close(); - // Now there are 3 sessions in the pool but since none of them has timed out, they will all be - // kept in the pool. - runMaintenanceLoop(clock, pool, pool.poolMaintainer.numClosureCycles); - assertThat(pool.numIdleSessionsRemoved()).isEqualTo(0L); - // Counters have now been reset - // Use all 3 sessions sequentially - pool.getSession().close(); - pool.getSession().close(); - pool.getSession().close(); - // Advance the time by running the maintainer. This should cause - // one session to be kept alive and two sessions to be removed. - long cycles = - options.getRemoveInactiveSessionAfter().toMillis() / pool.poolMaintainer.loopFrequency; - runMaintenanceLoop(clock, pool, cycles); - // We will still close 2 sessions since at any point in time only 1 session was in use. - assertThat(pool.numIdleSessionsRemoved()).isEqualTo(2L); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - @Test - public void longRunningTransactionsCleanup_whenActionSetToClose_verifyInactiveSessionsClosed() - throws Exception { - Clock clock = mock(Clock.class); - when(clock.instant()).thenReturn(Instant.now()); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - .setIncStep(1) - .setMaxIdleSessions(0) - .setPoolMaintainerClock(clock) - .setCloseIfInactiveTransactions() // set option to close inactive transactions - .build(); - setupForLongRunningTransactionsCleanup(options); - - pool = createPool(clock); - // Make sure pool has been initialized - pool.getSession().close(); - - // All 3 sessions used. 100% of pool utilised. - PooledSessionFuture readSession1 = pool.getSession(); - PooledSessionFuture readSession2 = pool.getSession(); - PooledSessionFuture readSession3 = pool.getSession(); - - // complete the async tasks - readSession1.get().setEligibleForLongRunning(false); - readSession2.get().setEligibleForLongRunning(false); - readSession3.get().setEligibleForLongRunning(true); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - - // ensure that the sessions are in use for > 60 minutes - pool.poolMaintainer.lastExecutionTime = Instant.now(); - when(clock.instant()).thenReturn(Instant.now().plus(61, ChronoUnit.MINUTES)); - - pool.poolMaintainer.maintainPool(); - - // the two session that were un-expectedly long-running were removed from the pool. - // verify that only 1 session that is unexpected to be long-running remains in the pool. - assertEquals(1, pool.totalSessions()); - assertEquals(2, pool.numLeakedSessionsRemoved()); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - @Test - public void longRunningTransactionsCleanup_whenActionSetToWarn_verifyInactiveSessionsOpen() - throws Exception { - Clock clock = mock(Clock.class); - when(clock.instant()).thenReturn(Instant.now()); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - .setIncStep(1) - .setPoolMaintainerClock(clock) - .setWarnIfInactiveTransactions() // set option to warn (via logs) inactive transactions - .build(); - setupForLongRunningTransactionsCleanup(options); - - pool = createPool(clock); - // Make sure pool has been initialized - pool.getSession().close(); - - // All 3 sessions used. 100% of pool utilised. - PooledSessionFuture readSession1 = pool.getSession(); - PooledSessionFuture readSession2 = pool.getSession(); - PooledSessionFuture readSession3 = pool.getSession(); - - // complete the async tasks - readSession1.get().setEligibleForLongRunning(false); - readSession2.get().setEligibleForLongRunning(false); - readSession3.get().setEligibleForLongRunning(true); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - - // ensure that the sessions are in use for > 60 minutes - pool.poolMaintainer.lastExecutionTime = Instant.now(); - when(clock.instant()).thenReturn(Instant.now().plus(61, ChronoUnit.MINUTES)); - - pool.poolMaintainer.maintainPool(); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - assertEquals(0, pool.numLeakedSessionsRemoved()); - - readSession1.close(); - readSession2.close(); - readSession3.close(); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - @Test - public void - longRunningTransactionsCleanup_whenUtilisationBelowThreshold_verifyInactiveSessionsOpen() - throws Exception { - Clock clock = mock(Clock.class); - when(clock.instant()).thenReturn(Instant.now()); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - .setIncStep(1) - .setMaxIdleSessions(0) - .setPoolMaintainerClock(clock) - .setCloseIfInactiveTransactions() // set option to close inactive transactions - .build(); - setupForLongRunningTransactionsCleanup(options); - - pool = createPool(clock); - pool.getSession().close(); - - // 2/3 sessions are used. Hence utilisation < 95% - PooledSessionFuture readSession1 = pool.getSession(); - PooledSessionFuture readSession2 = pool.getSession(); - - // complete the async tasks and mark sessions as checked out - readSession1.get().setEligibleForLongRunning(false); - readSession2.get().setEligibleForLongRunning(false); - - assertEquals(2, pool.totalSessions()); - assertEquals(2, pool.checkedOutSessions.size()); - - // ensure that the sessions are in use for > 60 minutes - pool.poolMaintainer.lastExecutionTime = Instant.now(); - when(clock.instant()).thenReturn(Instant.now().plus(61, ChronoUnit.MINUTES)); - - pool.poolMaintainer.maintainPool(); - - assertEquals(2, pool.totalSessions()); - assertEquals(2, pool.checkedOutSessions.size()); - assertEquals(0, pool.numLeakedSessionsRemoved()); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - @Test - public void - longRunningTransactionsCleanup_whenAllAreExpectedlyLongRunning_verifyInactiveSessionsOpen() - throws Exception { - SessionImpl session1 = mockSession(); - SessionImpl session2 = mockSession(); - SessionImpl session3 = mockSession(); - - final LinkedList sessions = - new LinkedList<>(Arrays.asList(session1, session2, session3)); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(sessions.pop()); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - - for (SessionImpl session : sessions) { - mockKeepAlive(session); - } - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - .setIncStep(1) - .setMaxIdleSessions(0) - .setCloseIfInactiveTransactions() // set option to close inactive transactions - .build(); - Clock clock = mock(Clock.class); - when(clock.instant()).thenReturn(Instant.now()); - - pool = createPool(clock); - // Make sure pool has been initialized - pool.getSession().close(); - - // All 3 sessions used. 100% of pool utilised. - PooledSessionFuture readSession1 = pool.getSession(); - PooledSessionFuture readSession2 = pool.getSession(); - PooledSessionFuture readSession3 = pool.getSession(); - - // complete the async tasks - readSession1.get().setEligibleForLongRunning(true); - readSession2.get().setEligibleForLongRunning(true); - readSession3.get().setEligibleForLongRunning(true); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - - // ensure that the sessions are in use for > 60 minutes - pool.poolMaintainer.lastExecutionTime = Instant.now(); - when(clock.instant()).thenReturn(Instant.now().plus(61, ChronoUnit.MINUTES)); - - pool.poolMaintainer.maintainPool(); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - assertEquals(0, pool.numLeakedSessionsRemoved()); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - @Test - public void longRunningTransactionsCleanup_whenBelowDurationThreshold_verifyInactiveSessionsOpen() - throws Exception { - Clock clock = mock(Clock.class); - when(clock.instant()).thenReturn(Instant.now()); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - .setIncStep(1) - .setMaxIdleSessions(0) - .setPoolMaintainerClock(clock) - .setCloseIfInactiveTransactions() // set option to close inactive transactions - .build(); - setupForLongRunningTransactionsCleanup(options); - - pool = createPool(clock); - // Make sure pool has been initialized - pool.getSession().close(); - - // All 3 sessions used. 100% of pool utilised. - PooledSessionFuture readSession1 = pool.getSession(); - PooledSessionFuture readSession2 = pool.getSession(); - PooledSessionFuture readSession3 = pool.getSession(); - - // complete the async tasks - readSession1.get().setEligibleForLongRunning(false); - readSession2.get().setEligibleForLongRunning(false); - readSession3.get().setEligibleForLongRunning(true); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - - // ensure that the sessions are in use for < 60 minutes - pool.poolMaintainer.lastExecutionTime = Instant.now(); - when(clock.instant()).thenReturn(Instant.now().plus(50, ChronoUnit.MINUTES)); - - pool.poolMaintainer.maintainPool(); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - assertEquals(0, pool.numLeakedSessionsRemoved()); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - @Test - public void longRunningTransactionsCleanup_whenException_doNothing() throws Exception { - Clock clock = mock(Clock.class); - when(clock.instant()).thenReturn(Instant.now()); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - .setIncStep(1) - .setMaxIdleSessions(0) - .setPoolMaintainerClock(clock) - .setCloseIfInactiveTransactions() // set option to close inactive transactions - .build(); - setupForLongRunningTransactionsCleanup(options); - - pool = createPool(clock); - // Make sure pool has been initialized - pool.getSession().close(); - - // All 3 sessions used. 100% of pool utilised. - PooledSessionFuture readSession1 = pool.getSession(); - PooledSessionFuture readSession2 = pool.getSession(); - PooledSessionFuture readSession3 = pool.getSession(); - - // complete the async tasks - readSession1.get().setEligibleForLongRunning(false); - readSession2.get().setEligibleForLongRunning(false); - readSession3.get().setEligibleForLongRunning(true); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - - when(clock.instant()).thenReturn(Instant.now().plus(50, ChronoUnit.MINUTES)); - - pool.poolMaintainer.lastExecutionTime = null; // setting null to throw exception - pool.poolMaintainer.maintainPool(); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - assertEquals(0, pool.numLeakedSessionsRemoved()); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - @Test - public void - longRunningTransactionsCleanup_whenTaskRecurrenceBelowThreshold_verifyInactiveSessionsOpen() - throws Exception { - Clock clock = mock(Clock.class); - when(clock.instant()).thenReturn(Instant.now()); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - .setIncStep(1) - .setMaxIdleSessions(0) - .setPoolMaintainerClock(clock) - .setCloseIfInactiveTransactions() // set option to close inactive transactions - .build(); - setupForLongRunningTransactionsCleanup(options); - - pool = createPool(clock); - // Make sure pool has been initialized - pool.getSession().close(); - - // All 3 sessions used. 100% of pool utilised. - PooledSessionFuture readSession1 = pool.getSession(); - PooledSessionFuture readSession2 = pool.getSession(); - PooledSessionFuture readSession3 = pool.getSession(); - - // complete the async tasks - readSession1.get(); - readSession2.get(); - readSession3.get(); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - - pool.poolMaintainer.lastExecutionTime = Instant.now(); - when(clock.instant()).thenReturn(Instant.now().plus(10, ChronoUnit.SECONDS)); - - pool.poolMaintainer.maintainPool(); - - assertEquals(3, pool.totalSessions()); - assertEquals(3, pool.checkedOutSessions.size()); - assertEquals(0, pool.numLeakedSessionsRemoved()); - - readSession1.close(); - readSession2.close(); - readSession3.close(); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - private void setupForLongRunningTransactionsCleanup(SessionPoolOptions sessionPoolOptions) { - ReadContext context = mock(ReadContext.class); - SpannerImpl spanner = mock(SpannerImpl.class); - SpannerOptions options = mock(SpannerOptions.class); - when(spanner.getOptions()).thenReturn(options); - when(options.getSessionPoolOptions()).thenReturn(sessionPoolOptions); - SessionImpl session1 = buildMockSession(spanner, context); - SessionImpl session2 = buildMockSession(spanner, context); - SessionImpl session3 = buildMockSession(spanner, context); - - final LinkedList sessions = - new LinkedList<>(Arrays.asList(session1, session2, session3)); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(sessions.pop()); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - - mockKeepAlive(context); - } - - @Test - public void keepAlive() throws Exception { - ReadContext context = mock(ReadContext.class); - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(2) - .setMaxSessions(3) - .setPoolMaintainerClock(clock) - .build(); - SpannerImpl spanner = mock(SpannerImpl.class); - SpannerOptions spannerOptions = mock(SpannerOptions.class); - when(spanner.getOptions()).thenReturn(spannerOptions); - when(spannerOptions.getSessionPoolOptions()).thenReturn(options); - final SessionImpl mockSession1 = buildMockSession(spanner, context); - final SessionImpl mockSession2 = buildMockSession(spanner, context); - final SessionImpl mockSession3 = buildMockSession(spanner, context); - final LinkedList sessions = - new LinkedList<>(Arrays.asList(mockSession1, mockSession2, mockSession3)); - - mockKeepAlive(context); - // This is cheating as we are returning the same session each but it makes the verification - // easier. - doAnswer( - invocation -> { - executor.submit( - () -> { - int sessionCount = invocation.getArgument(0, Integer.class); - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - for (int i = 0; i < sessionCount; i++) { - consumer.onSessionReady(sessions.pop()); - } - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(anyInt(), Mockito.anyBoolean(), any(SessionConsumer.class)); - pool = createPool(clock); - PooledSessionFuture session1 = pool.getSession(); - PooledSessionFuture session2 = pool.getSession(); - session1.get(); - session2.get(); - session1.close(); - session2.close(); - runMaintenanceLoop(clock, pool, pool.poolMaintainer.numKeepAliveCycles); - verify(context, never()).executeQuery(any(Statement.class)); - runMaintenanceLoop(clock, pool, pool.poolMaintainer.numKeepAliveCycles); - verify(context, times(2)).executeQuery(Statement.newBuilder("SELECT 1").build()); - clock.currentTimeMillis.addAndGet( - clock.currentTimeMillis.get() + (options.getKeepAliveIntervalMinutes() + 5L) * 60L * 1000L); - session1 = pool.getSession(); - session1.writeAtLeastOnceWithOptions(new ArrayList<>()); - session1.close(); - runMaintenanceLoop(clock, pool, pool.poolMaintainer.numKeepAliveCycles); - // The session pool only keeps MinSessions + MaxIdleSessions alive. - verify(context, times(options.getMinSessions() + options.getMaxIdleSessions())) - .executeQuery(Statement.newBuilder("SELECT 1").build()); - pool.closeAsync(new SpannerImpl.ClosedException()).get(5L, TimeUnit.SECONDS); - } - - @Test - public void blockAndTimeoutOnPoolExhaustion() throws Exception { - // Create a session pool with max 1 session and a low timeout for waiting for a session. - options = - SessionPoolOptions.newBuilder() - .setMinSessions(minSessions) - .setMaxSessions(1) - .setInitialWaitForSessionTimeoutMillis(20L) - .setAcquireSessionTimeout(null) - .build(); - setupMockSessionCreation(); - pool = createPool(); - // Take the only session that can be in the pool. - PooledSessionFuture checkedOutSession = pool.getSession(); - checkedOutSession.get(); - ExecutorService executor = Executors.newFixedThreadPool(1); - final CountDownLatch latch = new CountDownLatch(1); - // Then try asynchronously to take another session. This attempt should time out. - Future fut = - executor.submit( - () -> { - latch.countDown(); - PooledSessionFuture session = pool.getSession(); - session.close(); - return null; - }); - // Wait until the background thread is actually waiting for a session. - latch.await(); - // Wait until the request has timed out. - int waitCount = 0; - while (pool.getNumWaiterTimeouts() == 0L && waitCount < 5000) { - Thread.sleep(1L); - waitCount++; - } - // Return the checked out session to the pool so the async request will get a session and - // finish. - checkedOutSession.close(); - // Verify that the async request also succeeds. - fut.get(10L, TimeUnit.SECONDS); - executor.shutdown(); - - // Verify that the session was returned to the pool and that we can get it again. - Session session = pool.getSession(); - assertThat(session).isNotNull(); - session.close(); - assertThat(pool.getNumWaiterTimeouts()).isAtLeast(1L); - } - - @Test - public void blockAndTimeoutOnPoolExhaustion_withAcquireSessionTimeout() throws Exception { - // Create a session pool with max 1 session and a low timeout for waiting for a session. - options = - SessionPoolOptions.newBuilder() - .setMinSessions(minSessions) - .setMaxSessions(1) - .setInitialWaitForSessionTimeoutMillis(20L) - .setAcquireSessionTimeout(null) - .build(); - setupMockSessionCreation(); - pool = createPool(); - // Take the only session that can be in the pool. - PooledSessionFuture checkedOutSession = pool.getSession(); - checkedOutSession.get(); - ExecutorService executor = Executors.newFixedThreadPool(1); - final CountDownLatch latch = new CountDownLatch(1); - // Then try asynchronously to take another session. This attempt should time out. - Future fut = - executor.submit( - () -> { - PooledSessionFuture session = pool.getSession(); - latch.countDown(); - session.get(); - session.close(); - return null; - }); - // Wait until the background thread is actually waiting for a session. - latch.await(); - // Wait until the request has timed out. - Stopwatch watch = Stopwatch.createStarted(); - while (pool.getNumWaiterTimeouts() == 0L && watch.elapsed(TimeUnit.MILLISECONDS) < 1000) { - Thread.yield(); - } - // Return the checked out session to the pool so the async request will get a session and - // finish. - checkedOutSession.close(); - // Verify that the async request also succeeds. - fut.get(10L, TimeUnit.SECONDS); - executor.shutdown(); - assertTrue(executor.awaitTermination(10L, TimeUnit.SECONDS)); - - // Verify that the session was returned to the pool and that we can get it again. - PooledSessionFuture session = pool.getSession(); - assertThat(session.get()).isNotNull(); - session.close(); - assertThat(pool.getNumWaiterTimeouts()).isAtLeast(1L); - } - - @Test - public void testSessionNotFoundSingleUse() { - Statement statement = Statement.of("SELECT 1"); - final SessionImpl closedSession = mockSession(); - ReadContext closedContext = mock(ReadContext.class); - ResultSet closedResultSet = mock(ResultSet.class); - when(closedResultSet.next()) - .thenThrow(SpannerExceptionFactoryTest.newSessionNotFoundException(sessionName)); - when(closedContext.executeQuery(statement)).thenReturn(closedResultSet); - when(closedSession.singleUse()).thenReturn(closedContext); - - final SessionImpl openSession = mockSession(); - ReadContext openContext = mock(ReadContext.class); - ResultSet openResultSet = mock(ResultSet.class); - when(openResultSet.next()).thenReturn(true, false); - when(openContext.executeQuery(statement)).thenReturn(openResultSet); - when(openSession.singleUse()).thenReturn(openContext); - - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(closedSession); - }); - return null; - }) - .doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(openSession); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - pool = createPool(clock); - ReadContext context = pool.getSession().singleUse(); - ResultSet resultSet = context.executeQuery(statement); - assertThat(resultSet.next()).isTrue(); - } - - @Test - public void testSessionNotFoundReadOnlyTransaction() { - Statement statement = Statement.of("SELECT 1"); - final SessionImpl closedSession = mockSession(); - when(closedSession.readOnlyTransaction()) - .thenThrow(SpannerExceptionFactoryTest.newSessionNotFoundException(sessionName)); - - final SessionImpl openSession = mockSession(); - ReadOnlyTransaction openTransaction = mock(ReadOnlyTransaction.class); - ResultSet openResultSet = mock(ResultSet.class); - when(openResultSet.next()).thenReturn(true, false); - when(openTransaction.executeQuery(statement)).thenReturn(openResultSet); - when(openSession.readOnlyTransaction()).thenReturn(openTransaction); - - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(closedSession); - }); - return null; - }) - .doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(openSession); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - pool = createPool(clock); - ReadOnlyTransaction transaction = pool.getSession().readOnlyTransaction(); - ResultSet resultSet = transaction.executeQuery(statement); - assertThat(resultSet.next()).isTrue(); - } - - private enum ReadWriteTransactionTestStatementType { - QUERY, - ANALYZE, - UPDATE, - BATCH_UPDATE, - WRITE, - EXCEPTION - } - - @SuppressWarnings("unchecked") - @Test - public void testSessionNotFoundReadWriteTransaction() { - final Statement queryStatement = Statement.of("SELECT 1"); - final Statement updateStatement = Statement.of("UPDATE FOO SET BAR=1 WHERE ID=2"); - final SpannerException sessionNotFound = - SpannerExceptionFactoryTest.newSessionNotFoundException(sessionName); - for (ReadWriteTransactionTestStatementType statementType : - ReadWriteTransactionTestStatementType.values()) { - final ReadWriteTransactionTestStatementType executeStatementType = statementType; - SpannerRpc.StreamingCall closedStreamingCall = mock(SpannerRpc.StreamingCall.class); - doThrow(sessionNotFound).when(closedStreamingCall).request(Mockito.anyInt()); - SpannerRpc rpc = mock(SpannerRpc.class); - when(rpc.asyncDeleteSession(Mockito.anyString(), Mockito.anyMap())) - .thenReturn(ApiFutures.immediateFuture(Empty.getDefaultInstance())); - when(rpc.executeQuery( - any(ExecuteSqlRequest.class), - any(ResultStreamConsumer.class), - any(Map.class), - eq(true))) - .thenReturn(closedStreamingCall); - when(rpc.executeQuery(any(ExecuteSqlRequest.class), any(Map.class), eq(true))) - .thenThrow(sessionNotFound); - when(rpc.executeBatchDml(any(ExecuteBatchDmlRequest.class), any(Map.class))) - .thenThrow(sessionNotFound); - when(rpc.commitAsync(any(CommitRequest.class), any(Map.class))) - .thenReturn(ApiFutures.immediateFailedFuture(sessionNotFound)); - when(rpc.rollbackAsync(any(RollbackRequest.class), any(Map.class))) - .thenReturn(ApiFutures.immediateFailedFuture(sessionNotFound)); - when(rpc.getReadRetrySettings()) - .thenReturn(SpannerStubSettings.newBuilder().streamingReadSettings().getRetrySettings()); - when(rpc.getReadRetryableCodes()) - .thenReturn(SpannerStubSettings.newBuilder().streamingReadSettings().getRetryableCodes()); - when(rpc.getExecuteQueryRetrySettings()) - .thenReturn( - SpannerStubSettings.newBuilder().executeStreamingSqlSettings().getRetrySettings()); - when(rpc.getExecuteQueryRetryableCodes()) - .thenReturn( - SpannerStubSettings.newBuilder().executeStreamingSqlSettings().getRetryableCodes()); - final SessionImpl closedSession = mock(SessionImpl.class); - when(closedSession.defaultTransactionOptions()) - .thenReturn(TransactionOptions.getDefaultInstance()); - when(closedSession.getName()) - .thenReturn("projects/dummy/instances/dummy/database/dummy/sessions/session-closed"); - when(closedSession.getErrorHandler()).thenReturn(DefaultErrorHandler.INSTANCE); - when(closedSession.getRequestIdCreator()) - .thenReturn(new XGoogSpannerRequestId.NoopRequestIdCreator()); - - Span oTspan = mock(Span.class); - ISpan span = new OpenTelemetrySpan(oTspan); - when(oTspan.makeCurrent()).thenReturn(mock(Scope.class)); - - final TransactionContextImpl closedTransactionContext = - TransactionContextImpl.newBuilder() - .setSession(closedSession) - .setOptions(Options.fromTransactionOptions()) - .setRpc(rpc) - .setTracer(tracer) - .setSpan(span) - .build(); - when(closedSession.asyncClose()) - .thenReturn(ApiFutures.immediateFuture(Empty.getDefaultInstance())); - when(closedSession.newTransaction(eq(Options.fromTransactionOptions()), any())) - .thenReturn(closedTransactionContext); - when(closedSession.beginTransactionAsync(any(), eq(true), any(), any(), any())) - .thenThrow(sessionNotFound); - when(closedSession.getTracer()).thenReturn(tracer); - TransactionRunnerImpl closedTransactionRunner = new TransactionRunnerImpl(closedSession); - closedTransactionRunner.setSpan(span); - when(closedSession.readWriteTransaction()).thenReturn(closedTransactionRunner); - - final SessionImpl openSession = mock(SessionImpl.class); - when(openSession.getErrorHandler()).thenReturn(DefaultErrorHandler.INSTANCE); - when(openSession.asyncClose()) - .thenReturn(ApiFutures.immediateFuture(Empty.getDefaultInstance())); - when(openSession.getName()) - .thenReturn("projects/dummy/instances/dummy/database/dummy/sessions/session-open"); - final TransactionContextImpl openTransactionContext = mock(TransactionContextImpl.class); - when(openSession.newTransaction(eq(Options.fromTransactionOptions()), any())) - .thenReturn(openTransactionContext); - Transaction txn = Transaction.newBuilder().setId(ByteString.copyFromUtf8("open-txn")).build(); - when(openSession.beginTransactionAsync(any(), eq(true), any(), any(), any())) - .thenReturn(ApiFutures.immediateFuture(txn)); - when(openSession.getTracer()).thenReturn(tracer); - TransactionRunnerImpl openTransactionRunner = new TransactionRunnerImpl(openSession); - openTransactionRunner.setSpan(span); - when(openSession.readWriteTransaction()).thenReturn(openTransactionRunner); - when(openSession.getRequestIdCreator()) - .thenReturn(new XGoogSpannerRequestId.NoopRequestIdCreator()); - - ResultSet openResultSet = mock(ResultSet.class); - when(openResultSet.next()).thenReturn(true, false); - ResultSet planResultSet = mock(ResultSet.class); - when(planResultSet.getStats()).thenReturn(ResultSetStats.getDefaultInstance()); - when(openTransactionContext.executeQuery(queryStatement)).thenReturn(openResultSet); - when(openTransactionContext.analyzeQuery(queryStatement, QueryAnalyzeMode.PLAN)) - .thenReturn(planResultSet); - when(openTransactionContext.executeUpdate(updateStatement)).thenReturn(1L); - when(openTransactionContext.batchUpdate(Arrays.asList(updateStatement, updateStatement))) - .thenReturn(new long[] {1L, 1L}); - SpannerImpl spanner = mock(SpannerImpl.class); - SessionClient sessionClient = mock(SessionClient.class); - when(spanner.getSessionClient(db)).thenReturn(sessionClient); - when(sessionClient.getSpanner()).thenReturn(spanner); - - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(closedSession); - }); - return null; - }) - .doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(openSession); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions( - Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - SessionPoolOptions options = - SessionPoolOptions.newBuilder() - .setMinSessions(0) // The pool should not auto-create any sessions - .setMaxSessions(2) - .setIncStep(1) - .setBlockIfPoolExhausted() - .build(); - SpannerOptions spannerOptions = mock(SpannerOptions.class); - when(spannerOptions.getSessionPoolOptions()).thenReturn(options); - when(spannerOptions.getNumChannels()).thenReturn(4); - when(spannerOptions.getDatabaseRole()).thenReturn("role"); - when(spanner.getOptions()).thenReturn(spannerOptions); - SessionPool pool = - SessionPool.createPool( - options, - new TestExecutorFactory(), - spanner.getSessionClient(db), - tracer, - OpenTelemetry.noop()); - try (PooledSessionFuture readWriteSession = pool.getSession()) { - TransactionRunner runner = readWriteSession.readWriteTransaction(); - try { - runner.run( - new TransactionCallable() { - private int callNumber = 0; - - @Override - public Integer run(TransactionContext transaction) { - callNumber++; - if (callNumber == 1) { - assertThat(transaction).isEqualTo(closedTransactionContext); - } else { - assertThat(transaction).isEqualTo(openTransactionContext); - } - switch (executeStatementType) { - case QUERY: - ResultSet resultSet = transaction.executeQuery(queryStatement); - assertThat(resultSet.next()).isTrue(); - break; - case ANALYZE: - ResultSet planResultSet = - transaction.analyzeQuery(queryStatement, QueryAnalyzeMode.PLAN); - assertThat(planResultSet.next()).isFalse(); - assertThat(planResultSet.getStats()).isNotNull(); - break; - case UPDATE: - long updateCount = transaction.executeUpdate(updateStatement); - assertThat(updateCount).isEqualTo(1L); - break; - case BATCH_UPDATE: - long[] updateCounts = - transaction.batchUpdate(Arrays.asList(updateStatement, updateStatement)); - assertThat(updateCounts).isEqualTo(new long[] {1L, 1L}); - break; - case WRITE: - transaction.buffer(Mutation.delete("FOO", Key.of(1L))); - break; - case EXCEPTION: - throw new RuntimeException("rollback at call " + callNumber); - default: - fail("Unknown statement type: " + executeStatementType); - } - return callNumber; - } - }); - } catch (Exception e) { - // The rollback will also cause a SessionNotFoundException, but this is caught, logged - // and further ignored by the library, meaning that the session will not be re-created - // for retry. Hence rollback at call 1. - assertThat(executeStatementType) - .isEqualTo(ReadWriteTransactionTestStatementType.EXCEPTION); - assertThat(e.getMessage()).contains("rollback at call 1"); - } - } - pool.closeAsync(new SpannerImpl.ClosedException()); - } - } - - @Test - public void testSessionNotFoundWrite() { - SpannerException sessionNotFound = - SpannerExceptionFactoryTest.newSessionNotFoundException(sessionName); - List mutations = Collections.singletonList(Mutation.newInsertBuilder("FOO").build()); - final SessionImpl closedSession = mockSession(); - closedSession.setRequestIdCreator(new XGoogSpannerRequestId.NoopRequestIdCreator()); - when(closedSession.writeWithOptions(eq(mutations), any())).thenThrow(sessionNotFound); - - final SessionImpl openSession = mockSession(); - com.google.cloud.spanner.CommitResponse response = - mock(com.google.cloud.spanner.CommitResponse.class); - when(response.getCommitTimestamp()).thenReturn(Timestamp.now()); - openSession.setRequestIdCreator(new XGoogSpannerRequestId.NoopRequestIdCreator()); - when(openSession.writeWithOptions(eq(mutations), any())).thenReturn(response); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(closedSession); - }); - return null; - }) - .doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(openSession); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - pool = createPool(clock); - DatabaseClientImpl impl = new DatabaseClientImpl(pool, tracer); - assertThat(impl.write(mutations)).isNotNull(); - } - - @Test - public void testSessionNotFoundWriteAtLeastOnce() { - SpannerException sessionNotFound = - SpannerExceptionFactoryTest.newSessionNotFoundException(sessionName); - List mutations = Collections.singletonList(Mutation.newInsertBuilder("FOO").build()); - final SessionImpl closedSession = mockSession(); - closedSession.setRequestIdCreator(new XGoogSpannerRequestId.NoopRequestIdCreator()); - when(closedSession.writeAtLeastOnceWithOptions(eq(mutations), any())) - .thenThrow(sessionNotFound); - - final SessionImpl openSession = mockSession(); - com.google.cloud.spanner.CommitResponse response = - mock(com.google.cloud.spanner.CommitResponse.class); - when(response.getCommitTimestamp()).thenReturn(Timestamp.now()); - openSession.setRequestIdCreator(new XGoogSpannerRequestId.NoopRequestIdCreator()); - when(openSession.writeAtLeastOnceWithOptions(eq(mutations), any())).thenReturn(response); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(closedSession); - }); - return null; - }) - .doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(openSession); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - pool = createPool(clock); - DatabaseClientImpl impl = new DatabaseClientImpl(pool, tracer); - assertThat(impl.writeAtLeastOnce(mutations)).isNotNull(); - } - - @Test - public void testSessionNotFoundPartitionedUpdate() { - SpannerException sessionNotFound = - SpannerExceptionFactoryTest.newSessionNotFoundException(sessionName); - Statement statement = Statement.of("UPDATE FOO SET BAR=1 WHERE 1=1"); - final SessionImpl closedSession = mockSession(); - when(closedSession.executePartitionedUpdate(eq(statement), any())).thenThrow(sessionNotFound); - - final SessionImpl openSession = mockSession(); - when(openSession.executePartitionedUpdate(eq(statement), any())).thenReturn(1L); - doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(closedSession); - }); - return null; - }) - .doAnswer( - invocation -> { - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(openSession); - }); - return null; - }) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - pool = createPool(clock); - DatabaseClientImpl impl = new DatabaseClientImpl(pool, mock(TraceWrapper.class)); - assertThat(impl.executePartitionedUpdate(statement)).isEqualTo(1L); - } - - @SuppressWarnings("rawtypes") - @Test - public void testOpenCensusSessionMetrics() throws Exception { - // Create a session pool with max 2 session and a low timeout for waiting for a session. - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(2) - .setInitialWaitForSessionTimeoutMillis(50L) - .setAcquireSessionTimeout(null) - .build(); - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - FakeMetricRegistry metricRegistry = new FakeMetricRegistry(); - List labelValues = - Arrays.asList( - LabelValue.create("client1"), - LabelValue.create("database1"), - LabelValue.create("instance1"), - LabelValue.create("1.0.0")); - - setupMockSessionCreation(); - pool = createPool(clock, metricRegistry, labelValues); - PooledSessionFuture session1 = pool.getSession(); - PooledSessionFuture session2 = pool.getSession(); - session1.get(); - session2.get(); - - MetricsRecord record = metricRegistry.pollRecord(); - assertThat(record.getMetrics().size()).isEqualTo(6); - - List maxInUseSessions = - record.getMetrics().get(METRIC_PREFIX + MAX_IN_USE_SESSIONS); - assertThat(maxInUseSessions.size()).isEqualTo(1); - assertThat(maxInUseSessions.get(0).value()).isEqualTo(2L); - assertThat(maxInUseSessions.get(0).keys()).isEqualTo(SPANNER_LABEL_KEYS); - assertThat(maxInUseSessions.get(0).values()).isEqualTo(labelValues); - - List getSessionsTimeouts = - record.getMetrics().get(METRIC_PREFIX + GET_SESSION_TIMEOUTS); - assertThat(getSessionsTimeouts.size()).isEqualTo(1); - assertThat(getSessionsTimeouts.get(0).value()).isAtMost(1L); - assertThat(getSessionsTimeouts.get(0).keys()).isEqualTo(SPANNER_LABEL_KEYS); - assertThat(getSessionsTimeouts.get(0).values()).isEqualTo(labelValues); - - List labelValuesWithRegularSessions = new ArrayList<>(labelValues); - labelValuesWithRegularSessions.add(LabelValue.create("false")); - List labelValuesWithMultiplexedSessions = new ArrayList<>(labelValues); - labelValuesWithMultiplexedSessions.add(LabelValue.create("true")); - List numAcquiredSessions = - record.getMetrics().get(METRIC_PREFIX + NUM_ACQUIRED_SESSIONS); - assertThat(numAcquiredSessions.size()).isEqualTo(2); - PointWithFunction regularSessionMetric = - numAcquiredSessions.stream() - .filter( - x -> - x.keys().contains(IS_MULTIPLEXED_KEY) - && x.values().contains(LabelValue.create("false"))) - .findFirst() - .get(); - PointWithFunction multiplexedSessionMetric = - numAcquiredSessions.stream() - .filter( - x -> - x.keys().contains(IS_MULTIPLEXED_KEY) - && x.values().contains(LabelValue.create("true"))) - .findFirst() - .get(); - // verify metrics for regular sessions - assertThat(regularSessionMetric.value()).isEqualTo(2L); - assertThat(regularSessionMetric.keys()).isEqualTo(SPANNER_LABEL_KEYS_WITH_MULTIPLEXED_SESSIONS); - assertThat(regularSessionMetric.values()).isEqualTo(labelValuesWithRegularSessions); - - // verify metrics for multiplexed sessions - assertThat(multiplexedSessionMetric.value()).isEqualTo(0L); - assertThat(multiplexedSessionMetric.keys()) - .isEqualTo(SPANNER_LABEL_KEYS_WITH_MULTIPLEXED_SESSIONS); - assertThat(multiplexedSessionMetric.values()).isEqualTo(labelValuesWithMultiplexedSessions); - - List numReleasedSessions = - record.getMetrics().get(METRIC_PREFIX + NUM_RELEASED_SESSIONS); - assertThat(numReleasedSessions.size()).isEqualTo(2); - - regularSessionMetric = - numReleasedSessions.stream() - .filter( - x -> - x.keys().contains(IS_MULTIPLEXED_KEY) - && x.values().contains(LabelValue.create("false"))) - .findFirst() - .get(); - multiplexedSessionMetric = - numReleasedSessions.stream() - .filter( - x -> - x.keys().contains(IS_MULTIPLEXED_KEY) - && x.values().contains(LabelValue.create("true"))) - .findFirst() - .get(); - // verify metrics for regular sessions - assertThat(regularSessionMetric.value()).isEqualTo(0L); - assertThat(regularSessionMetric.keys()).isEqualTo(SPANNER_LABEL_KEYS_WITH_MULTIPLEXED_SESSIONS); - assertThat(regularSessionMetric.values()).isEqualTo(labelValuesWithRegularSessions); - - // verify metrics for multiplexed sessions - assertThat(multiplexedSessionMetric.value()).isEqualTo(0L); - assertThat(multiplexedSessionMetric.keys()) - .isEqualTo(SPANNER_LABEL_KEYS_WITH_MULTIPLEXED_SESSIONS); - assertThat(multiplexedSessionMetric.values()).isEqualTo(labelValuesWithMultiplexedSessions); - - List maxAllowedSessions = - record.getMetrics().get(METRIC_PREFIX + MAX_ALLOWED_SESSIONS); - assertThat(maxAllowedSessions.size()).isEqualTo(1); - assertThat(maxAllowedSessions.get(0).value()).isEqualTo(options.getMaxSessions()); - assertThat(maxAllowedSessions.get(0).keys()).isEqualTo(SPANNER_LABEL_KEYS); - assertThat(maxAllowedSessions.get(0).values()).isEqualTo(labelValues); - - List numSessionsInPool = - record.getMetrics().get(METRIC_PREFIX + NUM_SESSIONS_IN_POOL); - assertThat(numSessionsInPool.size()).isEqualTo(4); - PointWithFunction beingPrepared = numSessionsInPool.get(0); - List labelValuesWithBeingPreparedType = new ArrayList<>(labelValues); - labelValuesWithBeingPreparedType.add(NUM_SESSIONS_BEING_PREPARED); - assertThat(beingPrepared.value()).isEqualTo(0L); - assertThat(beingPrepared.keys()).isEqualTo(SPANNER_LABEL_KEYS_WITH_TYPE); - assertThat(beingPrepared.values()).isEqualTo(labelValuesWithBeingPreparedType); - PointWithFunction numSessionsInUse = numSessionsInPool.get(1); - List labelValuesWithInUseType = new ArrayList<>(labelValues); - labelValuesWithInUseType.add(NUM_IN_USE_SESSIONS); - assertThat(numSessionsInUse.value()).isEqualTo(2L); - assertThat(numSessionsInUse.keys()).isEqualTo(SPANNER_LABEL_KEYS_WITH_TYPE); - assertThat(numSessionsInUse.values()).isEqualTo(labelValuesWithInUseType); - PointWithFunction readSessions = numSessionsInPool.get(2); - List labelValuesWithReadType = new ArrayList<>(labelValues); - labelValuesWithReadType.add(NUM_READ_SESSIONS); - assertThat(readSessions.value()).isEqualTo(0L); - assertThat(readSessions.keys()).isEqualTo(SPANNER_LABEL_KEYS_WITH_TYPE); - assertThat(readSessions.values()).isEqualTo(labelValuesWithReadType); - PointWithFunction writePreparedSessions = numSessionsInPool.get(3); - List labelValuesWithWriteType = new ArrayList<>(labelValues); - labelValuesWithWriteType.add(NUM_WRITE_SESSIONS); - assertThat(writePreparedSessions.value()).isEqualTo(0L); - assertThat(writePreparedSessions.keys()).isEqualTo(SPANNER_LABEL_KEYS_WITH_TYPE); - assertThat(writePreparedSessions.values()).isEqualTo(labelValuesWithWriteType); - - final CountDownLatch latch = new CountDownLatch(1); - // Try asynchronously to take another session. This attempt should time out. - Future fut = - executor.submit( - () -> { - latch.countDown(); - Session session = pool.getSession(); - session.close(); - return null; - }); - // Wait until the background thread is actually waiting for a session. - latch.await(); - // Wait until the request has timed out. - int waitCount = 0; - while (pool.getNumWaiterTimeouts() == 0L && waitCount < 5000) { - //noinspection BusyWait - Thread.sleep(1L); - waitCount++; - } - assertTrue(pool.getNumWaiterTimeouts() > 0L); - // Return the checked out session to the pool so the async request will get a session and - // finish. - session2.close(); - // Verify that the async request also succeeds. - fut.get(10L, TimeUnit.SECONDS); - executor.shutdown(); - - session1.close(); - numAcquiredSessions = record.getMetrics().get(METRIC_PREFIX + NUM_ACQUIRED_SESSIONS); - assertThat(numAcquiredSessions.size()).isEqualTo(2); - regularSessionMetric = - numAcquiredSessions.stream() - .filter( - x -> - x.keys().contains(IS_MULTIPLEXED_KEY) - && x.values().contains(LabelValue.create("false"))) - .findFirst() - .get(); - multiplexedSessionMetric = - numAcquiredSessions.stream() - .filter( - x -> - x.keys().contains(IS_MULTIPLEXED_KEY) - && x.values().contains(LabelValue.create("true"))) - .findFirst() - .get(); - assertThat(regularSessionMetric.value()).isEqualTo(3L); - assertThat(multiplexedSessionMetric.value()).isEqualTo(0L); - - numReleasedSessions = record.getMetrics().get(METRIC_PREFIX + NUM_RELEASED_SESSIONS); - assertThat(numReleasedSessions.size()).isEqualTo(2); - regularSessionMetric = - numReleasedSessions.stream() - .filter( - x -> - x.keys().contains(IS_MULTIPLEXED_KEY) - && x.values().contains(LabelValue.create("false"))) - .findFirst() - .get(); - multiplexedSessionMetric = - numReleasedSessions.stream() - .filter( - x -> - x.keys().contains(IS_MULTIPLEXED_KEY) - && x.values().contains(LabelValue.create("true"))) - .findFirst() - .get(); - assertThat(regularSessionMetric.value()).isEqualTo(3L); - assertThat(multiplexedSessionMetric.value()).isEqualTo(0L); - - maxInUseSessions = record.getMetrics().get(METRIC_PREFIX + MAX_IN_USE_SESSIONS); - assertThat(maxInUseSessions.size()).isEqualTo(1); - assertThat(maxInUseSessions.get(0).value()).isEqualTo(2L); - - numSessionsInPool = record.getMetrics().get(METRIC_PREFIX + NUM_SESSIONS_IN_POOL); - assertThat(numSessionsInPool.size()).isEqualTo(4); - beingPrepared = numSessionsInPool.get(0); - assertThat(beingPrepared.value()).isEqualTo(0L); - numSessionsInUse = numSessionsInPool.get(1); - assertThat(numSessionsInUse.value()).isEqualTo(0L); - readSessions = numSessionsInPool.get(2); - assertThat(readSessions.value()).isEqualTo(2L); - writePreparedSessions = numSessionsInPool.get(3); - assertThat(writePreparedSessions.value()).isEqualTo(0L); - } - - @Test - public void testOpenCensusMetricsDisable() { - SpannerOptions.disableOpenCensusMetrics(); - // Create a session pool with max 2 session and a low timeout for waiting for a session. - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(2) - .setMaxIdleSessions(0) - .setInitialWaitForSessionTimeoutMillis(50L) - .build(); - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - FakeMetricRegistry metricRegistry = new FakeMetricRegistry(); - List labelValues = - Arrays.asList( - LabelValue.create("client1"), - LabelValue.create("database1"), - LabelValue.create("instance1"), - LabelValue.create("1.0.0")); - - setupMockSessionCreation(); - pool = createPool(clock, metricRegistry, labelValues); - PooledSessionFuture session1 = pool.getSession(); - PooledSessionFuture session2 = pool.getSession(); - session1.get(); - session2.get(); - - MetricsRecord record = metricRegistry.pollRecord(); - assertThat(record.getMetrics().size()).isEqualTo(0); - SpannerOptions.enableOpenCensusMetrics(); - } - - @Test - public void testOpenTelemetrySessionMetrics() throws Exception { - SpannerOptions.resetActiveTracingFramework(); - SpannerOptions.enableOpenTelemetryMetrics(); - // Create a session pool with max 3 session and a low timeout for waiting for a session. - if (minSessions == 1) { - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - // This must be set to null for the setInitialWaitForSessionTimeoutMillis call to have - // any effect. - .setAcquireSessionTimeout(null) - .setInitialWaitForSessionTimeoutMillis(1L) - .build(); - FakeClock clock = new FakeClock(); - clock.currentTimeMillis.set(System.currentTimeMillis()); - - InMemoryMetricReader inMemoryMetricReader = InMemoryMetricReader.create(); - SdkMeterProvider sdkMeterProvider = - SdkMeterProvider.builder().registerMetricReader(inMemoryMetricReader).build(); - OpenTelemetry openTelemetry = - OpenTelemetrySdk.builder().setMeterProvider(sdkMeterProvider).build(); - - setupMockSessionCreation(); - - AttributesBuilder attributesBuilder = Attributes.builder(); - attributesBuilder.put("client_id", "testClient"); - attributesBuilder.put("database", "testDb"); - attributesBuilder.put("instance_id", "test_instance"); - attributesBuilder.put("library_version", "test_version"); - - pool = - createPool( - clock, - Metrics.getMetricRegistry(), - SPANNER_DEFAULT_LABEL_VALUES, - openTelemetry, - attributesBuilder.build()); - PooledSessionFuture session1 = pool.getSession(); - PooledSessionFuture session2 = pool.getSession(); - session1.get(); - session2.get(); - - Collection metricDataCollection = inMemoryMetricReader.collectAllMetrics(); - // Acquired sessions are 2. - verifyMetricData(metricDataCollection, NUM_ACQUIRED_SESSIONS, 1, 2L); - // Max in use session are 2. - verifyMetricData(metricDataCollection, MAX_IN_USE_SESSIONS, 1, 2D); - // Max Allowed sessions should be 3 - verifyMetricData(metricDataCollection, MAX_ALLOWED_SESSIONS, 1, 3D); - // Released sessions should be 0 - verifyMetricData(metricDataCollection, NUM_RELEASED_SESSIONS, 1, 0L); - // Num sessions in pool - verifyMetricData(metricDataCollection, NUM_SESSIONS_IN_POOL, 1, NUM_SESSIONS_IN_USE, 2); - - PooledSessionFuture session3 = pool.getSession(); - session3.get(); - - final CountDownLatch latch = new CountDownLatch(1); - // Try asynchronously to take another session. This attempt should time out. - Future fut = - executor.submit( - () -> { - PooledSessionFuture session = pool.getSession(); - latch.countDown(); - session.get(); - session.close(); - return null; - }); - // Wait until the background thread is actually waiting for a session. - latch.await(); - // Wait until the request has timed out. - Stopwatch watch = Stopwatch.createStarted(); - while (pool.getNumWaiterTimeouts() == 0L && watch.elapsed(TimeUnit.MILLISECONDS) < 100) { - Thread.yield(); - } - assertTrue(pool.getNumWaiterTimeouts() > 0); - // Return the checked out session to the pool so the async request will get a session and - // finish. - session2.close(); - // Verify that the async request also succeeds. - fut.get(10L, TimeUnit.SECONDS); - executor.shutdown(); - assertTrue(executor.awaitTermination(10L, TimeUnit.SECONDS)); - - inMemoryMetricReader.forceFlush(); - metricDataCollection = inMemoryMetricReader.collectAllMetrics(); - - // Max Allowed sessions should be 3 - verifyMetricData(metricDataCollection, MAX_ALLOWED_SESSIONS, 1, 3D); - // Session timeouts 1 - // verifyMetricData(metricDataCollection, GET_SESSION_TIMEOUTS, 1, 1L); - // Max in use session are 2. - verifyMetricData(metricDataCollection, MAX_IN_USE_SESSIONS, 1, 3D); - // Session released 2 - verifyMetricData(metricDataCollection, NUM_RELEASED_SESSIONS, 1, 2L); - // Acquired sessions are 4. - verifyMetricData(metricDataCollection, NUM_ACQUIRED_SESSIONS, 1, 4L); - // Num sessions in pool - verifyMetricData(metricDataCollection, NUM_SESSIONS_IN_POOL, 1, NUM_SESSIONS_IN_USE, 2); - verifyMetricData(metricDataCollection, NUM_SESSIONS_IN_POOL, 1, NUM_SESSIONS_AVAILABLE, 1); - } - } - - private static void verifyMetricData( - Collection metricDataCollection, String metricName, int size, long value) { - Collection metricDataFiltered = - metricDataCollection.stream() - .filter(x -> x.getName().equals(metricName)) - .collect(Collectors.toList()); - - assertEquals(metricDataFiltered.size(), size); - MetricData metricData = metricDataFiltered.stream().findFirst().get(); - LongPointData regularSessionMetric = - metricData.getLongSumData().getPoints().stream() - .filter( - x -> - Boolean.FALSE.equals( - x.getAttributes().get(AttributeKey.booleanKey("is_multiplexed")))) - .findFirst() - .get(); - LongPointData multiplexedSessionMetric = - metricData.getLongSumData().getPoints().stream() - .filter( - x -> - Boolean.TRUE.equals( - x.getAttributes().get(AttributeKey.booleanKey("is_multiplexed")))) - .findFirst() - .get(); - assertEquals(value, regularSessionMetric.getValue()); - assertEquals(0, multiplexedSessionMetric.getValue()); - } - - private static void verifyMetricData( - Collection metricDataCollection, String metricName, int size, double value) { - Collection metricDataFiltered = - metricDataCollection.stream() - .filter(x -> x.getName().equals(metricName)) - .collect(Collectors.toList()); - - assertEquals(metricDataFiltered.size(), size); - MetricData metricData = metricDataFiltered.stream().findFirst().get(); - assertEquals( - metricData.getDoubleGaugeData().getPoints().stream().findFirst().get().getValue(), - value, - 0.0); - } - - private static void verifyMetricData( - Collection metricDataCollection, - String metricName, - int size, - String labelName, - long value) { - Collection metricDataFiltered = - metricDataCollection.stream() - .filter(x -> x.getName().equals(metricName)) - .collect(Collectors.toList()); - - assertEquals(metricDataFiltered.size(), size); - - MetricData metricData = metricDataFiltered.stream().findFirst().get(); - - assertEquals( - metricData.getLongSumData().getPoints().stream() - .filter(x -> x.getAttributes().asMap().containsValue(labelName)) - .findFirst() - .get() - .getValue(), - value); - } - - @Test - public void testGetDatabaseRole() throws Exception { - setupMockSessionCreation(); - pool = createPool(new FakeClock(), new FakeMetricRegistry(), SPANNER_DEFAULT_LABEL_VALUES); - assertEquals(TEST_DATABASE_ROLE, pool.getDatabaseRole()); - } - - @Test - public void testWaitOnMinSessionsWhenSessionsAreCreatedBeforeTimeout() { - options = - SessionPoolOptions.newBuilder() - .setMinSessions(minSessions) - .setMaxSessions(minSessions + 1) - .setWaitForMinSessionsDuration(Duration.ofSeconds(5)) - .build(); - doAnswer( - invocation -> - executor.submit( - () -> { - SessionConsumerImpl consumer = - invocation.getArgument(2, SessionConsumerImpl.class); - consumer.onSessionReady(mockSession()); - })) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - - pool = createPool(new FakeClock(), new FakeMetricRegistry(), SPANNER_DEFAULT_LABEL_VALUES); - pool.maybeWaitOnMinSessions(); - assertTrue(pool.getNumberOfSessionsInPool() >= minSessions); - } - - @Test(expected = SpannerException.class) - public void testWaitOnMinSessionsThrowsExceptionWhenTimeoutIsReached() { - // Does not call onSessionReady, so session pool is never populated - doAnswer(invocation -> null) - .when(sessionClient) - .asyncBatchCreateSessions(Mockito.eq(1), Mockito.anyBoolean(), any(SessionConsumer.class)); - - options = - SessionPoolOptions.newBuilder() - .setMinSessions(minSessions + 1) - .setMaxSessions(minSessions + 1) - .setWaitForMinSessionsDuration(Duration.ofMillis(100)) - .build(); - pool = createPool(new FakeClock(), new FakeMetricRegistry(), SPANNER_DEFAULT_LABEL_VALUES); - pool.maybeWaitOnMinSessions(); - } - - @Test - public void reset_maxSessionsInUse() { - Clock clock = mock(Clock.class); - when(clock.instant()).thenReturn(Instant.now()); - options = - SessionPoolOptions.newBuilder() - .setMinSessions(1) - .setMaxSessions(3) - .setIncStep(1) - .setMaxIdleSessions(0) - .setPoolMaintainerClock(clock) - .build(); - setupForLongRunningTransactionsCleanup(options); - - pool = createPool(clock); - // Make sure pool has been initialized - pool.getSession().close(); - - // All 3 sessions used. 100% of pool utilised. - PooledSessionFuture readSession1 = pool.getSession(); - PooledSessionFuture readSession2 = pool.getSession(); - PooledSessionFuture readSession3 = pool.getSession(); - - // complete the async tasks - readSession1.get().setEligibleForLongRunning(false); - readSession2.get().setEligibleForLongRunning(false); - readSession3.get().setEligibleForLongRunning(true); - - assertEquals(3, pool.getMaxSessionsInUse()); - assertEquals(3, pool.getNumberOfSessionsInUse()); - - // Release 1 session - readSession1.get().close(); - - // Verify that numSessionsInUse reduces to 2 while maxSessionsInUse remain 3 - assertEquals(3, pool.getMaxSessionsInUse()); - assertEquals(2, pool.getNumberOfSessionsInUse()); - - // ensure that the lastResetTime for maxSessionsInUse > 10 minutes - when(clock.instant()).thenReturn(Instant.now().plus(11, ChronoUnit.MINUTES)); - - pool.poolMaintainer.maintainPool(); - - // Verify that maxSessionsInUse is reset to numSessionsInUse - assertEquals(2, pool.getMaxSessionsInUse()); - assertEquals(2, pool.getNumberOfSessionsInUse()); - } - - private void mockKeepAlive(ReadContext context) { - ResultSet resultSet = mock(ResultSet.class); - when(resultSet.next()).thenReturn(true, false); - when(context.executeQuery(any(Statement.class))).thenReturn(resultSet); - } - - private void mockKeepAlive(Session session) { - ReadContext context = mock(ReadContext.class); - ResultSet resultSet = mock(ResultSet.class); - when(resultSet.next()).thenReturn(true, false); - when(session.singleUse(any(TimestampBound.class))).thenReturn(context); - when(context.executeQuery(any(Statement.class))).thenReturn(resultSet); - } - - private void getSessionAsync(final CountDownLatch latch, final AtomicBoolean failed) { - new Thread( - () -> { - try (PooledSessionFuture future = pool.getSession()) { - PooledSession session = future.get(); - failed.compareAndSet(false, session == null); - Uninterruptibles.sleepUninterruptibly(10, TimeUnit.MILLISECONDS); - } catch (Throwable e) { - failed.compareAndSet(false, true); - } finally { - latch.countDown(); - } - }) - .start(); - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolUnbalancedTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolUnbalancedTest.java deleted file mode 100644 index 5a9365eaed9..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolUnbalancedTest.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner; - -import static com.google.cloud.spanner.SessionPool.isUnbalanced; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.cloud.spanner.SessionPool.PooledSession; -import com.google.cloud.spanner.SessionPool.PooledSessionFuture; -import java.util.Arrays; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class SessionPoolUnbalancedTest { - - static PooledSession mockedSession(int channel) { - PooledSession session = mock(PooledSession.class); - when(session.getChannel()).thenReturn(channel); - return session; - } - - static List mockedSessions(int... channels) { - return Arrays.stream(channels) - .mapToObj(SessionPoolUnbalancedTest::mockedSession) - .collect(Collectors.toList()); - } - - static PooledSessionFuture mockedCheckedOutSession(int channel) { - PooledSession session = mockedSession(channel); - PooledSessionFuture future = mock(PooledSessionFuture.class); - when(future.get()).thenReturn(session); - when(future.isDone()).thenReturn(true); - return future; - } - - static Set mockedCheckedOutSessions(int... channels) { - return Arrays.stream(channels) - .mapToObj(SessionPoolUnbalancedTest::mockedCheckedOutSession) - .collect(Collectors.toSet()); - } - - @Test - public void testIsUnbalancedBasics() { - // An empty session pool is never unbalanced. - assertFalse(isUnbalanced(1, mockedSessions(), mockedCheckedOutSessions(1, 1, 1), 1)); - assertFalse(isUnbalanced(1, mockedSessions(), mockedCheckedOutSessions(1, 1, 1), 2)); - assertFalse(isUnbalanced(1, mockedSessions(), mockedCheckedOutSessions(1, 1, 1), 4)); - assertFalse(isUnbalanced(1, mockedSessions(), mockedCheckedOutSessions(1, 1, 1, 1), 1)); - assertFalse(isUnbalanced(1, mockedSessions(), mockedCheckedOutSessions(1, 1, 1, 1), 2)); - assertFalse(isUnbalanced(1, mockedSessions(), mockedCheckedOutSessions(1, 1, 1, 1), 4)); - assertFalse(isUnbalanced(1, mockedSessions(), mockedCheckedOutSessions(1, 1, 1, 1, 1), 1)); - assertFalse(isUnbalanced(1, mockedSessions(), mockedCheckedOutSessions(1, 1, 1, 1, 1), 2)); - assertFalse(isUnbalanced(1, mockedSessions(), mockedCheckedOutSessions(1, 1, 1, 1, 1), 4)); - - // A session pool that has 2 or fewer sessions checked out is never unbalanced. - // This prevents low-QPS scenarios from re-balancing the pool. - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1), mockedCheckedOutSessions(), 1)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1), mockedCheckedOutSessions(), 2)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1), mockedCheckedOutSessions(), 4)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1, 1), mockedCheckedOutSessions(1), 1)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1, 1), mockedCheckedOutSessions(1), 2)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1, 1), mockedCheckedOutSessions(1), 4)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1, 1, 1), mockedCheckedOutSessions(1, 1), 1)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1, 1, 1), mockedCheckedOutSessions(1, 1), 2)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1, 1, 1), mockedCheckedOutSessions(1, 1), 4)); - - // A session pool that uses only 1 channel is never unbalanced. - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1), mockedCheckedOutSessions(), 1)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1, 1), mockedCheckedOutSessions(), 1)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1, 1, 1), mockedCheckedOutSessions(), 1)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1, 1, 1, 1), mockedCheckedOutSessions(), 1)); - assertFalse(isUnbalanced(1, mockedSessions(1, 1, 1), mockedCheckedOutSessions(1, 1, 1), 1)); - assertFalse( - isUnbalanced(1, mockedSessions(1, 1, 1, 1), mockedCheckedOutSessions(1, 1, 1, 1), 1)); - assertFalse( - isUnbalanced(1, mockedSessions(1, 1, 1, 1, 1), mockedCheckedOutSessions(1, 1, 1, 1, 1), 1)); - assertFalse( - isUnbalanced( - 1, mockedSessions(1, 1, 1, 1, 1, 1), mockedCheckedOutSessions(1, 1, 1, 1, 1, 1), 1)); - } - - @Test - public void testIsUnbalanced_returnsFalseForBalancedPool() { - assertFalse( - isUnbalanced(1, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(1, 2, 3, 4), 4)); - assertFalse( - isUnbalanced(2, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(1, 2, 3, 4), 4)); - assertFalse( - isUnbalanced(3, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(1, 2, 3, 4), 4)); - assertFalse( - isUnbalanced(4, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(1, 2, 3, 4), 4)); - - assertFalse( - isUnbalanced(1, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(4, 3, 2, 1), 4)); - assertFalse( - isUnbalanced(2, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(4, 3, 2, 1), 4)); - assertFalse( - isUnbalanced(3, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(4, 3, 2, 1), 4)); - assertFalse( - isUnbalanced(4, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(4, 3, 2, 1), 4)); - - assertFalse( - isUnbalanced( - 1, - mockedSessions(1, 2, 3, 4, 1, 2, 3, 4), - mockedCheckedOutSessions(1, 2, 3, 4, 1, 2, 3, 4), - 4)); - - // We only check the first numChannels sessions that are in the pool, so the fact that the end - // of the pool is unbalanced is not a reason to re-balance. - assertFalse( - isUnbalanced( - 1, mockedSessions(1, 2, 3, 4, 1, 1, 1, 1), mockedCheckedOutSessions(1, 2, 3, 4), 4)); - assertFalse( - isUnbalanced(1, mockedSessions(1, 2, 1, 1, 1, 1), mockedCheckedOutSessions(1, 2), 2)); - assertFalse( - isUnbalanced( - 1, - mockedSessions(1, 2, 3, 4, 1, 2, 3, 4, 1, 1, 1, 1), - mockedCheckedOutSessions(1, 2, 3, 4), - 8)); - assertFalse( - isUnbalanced( - 1, - mockedSessions(1, 1, 2, 2, 3, 3, 4, 4, 1, 1, 1, 1), - mockedCheckedOutSessions(1, 2, 3, 4), - 8)); - - // The list of checked out sessions is allowed to contain up to twice the number of sessions - // with a given channel than it should for a perfect distribution (perfect means - // num_sessions_with_a_channel == num_channels). - assertFalse( - isUnbalanced(1, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(1, 1, 2, 3), 4)); - assertFalse( - isUnbalanced( - 1, - mockedSessions(1, 2, 3, 4), - mockedCheckedOutSessions(1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6), - 8)); - // We're only checking the list of checked out sessions against the channel that is being added - // to the pool. - assertFalse( - isUnbalanced(1, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(2, 2, 2, 2), 4)); - - // We do not consider a pool unbalanced if the list of checked out sessions only contains 2 of - // the same channel, even if that would still be 'more than twice the ideal number'. This - // prevents that a small number of checked out sessions that happen to use the same channel - // causes the pool to be considered unbalanced. - assertFalse( - isUnbalanced( - 1, mockedSessions(1, 2, 3, 4, 5, 6, 7, 8), mockedCheckedOutSessions(1, 1, 2), 8)); - - // A larger number of checked out sessions means that we can also have a 'large' number of the - // same channels in that list, as long as it does not exceed twice the number that it should be - // for an ideal distribution. - assertFalse( - isUnbalanced( - 1, - mockedSessions(1, 2, 3, 4, 5, 6, 7, 8), - mockedCheckedOutSessions(1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 2, 4, 5, 5, 3, 4, 8, 8), - 8)); - } - - @Test - public void testIsUnbalanced_returnsTrueForUnbalancedPool() { - // The pool is considered unbalanced if the first numChannel sessions contain 3 or more of the - // same sessions as the one that is being added. Also; if the pool uses only 2 channels, then it - // is also considered unbalanced if the two first sessions in the pool already use the same - // channel as the one being added. - assertTrue(isUnbalanced(1, mockedSessions(1, 1), mockedCheckedOutSessions(1, 2, 1, 2), 2)); - assertTrue(isUnbalanced(2, mockedSessions(2, 2), mockedCheckedOutSessions(1, 2, 1, 2), 2)); - - assertTrue( - isUnbalanced(1, mockedSessions(1, 1, 1, 4), mockedCheckedOutSessions(1, 2, 3, 4), 4)); - assertTrue( - isUnbalanced(2, mockedSessions(2, 2, 2, 4), mockedCheckedOutSessions(1, 2, 3, 4), 4)); - assertTrue( - isUnbalanced(3, mockedSessions(1, 3, 3, 3), mockedCheckedOutSessions(1, 2, 3, 4), 4)); - assertTrue( - isUnbalanced(4, mockedSessions(1, 4, 4, 4), mockedCheckedOutSessions(1, 2, 3, 4), 4)); - - assertTrue( - isUnbalanced( - 1, mockedSessions(1, 2, 3, 4, 5, 6, 1, 1), mockedCheckedOutSessions(1, 2, 3, 4), 8)); - assertTrue( - isUnbalanced( - 2, mockedSessions(1, 3, 4, 5, 6, 2, 2, 2), mockedCheckedOutSessions(1, 2, 3, 4), 8)); - assertTrue( - isUnbalanced( - 3, mockedSessions(1, 2, 3, 3, 4, 5, 3, 6), mockedCheckedOutSessions(1, 2, 3, 4), 8)); - assertTrue( - isUnbalanced( - 4, mockedSessions(1, 2, 3, 4, 5, 4, 5, 4), mockedCheckedOutSessions(1, 2, 3, 4), 8)); - - // The pool is also considered unbalanced if the list of checked out sessions contain more than - // 2 times as many sessions of the one being returned as it should. - assertTrue( - isUnbalanced(1, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(1, 1, 2, 1), 4)); - assertTrue( - isUnbalanced(2, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(2, 2, 2, 4), 4)); - assertTrue( - isUnbalanced(3, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(1, 3, 3, 3), 4)); - assertTrue( - isUnbalanced(4, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(4, 2, 4, 4), 4)); - assertTrue( - isUnbalanced( - 1, mockedSessions(1, 2, 3, 4), mockedCheckedOutSessions(1, 1, 2, 1, 1, 2, 3, 1), 4)); - - assertTrue( - isUnbalanced( - 1, mockedSessions(1, 2, 3, 4, 5, 6, 7, 8), mockedCheckedOutSessions(1, 1, 1, 3), 8)); - assertTrue( - isUnbalanced( - 1, - mockedSessions(1, 2, 3, 4, 5, 6, 7, 8), - mockedCheckedOutSessions(1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1), - 8)); - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java index 38aa31ad0b1..449e78cf612 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThrows; @@ -122,7 +121,6 @@ public static void startStaticServer() throws Exception { "This test is only supported on JDK11 and lower", JavaVersionUtil.getJavaMajorVersion() < 12); - disableDefaultMtlsProvider(); // Use a little reflection to set the test tracer. // This is not possible in Java 12 and later. java.lang.reflect.Field field = Tracing.class.getDeclaredField("traceComponent"); @@ -306,39 +304,16 @@ private void verifySingleUseSpans() { // OpenCensus spans and events verification Map spans = failOnOverkillTraceComponent.getSpans(); assertThat(spans).containsEntry("CloudSpanner.ReadOnlyTransaction", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessions", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessionsRequest", true); assertThat(spans).containsEntry("CloudSpannerOperation.ExecuteStreamingQuery", true); - List expectedAnnotations = - ImmutableList.of( - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", - "Creating 2 sessions", - "Acquiring session", - "Acquired session", - "Using Session", - "Starting/Resuming stream"); List expectedAnnotationsForMultiplexedSession = ImmutableList.of( - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", - "Request for 1 multiplexed session returned 1 session", - "Creating 2 sessions", - "Starting/Resuming stream"); - if (spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()) { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotationsForMultiplexedSession); - } else { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotations); - } + "Request for 1 multiplexed session returned 1 session", "Starting/Resuming stream"); + verifyAnnotations( + failOnOverkillTraceComponent.getAnnotations().stream() + .distinct() + .collect(Collectors.toList()), + expectedAnnotationsForMultiplexedSession); } @Test @@ -359,41 +334,18 @@ public void singleUseWithError() { // OpenCensus spans and events verification Map spans = failOnOverkillTraceComponent.getSpans(); assertThat(spans).containsEntry("CloudSpanner.ReadOnlyTransaction", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessions", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessionsRequest", true); assertThat(spans).containsEntry("CloudSpannerOperation.ExecuteStreamingQuery", true); - List expectedAnnotations = - ImmutableList.of( - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", - "Creating 2 sessions", - "Acquiring session", - "Acquired session", - "Using Session", - "Starting/Resuming stream", - "Stream broken. Not safe to retry"); List expectedAnnotationsForMultiplexedSession = ImmutableList.of( - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", "Request for 1 multiplexed session returned 1 session", - "Creating 2 sessions", "Starting/Resuming stream", "Stream broken. Not safe to retry"); - if (spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession()) { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotationsForMultiplexedSession); - } else { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotations); - } + verifyAnnotations( + failOnOverkillTraceComponent.getAnnotations().stream() + .distinct() + .collect(Collectors.toList()), + expectedAnnotationsForMultiplexedSession); } @Test @@ -408,43 +360,19 @@ public void multiUse() { Map spans = failOnOverkillTraceComponent.getSpans(); assertThat(spans).containsEntry("CloudSpanner.ReadOnlyTransaction", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessions", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessionsRequest", true); assertThat(spans).containsEntry("CloudSpannerOperation.ExecuteStreamingQuery", true); - List expectedAnnotations = - ImmutableList.of( - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", - "Creating 2 sessions", - "Acquiring session", - "Acquired session", - "Using Session", - "Starting/Resuming stream", - "Creating Transaction", - "Transaction Creation Done"); List expectedAnnotationsForMultiplexedSession = ImmutableList.of( - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", "Request for 1 multiplexed session returned 1 session", - "Creating 2 sessions", "Starting/Resuming stream", "Creating Transaction", "Transaction Creation Done"); - if (isMultiplexedSessionsEnabled()) { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotationsForMultiplexedSession); - } else { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotations); - } + verifyAnnotations( + failOnOverkillTraceComponent.getAnnotations().stream() + .distinct() + .collect(Collectors.toList()), + expectedAnnotationsForMultiplexedSession); } @Test @@ -453,64 +381,20 @@ public void transactionRunner() { runner.run(transaction -> transaction.executeUpdate(UPDATE_STATEMENT)); Map spans = failOnOverkillTraceComponent.getSpans(); assertThat(spans).containsEntry("CloudSpanner.ReadWriteTransaction", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessions", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessionsRequest", true); assertThat(spans).containsEntry("CloudSpannerOperation.Commit", true); - List expectedAnnotations = - ImmutableList.of( - "Acquiring session", - "Acquired session", - "Using Session", - "Starting Transaction Attempt", - "Starting Commit", - "Commit Done", - "Transaction Attempt Succeeded", - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", - "Creating 2 sessions"); - List expectedAnnotationsForMultiplexedSession = - ImmutableList.of( - "Acquiring session", - "Acquired session", - "Using Session", - "Starting Transaction Attempt", - "Starting Commit", - "Commit Done", - "Transaction Attempt Succeeded", - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", - "Request for 1 multiplexed session returned 1 session", - "Creating 2 sessions"); List expectedAnnotationsForMultiplexedSessionsRW = ImmutableList.of( "Starting Transaction Attempt", "Starting Commit", "Commit Done", "Transaction Attempt Succeeded", - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", - "Request for 1 multiplexed session returned 1 session", - "Creating 2 sessions"); - if (isMultiplexedSessionsEnabledForRW()) { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotationsForMultiplexedSessionsRW); - } else if (isMultiplexedSessionsEnabled()) { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotationsForMultiplexedSession); - } else { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotations); - } + "Request for 1 multiplexed session returned 1 session"); + verifyAnnotations( + failOnOverkillTraceComponent.getAnnotations().stream() + .distinct() + .collect(Collectors.toList()), + expectedAnnotationsForMultiplexedSessionsRW); } @Test @@ -524,65 +408,21 @@ public void transactionRunnerWithError() { Map spans = failOnOverkillTraceComponent.getSpans(); - if (isMultiplexedSessionsEnabled()) { - assertEquals(spans.toString(), 5, spans.size()); - assertThat(spans).containsEntry("CloudSpannerOperation.CreateMultiplexedSession", true); - } else { - assertThat(spans.size()).isEqualTo(4); - } + assertEquals(spans.toString(), 3, spans.size()); + assertThat(spans).containsEntry("CloudSpannerOperation.CreateMultiplexedSession", true); assertThat(spans).containsEntry("CloudSpanner.ReadWriteTransaction", true); assertThat(spans).containsEntry("CloudSpannerOperation.ExecuteUpdate", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessions", true); - assertThat(spans).containsEntry("CloudSpannerOperation.BatchCreateSessionsRequest", true); - List expectedAnnotations = - ImmutableList.of( - "Acquiring session", - "Acquired session", - "Using Session", - "Starting Transaction Attempt", - "Transaction Attempt Failed in user operation", - "Requesting 2 sessions", - "Request for 2 sessions returned 2 sessions", - "Creating 2 sessions"); - List expectedAnnotationsForMultiplexedSession = - ImmutableList.of( - "Acquiring session", - "Acquired session", - "Using Session", - "Starting Transaction Attempt", - "Transaction Attempt Failed in user operation", - "Requesting 2 sessions", - "Request for 1 multiplexed session returned 1 session", - "Request for 2 sessions returned 2 sessions", - "Creating 2 sessions"); List expectedAnnotationsForMultiplexedSessionsRW = ImmutableList.of( "Starting Transaction Attempt", "Transaction Attempt Failed in user operation", - "Requesting 2 sessions", - "Request for 1 multiplexed session returned 1 session", - "Request for 2 sessions returned 2 sessions", - "Creating 2 sessions"); - if (isMultiplexedSessionsEnabledForRW()) { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotationsForMultiplexedSessionsRW); - } else if (isMultiplexedSessionsEnabled()) { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotationsForMultiplexedSession); - } else { - verifyAnnotations( - failOnOverkillTraceComponent.getAnnotations().stream() - .distinct() - .collect(Collectors.toList()), - expectedAnnotations); - } + "Request for 1 multiplexed session returned 1 session"); + verifyAnnotations( + failOnOverkillTraceComponent.getAnnotations().stream() + .distinct() + .collect(Collectors.toList()), + expectedAnnotationsForMultiplexedSessionsRW); } private void verifyAnnotations(List actualAnnotations, List expectedAnnotations) { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterTest.java index c52cab0546c..590d62db7b5 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterTest.java @@ -371,7 +371,7 @@ public void testExportingHistogramDataWithExemplars() { DoubleExemplarData exemplar = ImmutableDoubleExemplarData.create( Attributes.builder() - .put(XGoogSpannerRequestId.REQUEST_ID, "test") + .put(XGoogSpannerRequestId.REQUEST_ID_HEADER_NAME, "test") .put("lang", "java") .build(), recordTimeEpoch, @@ -448,8 +448,10 @@ public void testExportingHistogramDataWithExemplars() { // Assert only 1 attachment is there with 1 label for request_id. assertThat(filterAttributes.size()).isEqualTo(1); assertThat(filterAttributes.get(0).getLabelCount()).isEqualTo(1); - assertThat(filterAttributes.get(0).containsLabel(XGoogSpannerRequestId.REQUEST_ID)).isTrue(); - assertThat(filterAttributes.get(0).getLabelOrThrow(XGoogSpannerRequestId.REQUEST_ID)) + assertThat(filterAttributes.get(0).containsLabel(XGoogSpannerRequestId.REQUEST_ID_HEADER_NAME)) + .isTrue(); + assertThat( + filterAttributes.get(0).getLabelOrThrow(XGoogSpannerRequestId.REQUEST_ID_HEADER_NAME)) .isEqualTo("test"); } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerExceptionFactoryTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerExceptionFactoryTest.java index 15af6bb8f1b..55b9523d7db 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerExceptionFactoryTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerExceptionFactoryTest.java @@ -251,17 +251,4 @@ private Metadata createResourceTypeMetadata(String resourceType, String resource return trailers; } - - @Test - public void withRequestId() { - XGoogSpannerRequestId reqIdIn = XGoogSpannerRequestId.of(1, 2, 3, 4); - Status status = Status.fromCodeValue(Status.Code.ABORTED.value()); - Exception exc = new StatusRuntimeException(status); - SpannerException spannerExceptionWithReqId = - SpannerExceptionFactory.newSpannerException(exc, reqIdIn); - assertThat(spannerExceptionWithReqId.getRequestId()).isEqualTo(reqIdIn.toString()); - SpannerException spannerExceptionWithoutReqId = - SpannerExceptionFactory.newSpannerException(exc); - assertThat(spannerExceptionWithoutReqId.getRequestId()).isEqualTo(""); - } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java index ac04addaf67..fc25832860a 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; @@ -112,7 +111,6 @@ public class SpannerGaxRetryTest { @BeforeClass public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult(StatementResult.query(SELECT1AND2, SELECT1_RESULTSET)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerImplTest.java index 3cf13dc58d3..a675605e768 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerImplTest.java @@ -28,7 +28,6 @@ import com.google.cloud.NoCredentials; import com.google.cloud.ServiceRpc; import com.google.cloud.grpc.GrpcTransportOptions; -import com.google.cloud.spanner.SpannerException.DoNotConstructDirectly; import com.google.cloud.spanner.SpannerImpl.ClosedException; import com.google.cloud.spanner.admin.database.v1.DatabaseAdminClient; import com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStub; @@ -45,7 +44,6 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import java.util.UUID; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; @@ -222,63 +220,6 @@ public void testSpannerClosed() { spanner4.close(); } - @Test - public void testClientId() { - // Create a unique database id to be sure it has not yet been used in the lifetime of this JVM. - String dbName = - String.format("projects/p1/instances/i1/databases/%s", UUID.randomUUID().toString()); - DatabaseId db = DatabaseId.of(dbName); - - Mockito.when(spannerOptions.getTransportOptions()) - .thenReturn(GrpcTransportOptions.newBuilder().build()); - Mockito.when(spannerOptions.getSessionPoolOptions()) - .thenReturn(SessionPoolOptions.newBuilder().setMinSessions(0).build()); - Mockito.when(spannerOptions.getDatabaseRole()).thenReturn("role"); - - DatabaseClientImpl databaseClient = (DatabaseClientImpl) impl.getDatabaseClient(db); - assertThat(databaseClient.clientId).isEqualTo("client-1"); - - // Get same db client again. - DatabaseClientImpl databaseClient1 = (DatabaseClientImpl) impl.getDatabaseClient(db); - assertThat(databaseClient1.clientId).isEqualTo(databaseClient.clientId); - - // Get a db client for a different database. - String dbName2 = - String.format("projects/p1/instances/i1/databases/%s", UUID.randomUUID().toString()); - DatabaseId db2 = DatabaseId.of(dbName2); - DatabaseClientImpl databaseClient2 = (DatabaseClientImpl) impl.getDatabaseClient(db2); - assertThat(databaseClient2.clientId).isEqualTo("client-1"); - - // Getting a new database client for an invalidated database should use the same client id. - databaseClient.pool.setResourceNotFoundException( - new DatabaseNotFoundException(DoNotConstructDirectly.ALLOWED, "not found", null, null)); - DatabaseClientImpl revalidated = (DatabaseClientImpl) impl.getDatabaseClient(db); - assertThat(revalidated).isNotSameInstanceAs(databaseClient); - assertThat(revalidated.clientId).isEqualTo(databaseClient.clientId); - - // Now invalidate the second client and request a new one. - revalidated.pool.setResourceNotFoundException( - new DatabaseNotFoundException(DoNotConstructDirectly.ALLOWED, "not found", null, null)); - DatabaseClientImpl revalidated2 = (DatabaseClientImpl) impl.getDatabaseClient(db); - assertThat(revalidated2).isNotSameInstanceAs(revalidated); - assertThat(revalidated2.clientId).isEqualTo(revalidated.clientId); - - // Create a new Spanner instance. This will generate new database clients with new ids. - try (Spanner spanner = - SpannerOptions.newBuilder() - .setProjectId("p1") - .setCredentials(NoCredentials.getInstance()) - .build() - .getService()) { - - // Get a database client for the same database as the first database. As this goes through a - // different Spanner instance with potentially different options, it will get a different - // client id. - DatabaseClientImpl databaseClient3 = (DatabaseClientImpl) spanner.getDatabaseClient(db); - assertThat(databaseClient3.clientId).isEqualTo("client-2"); - } - } - @Test public void testClosedException() { Spanner spanner = new SpannerImpl(rpc, spannerOptions); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java index 9fc065f944c..759888a6673 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java @@ -37,6 +37,7 @@ import com.google.cloud.NoCredentials; import com.google.cloud.ServiceOptions; import com.google.cloud.TransportOptions; +import com.google.cloud.grpc.GcpManagedChannelOptions.GcpChannelPoolOptions; import com.google.cloud.spanner.SpannerOptions.Builder.DefaultReadWriteTransactionOptions; import com.google.cloud.spanner.SpannerOptions.FixedCloseableExecutorProvider; import com.google.cloud.spanner.SpannerOptions.SpannerCallContextTimeoutConfigurator; @@ -1100,6 +1101,7 @@ public void testDefaultNumChannelsWithGrpcGcpExtensionDisabled() { SpannerOptions.newBuilder() .setProjectId("test-project") .setCredentials(NoCredentials.getInstance()) + .disableGrpcGcpExtension() .build(); assertEquals(SpannerOptions.DEFAULT_CHANNELS, options.getNumChannels()); @@ -1135,7 +1137,8 @@ public void testNumChannelsWithGrpcGcpExtensionEnabled() { @Test public void checkCreatedInstanceWhenGrpcGcpExtensionDisabled() { - SpannerOptions options = SpannerOptions.newBuilder().setProjectId("test-project").build(); + SpannerOptions options = + SpannerOptions.newBuilder().setProjectId("test-project").disableGrpcGcpExtension().build(); SpannerOptions options1 = options.toBuilder().build(); assertEquals(false, options.isGrpcGcpExtensionEnabled()); assertEquals(options.isGrpcGcpExtensionEnabled(), options1.isGrpcGcpExtensionEnabled()); @@ -1199,4 +1202,185 @@ public void testExperimentalHostOptions() { assertTrue(options.getSessionPoolOptions().getUseMultiplexedSessionForRW()); assertTrue(options.getSessionPoolOptions().getUseMultiplexedSessionPartitionedOps()); } + + @Test + public void testDynamicChannelPoolingDisabledByDefault() { + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setCredentials(NoCredentials.getInstance()) + .build(); + assertFalse(options.isDynamicChannelPoolEnabled()); + } + + @Test + public void testDynamicChannelPoolingEnabledExplicitly() { + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setCredentials(NoCredentials.getInstance()) + .enableDynamicChannelPool() + .build(); + assertTrue(options.isDynamicChannelPoolEnabled()); + + // Verify Spanner-specific defaults are applied + GcpChannelPoolOptions poolOptions = options.getGcpChannelPoolOptions(); + assertNotNull(poolOptions); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_INITIAL_SIZE, poolOptions.getInitSize()); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_MAX_CHANNELS, poolOptions.getMaxSize()); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_MIN_CHANNELS, poolOptions.getMinSize()); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_MAX_RPC, poolOptions.getMaxRpcPerChannel()); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_MIN_RPC, poolOptions.getMinRpcPerChannel()); + assertEquals( + SpannerOptions.DEFAULT_DYNAMIC_POOL_SCALE_DOWN_INTERVAL, + poolOptions.getScaleDownInterval()); + } + + @Test + public void testDynamicChannelPoolingDisabledWhenNumChannelsSet() { + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setCredentials(NoCredentials.getInstance()) + .enableDynamicChannelPool() + .setNumChannels(5) // Explicitly setting numChannels should disable DCP. + .build(); + assertFalse(options.isDynamicChannelPoolEnabled()); + assertEquals(5, options.getNumChannels()); + } + + @Test + public void testDynamicChannelPoolingDisabledExplicitly() { + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setCredentials(NoCredentials.getInstance()) + .enableDynamicChannelPool() + .disableDynamicChannelPool() + .build(); + assertFalse(options.isDynamicChannelPoolEnabled()); + } + + @Test + public void testDynamicChannelPoolingCustomSettings() { + Duration scaleDownInterval = Duration.ofMinutes(5); + GcpChannelPoolOptions customPoolOptions = + GcpChannelPoolOptions.newBuilder() + .setInitSize(6) + .setMaxSize(15) + .setMinSize(3) + .setDynamicScaling(10, 50, scaleDownInterval) + .build(); + + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setCredentials(NoCredentials.getInstance()) + .enableDynamicChannelPool() + .setGcpChannelPoolOptions(customPoolOptions) + .build(); + + assertTrue(options.isDynamicChannelPoolEnabled()); + GcpChannelPoolOptions poolOptions = options.getGcpChannelPoolOptions(); + assertEquals(6, poolOptions.getInitSize()); + assertEquals(15, poolOptions.getMaxSize()); + assertEquals(3, poolOptions.getMinSize()); + assertEquals(50, poolOptions.getMaxRpcPerChannel()); + assertEquals(10, poolOptions.getMinRpcPerChannel()); + assertEquals(scaleDownInterval, poolOptions.getScaleDownInterval()); + } + + @Test + public void testAffinityKeySettings() { + Duration affinityKeyLifetime = Duration.ofMinutes(10); + Duration cleanupInterval = Duration.ofMinutes(5); + GcpChannelPoolOptions poolOptions = + GcpChannelPoolOptions.newBuilder() + .setAffinityKeyLifetime(affinityKeyLifetime) + .setCleanupInterval(cleanupInterval) + .build(); + + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setCredentials(NoCredentials.getInstance()) + .enableGrpcGcpExtension() + .setGcpChannelPoolOptions(poolOptions) + .build(); + + assertEquals(affinityKeyLifetime, options.getGcpChannelPoolOptions().getAffinityKeyLifetime()); + assertEquals(cleanupInterval, options.getGcpChannelPoolOptions().getCleanupInterval()); + } + + @Test + public void testAffinityKeySettingsDefaults() { + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setCredentials(NoCredentials.getInstance()) + .enableGrpcGcpExtension() + .build(); + + // Verify default affinity key settings from Spanner defaults + GcpChannelPoolOptions poolOptions = options.getGcpChannelPoolOptions(); + assertEquals( + SpannerOptions.DEFAULT_DYNAMIC_POOL_AFFINITY_KEY_LIFETIME, + poolOptions.getAffinityKeyLifetime()); + assertEquals( + SpannerOptions.DEFAULT_DYNAMIC_POOL_CLEANUP_INTERVAL, poolOptions.getCleanupInterval()); + } + + @Test + public void testDynamicChannelPoolingDisabledWhenGrpcGcpDisabled() { + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setCredentials(NoCredentials.getInstance()) + .disableGrpcGcpExtension() + .build(); + // DCP should be disabled when grpc-gcp is disabled. + assertFalse(options.isDynamicChannelPoolEnabled()); + } + + @Test + public void testCreateDefaultDynamicChannelPoolOptions() { + // Test the static factory method for creating default options + GcpChannelPoolOptions defaults = SpannerOptions.createDefaultDynamicChannelPoolOptions(); + assertNotNull(defaults); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_MAX_CHANNELS, defaults.getMaxSize()); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_MIN_CHANNELS, defaults.getMinSize()); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_INITIAL_SIZE, defaults.getInitSize()); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_MAX_RPC, defaults.getMaxRpcPerChannel()); + assertEquals(SpannerOptions.DEFAULT_DYNAMIC_POOL_MIN_RPC, defaults.getMinRpcPerChannel()); + assertEquals( + SpannerOptions.DEFAULT_DYNAMIC_POOL_SCALE_DOWN_INTERVAL, defaults.getScaleDownInterval()); + assertEquals( + SpannerOptions.DEFAULT_DYNAMIC_POOL_AFFINITY_KEY_LIFETIME, + defaults.getAffinityKeyLifetime()); + assertEquals( + SpannerOptions.DEFAULT_DYNAMIC_POOL_CLEANUP_INTERVAL, defaults.getCleanupInterval()); + } + + @Test + public void testPlainTextOptions() { + SpannerOptions options = + SpannerOptions.newBuilder().setExperimentalHost("localhost:8080").usePlainText().build(); + assertEquals("http://localhost:8080", options.getHost()); + assertEquals(NoCredentials.getInstance(), options.getCredentials()); + options = + SpannerOptions.newBuilder() + .setExperimentalHost("http://localhost:8080") + .usePlainText() + .build(); + assertEquals("http://localhost:8080", options.getHost()); + options = + SpannerOptions.newBuilder().usePlainText().setExperimentalHost("localhost:8080").build(); + assertEquals("http://localhost:8080", options.getHost()); + options = + SpannerOptions.newBuilder() + .usePlainText() + .setExperimentalHost("http://localhost:8080") + .build(); + assertEquals("http://localhost:8080", options.getHost()); + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerThreadsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerThreadsTest.java index 0d11bf6ccb7..9b6ffaf19ca 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerThreadsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerThreadsTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; @@ -94,7 +93,6 @@ public static void startServer() throws Exception { + " emulator is running", System.getenv("SPANNER_EMULATOR_HOST") == null); - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult(StatementResult.query(SELECT1AND2, SELECT1_RESULTSET)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/StandardBenchmarkMockServer.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/StandardBenchmarkMockServer.java index 2940adbacef..83255fcf3af 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/StandardBenchmarkMockServer.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/StandardBenchmarkMockServer.java @@ -16,8 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; - import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime; @@ -85,7 +83,6 @@ class StandardBenchmarkMockServer { private LocalChannelProvider channelProvider; TransportChannelProvider start() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionChannelHintTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionChannelHintTest.java index b68ef4667d5..cdb0039ccd5 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionChannelHintTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionChannelHintTest.java @@ -16,33 +16,32 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_COLUMN_NAMES; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_ONE_KEY_VALUE_RESULTSET; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_ONE_KEY_VALUE_STATEMENT; import static com.google.cloud.spanner.MockSpannerTestUtil.READ_TABLE_NAME; -import static io.grpc.Grpc.TRANSPORT_ATTR_REMOTE_ADDR; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import com.google.api.gax.grpc.GrpcInterceptorProvider; import com.google.cloud.NoCredentials; +import com.google.cloud.grpc.GcpManagedChannel; import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult; import com.google.cloud.spanner.Options.RpcPriority; import com.google.cloud.spanner.ReadContext.QueryAnalyzeMode; +import com.google.common.collect.ImmutableList; import com.google.protobuf.ListValue; import com.google.spanner.v1.ResultSetMetadata; import com.google.spanner.v1.SpannerGrpc; import com.google.spanner.v1.StructType; import com.google.spanner.v1.StructType.Field; import com.google.spanner.v1.TypeCode; -import io.grpc.Attributes; -import io.grpc.Context; -import io.grpc.Contexts; -import io.grpc.Metadata; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; +import io.grpc.MethodDescriptor; import io.grpc.Server; -import io.grpc.ServerCall; -import io.grpc.ServerCallHandler; -import io.grpc.ServerInterceptor; import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder; import java.net.InetSocketAddress; import java.util.Set; @@ -62,7 +61,8 @@ * transaction, they go via same channel. For regular session, the hint is stored per session. For * multiplexed sessions this hint is stored per transaction. * - *

The below tests assert this behavior for both kinds of sessions. + *

The below tests assert this behavior by verifying that all operations within a transaction use + * the same channel hint (extracted from the X-Goog-Spanner-Request-Id header). */ @RunWith(JUnit4.class) public class TransactionChannelHintTest { @@ -94,15 +94,15 @@ public class TransactionChannelHintTest { private static MockSpannerServiceImpl mockSpanner; private static Server server; private static InetSocketAddress address; - private static final Set executeSqlLocalIps = ConcurrentHashMap.newKeySet(); - private static final Set beginTransactionLocalIps = - ConcurrentHashMap.newKeySet(); - private static final Set streamingReadLocalIps = ConcurrentHashMap.newKeySet(); + // Track logical affinity keys (before grpc-gcp routing) per RPC method. + // These are captured by a client interceptor to verify channel affinity consistency. + private static final Set executeSqlAffinityKeys = ConcurrentHashMap.newKeySet(); + private static final Set beginTransactionAffinityKeys = ConcurrentHashMap.newKeySet(); + private static final Set streamingReadAffinityKeys = ConcurrentHashMap.newKeySet(); private static Level originalLogLevel; @BeforeClass public static void startServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult(StatementResult.query(SELECT1, SELECT1_RESULTSET)); @@ -110,44 +110,40 @@ public static void startServer() throws Exception { StatementResult.query(READ_ONE_KEY_VALUE_STATEMENT, READ_ONE_KEY_VALUE_RESULTSET)); address = new InetSocketAddress("localhost", 0); - server = - NettyServerBuilder.forAddress(address) - .addService(mockSpanner) - // Add a server interceptor to register the remote addresses that we are seeing. This - // indicates how many channels are used client side to communicate with the server. - .intercept( - new ServerInterceptor() { - @Override - public ServerCall.Listener interceptCall( - ServerCall call, - Metadata headers, - ServerCallHandler next) { - Attributes attributes = call.getAttributes(); - @SuppressWarnings({"unchecked", "deprecation"}) - Attributes.Key key = - (Attributes.Key) - attributes.keys().stream() - .filter(k -> k.equals(TRANSPORT_ATTR_REMOTE_ADDR)) - .findFirst() - .orElse(null); - if (key != null) { - if (call.getMethodDescriptor() - .equals(SpannerGrpc.getExecuteStreamingSqlMethod())) { - executeSqlLocalIps.add(attributes.get(key)); - } - if (call.getMethodDescriptor().equals(SpannerGrpc.getStreamingReadMethod())) { - streamingReadLocalIps.add(attributes.get(key)); - } - if (call.getMethodDescriptor() - .equals(SpannerGrpc.getBeginTransactionMethod())) { - beginTransactionLocalIps.add(attributes.get(key)); - } - } - return Contexts.interceptCall(Context.current(), call, headers, next); + server = NettyServerBuilder.forAddress(address).addService(mockSpanner).build().start(); + } + + /** + * Creates a client interceptor that captures the logical affinity key before grpc-gcp routes the + * request. This allows us to verify that all operations within a transaction use the same logical + * channel affinity, even though the physical channel ID may vary. + */ + private static GrpcInterceptorProvider createAffinityKeyInterceptorProvider() { + return () -> + ImmutableList.of( + new ClientInterceptor() { + @Override + public ClientCall interceptCall( + MethodDescriptor method, CallOptions callOptions, Channel next) { + // Capture the AFFINITY_KEY before grpc-gcp processes it + String affinityKey = callOptions.getOption(GcpManagedChannel.AFFINITY_KEY); + if (affinityKey != null) { + String methodName = method.getFullMethodName(); + if (methodName.equals( + SpannerGrpc.getExecuteStreamingSqlMethod().getFullMethodName())) { + executeSqlAffinityKeys.add(affinityKey); + } + if (methodName.equals(SpannerGrpc.getStreamingReadMethod().getFullMethodName())) { + streamingReadAffinityKeys.add(affinityKey); + } + if (methodName.equals( + SpannerGrpc.getBeginTransactionMethod().getFullMethodName())) { + beginTransactionAffinityKeys.add(affinityKey); } - }) - .build() - .start(); + } + return next.newCall(method, callOptions); + } + }); } @AfterClass @@ -172,9 +168,9 @@ public static void resetLogging() { @After public void reset() { mockSpanner.reset(); - executeSqlLocalIps.clear(); - streamingReadLocalIps.clear(); - beginTransactionLocalIps.clear(); + executeSqlAffinityKeys.clear(); + streamingReadAffinityKeys.clear(); + beginTransactionAffinityKeys.clear(); } private SpannerOptions createSpannerOptions() { @@ -189,24 +185,26 @@ private SpannerOptions createSpannerOptions() { .setCompressorName("gzip") .setHost("http://" + endpoint) .setCredentials(NoCredentials.getInstance()) + .setInterceptorProvider(createAffinityKeyInterceptorProvider()) .setSessionPoolOption( SessionPoolOptions.newBuilder().setSkipVerifyingBeginTransactionForMuxRW(true).build()) .build(); } @Test - public void testSingleUseReadOnlyTransaction_usesSingleChannel() { + public void testSingleUseReadOnlyTransaction_usesSingleChannelHint() { try (Spanner spanner = createSpannerOptions().getService()) { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); try (ResultSet resultSet = client.singleUseReadOnlyTransaction().executeQuery(SELECT1)) { while (resultSet.next()) {} } } - assertEquals(1, executeSqlLocalIps.size()); + // All ExecuteSql calls should use the same logical affinity key + assertEquals(1, executeSqlAffinityKeys.size()); } @Test - public void testSingleUseReadOnlyTransaction_withTimestampBound_usesSingleChannel() { + public void testSingleUseReadOnlyTransaction_withTimestampBound_usesSingleChannelHint() { try (Spanner spanner = createSpannerOptions().getService()) { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); try (ResultSet resultSet = @@ -216,11 +214,12 @@ public void testSingleUseReadOnlyTransaction_withTimestampBound_usesSingleChanne while (resultSet.next()) {} } } - assertEquals(1, executeSqlLocalIps.size()); + // All ExecuteSql calls should use the same logical affinity key + assertEquals(1, executeSqlAffinityKeys.size()); } @Test - public void testReadOnlyTransaction_usesSingleChannel() { + public void testReadOnlyTransaction_usesSingleChannelHint() { try (Spanner spanner = createSpannerOptions().getService()) { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); try (ReadOnlyTransaction transaction = client.readOnlyTransaction()) { @@ -232,13 +231,14 @@ public void testReadOnlyTransaction_usesSingleChannel() { } } } - assertEquals(1, executeSqlLocalIps.size()); - assertEquals(1, beginTransactionLocalIps.size()); - assertEquals(executeSqlLocalIps, beginTransactionLocalIps); + // All ExecuteSql calls within the transaction should use the same logical affinity key + assertEquals(1, executeSqlAffinityKeys.size()); + // BeginTransaction should use a single logical affinity key + assertEquals(1, beginTransactionAffinityKeys.size()); } @Test - public void testReadOnlyTransaction_withTimestampBound_usesSingleChannel() { + public void testReadOnlyTransaction_withTimestampBound_usesSingleChannelHint() { try (Spanner spanner = createSpannerOptions().getService()) { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); try (ReadOnlyTransaction transaction = @@ -251,13 +251,14 @@ public void testReadOnlyTransaction_withTimestampBound_usesSingleChannel() { } } } - assertEquals(1, executeSqlLocalIps.size()); - assertEquals(1, beginTransactionLocalIps.size()); - assertEquals(executeSqlLocalIps, beginTransactionLocalIps); + // All ExecuteSql calls within the transaction should use the same logical affinity key + assertEquals(1, executeSqlAffinityKeys.size()); + // BeginTransaction should use a single logical affinity key + assertEquals(1, beginTransactionAffinityKeys.size()); } @Test - public void testTransactionManager_usesSingleChannel() { + public void testTransactionManager_usesSingleChannelHint() { try (Spanner spanner = createSpannerOptions().getService()) { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); try (TransactionManager manager = client.transactionManager()) { @@ -282,11 +283,12 @@ public void testTransactionManager_usesSingleChannel() { } } } - assertEquals(1, executeSqlLocalIps.size()); + // All ExecuteSql calls within the transaction should use the same logical affinity key + assertEquals(1, executeSqlAffinityKeys.size()); } @Test - public void testTransactionRunner_usesSingleChannel() { + public void testTransactionRunner_usesSingleChannelHint() { try (Spanner spanner = createSpannerOptions().getService()) { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d")); TransactionRunner runner = client.readWriteTransaction(); @@ -312,6 +314,7 @@ public void testTransactionRunner_usesSingleChannel() { return null; }); } - assertEquals(1, streamingReadLocalIps.size()); + // All StreamingRead calls within the transaction should use the same logical affinity key + assertEquals(1, streamingReadAffinityKeys.size()); } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionContextImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionContextImplTest.java index 4c507b7beae..49a47364a58 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionContextImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionContextImplTest.java @@ -27,6 +27,7 @@ import com.google.api.core.ApiFutures; import com.google.cloud.spanner.TransactionRunnerImpl.TransactionContextImpl; +import com.google.cloud.spanner.XGoogSpannerRequestId.NoopRequestIdCreator; import com.google.cloud.spanner.spi.v1.SpannerRpc; import com.google.cloud.spanner.v1.stub.SpannerStubSettings; import com.google.protobuf.ByteString; @@ -66,9 +67,13 @@ public void setup() { com.google.spanner.v1.CommitResponse.newBuilder() .setCommitTimestamp(Timestamp.newBuilder().setSeconds(99L).setNanos(10).build()) .build())); + when(rpc.getRequestIdCreator()).thenReturn(NoopRequestIdCreator.INSTANCE); when(session.getName()).thenReturn("test"); - when(session.getRequestIdCreator()) - .thenReturn(new XGoogSpannerRequestId.NoopRequestIdCreator()); + when(session.getRequestIdCreator()).thenReturn(NoopRequestIdCreator.INSTANCE); + SpannerImpl spanner = mock(SpannerImpl.class); + SpannerOptions spannerOptions = mock(SpannerOptions.class); + when(spanner.getOptions()).thenReturn(spannerOptions); + when(session.getSpanner()).thenReturn(spanner); doNothing().when(span).setStatus(any(Throwable.class)); doNothing().when(span).end(); doNothing().when(span).addAnnotation("Starting Commit"); @@ -212,8 +217,11 @@ public void testReturnCommitStats() { private void batchDml(int status) { SessionImpl session = mock(SessionImpl.class); when(session.getName()).thenReturn("test"); - when(session.getRequestIdCreator()) - .thenReturn(new XGoogSpannerRequestId.NoopRequestIdCreator()); + when(session.getRequestIdCreator()).thenReturn(NoopRequestIdCreator.INSTANCE); + SpannerImpl spanner = mock(SpannerImpl.class); + SpannerOptions spannerOptions = mock(SpannerOptions.class); + when(spanner.getOptions()).thenReturn(spannerOptions); + when(session.getSpanner()).thenReturn(spanner); SpannerRpc rpc = mock(SpannerRpc.class); ExecuteBatchDmlResponse response = ExecuteBatchDmlResponse.newBuilder() diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerAbortedTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerAbortedTest.java index fdf44f0b228..ae24eeb7696 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerAbortedTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerAbortedTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; @@ -128,7 +127,6 @@ public class TransactionManagerAbortedTest { @BeforeClass public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. mockSpanner.putStatementResult( diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerImplTest.java index 19c03859e66..547f6b70a22 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionManagerImplTest.java @@ -241,7 +241,7 @@ public void usesPreparedTransaction() { Mockito.anyString(), Mockito.anyString(), Mockito.anyMap(), - Mockito.anyMap(), + Mockito.eq(null), Mockito.eq(true))) .thenAnswer( invocation -> @@ -324,7 +324,7 @@ public void inlineBegin() { Mockito.anyString(), Mockito.anyString(), Mockito.anyMap(), - Mockito.anyMap(), + Mockito.eq(null), Mockito.eq(true))) .thenAnswer( invocation -> diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java index 2325f2ac40f..1dd2418aa05 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java @@ -23,7 +23,6 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; @@ -36,6 +35,7 @@ import com.google.cloud.spanner.ErrorHandler.DefaultErrorHandler; import com.google.cloud.spanner.SessionClient.SessionId; import com.google.cloud.spanner.TransactionRunnerImpl.TransactionContextImpl; +import com.google.cloud.spanner.XGoogSpannerRequestId.NoopRequestIdCreator; import com.google.cloud.spanner.spi.v1.SpannerRpc; import com.google.cloud.spanner.v1.stub.SpannerStubSettings; import com.google.common.base.Preconditions; @@ -52,6 +52,7 @@ import com.google.spanner.v1.ExecuteBatchDmlResponse; import com.google.spanner.v1.ExecuteSqlRequest; import com.google.spanner.v1.ExecuteSqlRequest.QueryOptions; +import com.google.spanner.v1.RequestOptions; import com.google.spanner.v1.ResultSet; import com.google.spanner.v1.ResultSetMetadata; import com.google.spanner.v1.ResultSetStats; @@ -78,6 +79,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; @@ -121,8 +123,12 @@ public void setUp() { when(session.getErrorHandler()).thenReturn(DefaultErrorHandler.INSTANCE); when(session.newTransaction(eq(Options.fromTransactionOptions()), any())).thenReturn(txn); when(session.getTracer()).thenReturn(tracer); - when(session.getRequestIdCreator()) - .thenReturn(new XGoogSpannerRequestId.NoopRequestIdCreator()); + when(session.getRequestIdCreator()).thenReturn(NoopRequestIdCreator.INSTANCE); + when(rpc.getRequestIdCreator()).thenReturn(NoopRequestIdCreator.INSTANCE); + SpannerImpl spanner = mock(SpannerImpl.class); + SpannerOptions spannerOptions = mock(SpannerOptions.class); + when(spanner.getOptions()).thenReturn(spannerOptions); + when(session.getSpanner()).thenReturn(spanner); when(rpc.executeQuery(Mockito.any(ExecuteSqlRequest.class), Mockito.anyMap(), eq(true))) .thenAnswer( invocation -> { @@ -158,6 +164,37 @@ public void setUp() { transactionRunner.setSpan(span); } + @Test + public void testCommitWithClientContext() { + RequestOptions.ClientContext clientContext = + RequestOptions.ClientContext.newBuilder() + .putSecureContext( + "key", com.google.protobuf.Value.newBuilder().setStringValue("value").build()) + .build(); + when(session.getName()).thenReturn("projects/p/instances/i/databases/d/sessions/s"); + when(session.newTransaction(any(Options.class), any())).thenReturn(txn); + Mockito.clearInvocations(session); + transactionRunner = + new TransactionRunnerImpl( + session, + Options.priority(Options.RpcPriority.HIGH), + Options.tag("tag"), + Options.clientContext(clientContext)); + transactionRunner.setSpan(span); + + transactionRunner.run( + transaction -> { + return null; + }); + + ArgumentCaptor optionsCaptor = ArgumentCaptor.forClass(Options.class); + verify(session).newTransaction(optionsCaptor.capture(), any()); + Options capturedOptions = optionsCaptor.getValue(); + assertEquals(RequestOptions.Priority.PRIORITY_HIGH, capturedOptions.priority()); + assertEquals("tag", capturedOptions.tag()); + assertEquals(clientContext, capturedOptions.clientContext()); + } + @SuppressWarnings("unchecked") @Test public void usesPreparedTransaction() { @@ -195,7 +232,7 @@ public void usesPreparedTransaction() { Mockito.anyString(), Mockito.anyString(), Mockito.anyMap(), - Mockito.anyMap(), + Mockito.eq(null), Mockito.eq(true))) .thenAnswer( invocation -> @@ -335,8 +372,7 @@ public void inlineBegin() { new SessionImpl( spanner, new SessionReference( - "projects/p/instances/i/databases/d/sessions/s", Collections.EMPTY_MAP)) {}; - session.setRequestIdCreator(new XGoogSpannerRequestId.NoopRequestIdCreator()); + "projects/p/instances/i/databases/d/sessions/s", null, Collections.EMPTY_MAP)) {}; session.setCurrentSpan(new OpenTelemetrySpan(mock(io.opentelemetry.api.trace.Span.class))); TransactionRunnerImpl runner = new TransactionRunnerImpl(session); runner.setSpan(span); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/XGoogSpannerRequestIdTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/XGoogSpannerRequestIdTest.java index 719b94593bf..32d1ac29d2e 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/XGoogSpannerRequestIdTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/XGoogSpannerRequestIdTest.java @@ -16,6 +16,7 @@ package com.google.cloud.spanner; +import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; @@ -67,17 +68,14 @@ public void testEnsureHexadecimalFormatForRandProcessID() { } public static class ServerHeaderEnforcer implements ServerInterceptor { - private Map> unaryResults; - private Map> streamingResults; - private List gotValues; - private Set checkMethods; + private final Map> unaryResults = + new ConcurrentHashMap<>(); + private final Map> streamingResults = + new ConcurrentHashMap<>(); + private final List gotValues = new CopyOnWriteArrayList<>(); + private final Set checkMethods; ServerHeaderEnforcer(Set checkMethods) { - this.gotValues = new CopyOnWriteArrayList(); - this.unaryResults = - new ConcurrentHashMap>(); - this.streamingResults = - new ConcurrentHashMap>(); this.checkMethods = checkMethods; } @@ -88,7 +86,7 @@ public ServerCall.Listener interceptCall( ServerCallHandler next) { boolean isUnary = call.getMethodDescriptor().getType() == MethodType.UNARY; String methodName = call.getMethodDescriptor().getFullMethodName(); - String gotReqIdStr = requestHeaders.get(XGoogSpannerRequestId.REQUEST_HEADER_KEY); + String gotReqIdStr = requestHeaders.get(XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY); if (!this.checkMethods.contains(methodName)) { return next.startCall(call, requestHeaders); } @@ -102,7 +100,7 @@ public ServerCall.Listener interceptCall( Status status = Status.fromCode(Status.Code.INVALID_ARGUMENT) .augmentDescription( - methodName + " lacks " + XGoogSpannerRequestId.REQUEST_HEADER_KEY); + methodName + " lacks " + XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY); call.close(status, requestHeaders); return next.startCall(call, requestHeaders); } @@ -128,14 +126,8 @@ public String[] accumulatedValues() { } public void assertIntegrity() { - this.unaryResults.forEach( - (String method, CopyOnWriteArrayList values) -> { - assertMonotonicityOfIds(method, values); - }); - this.streamingResults.forEach( - (String method, CopyOnWriteArrayList values) -> { - assertMonotonicityOfIds(method, values); - }); + this.unaryResults.forEach(this::assertMonotonicityOfIds); + this.streamingResults.forEach(this::assertMonotonicityOfIds); } private void assertMonotonicityOfIds(String prefix, List reqIds) { @@ -161,22 +153,22 @@ private void assertMonotonicityOfIds(String prefix, List } public MethodAndRequestId[] accumulatedUnaryValues() { - List accumulated = new ArrayList(); + List accumulated = new ArrayList<>(); this.unaryResults.forEach( (String method, CopyOnWriteArrayList values) -> { - for (int i = 0; i < values.size(); i++) { - accumulated.add(new MethodAndRequestId(method, values.get(i))); + for (XGoogSpannerRequestId value : values) { + accumulated.add(new MethodAndRequestId(method, value)); } }); return accumulated.toArray(new MethodAndRequestId[0]); } public MethodAndRequestId[] accumulatedStreamingValues() { - List accumulated = new ArrayList(); + List accumulated = new ArrayList<>(); this.streamingResults.forEach( (String method, CopyOnWriteArrayList values) -> { - for (int i = 0; i < values.size(); i++) { - accumulated.add(new MethodAndRequestId(method, values.get(i))); + for (XGoogSpannerRequestId value : values) { + accumulated.add(new MethodAndRequestId(method, value)); } }); return accumulated.toArray(new MethodAndRequestId[0]); @@ -188,7 +180,7 @@ public void checkExpectedUnaryXGoogRequestIds(MethodAndRequestId... wantUnaryVal for (int i = 0; i < gotUnaryValues.length && false; i++) { System.out.println("\033[33misUnary: #" + i + ":: " + gotUnaryValues[i] + "\033[00m"); } - assertEquals(wantUnaryValues, gotUnaryValues); + assertArrayEquals(wantUnaryValues, gotUnaryValues); } public void checkAtLeastHasExpectedUnaryXGoogRequestIds(MethodAndRequestId... wantUnaryValues) { @@ -200,9 +192,9 @@ public void checkAtLeastHasExpectedUnaryXGoogRequestIds(MethodAndRequestId... wa if (wantUnaryValues.length < gotUnaryValues.length) { MethodAndRequestId[] gotSliced = Arrays.copyOfRange(gotUnaryValues, 0, wantUnaryValues.length); - assertEquals(wantUnaryValues, gotSliced); + assertArrayEquals(wantUnaryValues, gotSliced); } else { - assertEquals(wantUnaryValues, gotUnaryValues); + assertArrayEquals(wantUnaryValues, gotUnaryValues); } } @@ -218,9 +210,9 @@ public void checkExpectedUnaryXGoogRequestIdsAsSuffixes(MethodAndRequestId... wa gotUnaryValues, gotUnaryValues.length - wantUnaryValues.length, gotUnaryValues.length); - assertEquals(wantUnaryValues, gotSliced); + assertArrayEquals(wantUnaryValues, gotSliced); } else { - assertEquals(wantUnaryValues, gotUnaryValues); + assertArrayEquals(wantUnaryValues, gotUnaryValues); } } @@ -236,7 +228,7 @@ public void checkExpectedStreamingXGoogRequestIds(MethodAndRequestId... wantStre "\033[32misStreaming: #" + i + ":: " + gotStreamingValues[i] + "\033[00m"); } sortValues(gotStreamingValues); - assertEquals(wantStreamingValues, gotStreamingValues); + assertArrayEquals(wantStreamingValues, gotStreamingValues); } public void reset() { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java index 05eeeb8fcc6..f878f2c7e3b 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientHttpJsonTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java index a7b2a7b12f5..380a0dd4d9b 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/DatabaseAdminClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdmin.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdmin.java index 7413a706502..3a689c8cde8 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdmin.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdmin.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java index aeeb5f2b061..b262db7d4e0 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/database/v1/MockDatabaseAdminImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java index 9c1936d803c..adb7056c08a 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1607,6 +1607,7 @@ public void getInstancePartitionTest() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1662,6 +1663,7 @@ public void getInstancePartitionTest2() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1717,6 +1719,7 @@ public void createInstancePartitionTest() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1780,6 +1783,7 @@ public void createInstancePartitionTest2() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1927,6 +1931,7 @@ public void updateInstancePartitionTest() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1948,6 +1953,7 @@ public void updateInstancePartitionTest() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1990,6 +1996,7 @@ public void updateInstancePartitionExceptionTest() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java index f278564943c..5181dbe256f 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1452,6 +1452,7 @@ public void getInstancePartitionTest() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1502,6 +1503,7 @@ public void getInstancePartitionTest2() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1550,6 +1552,7 @@ public void createInstancePartitionTest() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1613,6 +1616,7 @@ public void createInstancePartitionTest2() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) @@ -1748,6 +1752,7 @@ public void updateInstancePartitionTest() throws Exception { .toString()) .setConfig(InstanceConfigName.of("[PROJECT]", "[INSTANCE_CONFIG]").toString()) .setDisplayName("displayName1714148973") + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .addAllReferencingDatabases(new ArrayList()) diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdmin.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdmin.java index 9ec33b8fe56..a5871925a1b 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdmin.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdmin.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java index 073d7c69a43..b0d4f9a857b 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/MockInstanceAdminImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java index cf546e95888..67b4c8e0559 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java @@ -16,8 +16,6 @@ package com.google.cloud.spanner.connection; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; - import com.google.cloud.spanner.Dialect; import com.google.cloud.spanner.ForceCloseSpannerFunction; import com.google.cloud.spanner.MockSpannerServiceImpl; @@ -110,7 +108,7 @@ public abstract class AbstractMockServerTest { .setMetadata(SINGLE_COL_INT64_RESULTSET_METADATA) .build(); public static final com.google.spanner.v1.ResultSet UPDATE_RETURNING_RESULTSET = - com.google.spanner.v1.ResultSet.newBuilder() + ResultSet.newBuilder() .setStats(ResultSetStats.newBuilder().setRowCountExact(1)) .setMetadata( ResultSetMetadata.newBuilder() @@ -121,6 +119,10 @@ public abstract class AbstractMockServerTest { .setName("col") .setType(Type.newBuilder().setCodeValue(TypeCode.INT64_VALUE)) .build()))) + .addRows( + ListValue.newBuilder() + .addValues(Value.newBuilder().setStringValue("1").build()) + .build()) .build(); protected static final ResultSet SELECT1_RESULTSET = @@ -159,7 +161,6 @@ public abstract class AbstractMockServerTest { @BeforeClass public static void startStaticServer() throws Exception { - disableDefaultMtlsProvider(); startStaticServer(createServerInterceptor()); } @@ -310,7 +311,7 @@ protected String getBaseUrl() { server.getPort()); } - protected int getPort() { + protected static int getPort() { return server.getPort(); } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AutoCommitMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AutoCommitMockServerTest.java index 7d9e9a684f6..961d90e14d8 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AutoCommitMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AutoCommitMockServerTest.java @@ -20,17 +20,23 @@ import static com.google.cloud.spanner.connection.ConnectionProperties.READ_LOCK_MODE; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; +import com.google.cloud.spanner.ErrorCode; +import com.google.cloud.spanner.MockSpannerServiceImpl; import com.google.cloud.spanner.ResultSet; +import com.google.cloud.spanner.SpannerException; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.connection.ITAbstractSpannerTest.ITConnection; import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.ExecuteBatchDmlRequest; import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.RollbackRequest; import com.google.spanner.v1.TransactionOptions.IsolationLevel; import com.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode; +import io.grpc.Status; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -106,6 +112,34 @@ public void testDml() { assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); } + @Test + public void testDmlFailed() { + Statement invalidInsert = Statement.of("insert into my_table (id, name) values (1, 'test')"); + mockSpanner.putStatementResult( + MockSpannerServiceImpl.StatementResult.exception( + invalidInsert, + Status.ALREADY_EXISTS.withDescription("Row 1 already exists").asRuntimeException())); + + try (Connection connection = createConnection()) { + connection.setAutocommit(true); + SpannerException exception = + assertThrows(SpannerException.class, () -> connection.executeUpdate(invalidInsert)); + assertEquals(ErrorCode.ALREADY_EXISTS, exception.getErrorCode()); + } + assertEquals(0, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + ExecuteSqlRequest request = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class).get(0); + assertTrue(request.getTransaction().hasBegin()); + assertTrue(request.getTransaction().getBegin().hasReadWrite()); + assertEquals(isolationLevel, request.getTransaction().getBegin().getIsolationLevel()); + assertEquals( + readLockMode, request.getTransaction().getBegin().getReadWrite().getReadLockMode()); + assertTrue(request.getLastStatement()); + // There should be no rollback request on the server, as there was no transaction ID returned + // to the client. + assertEquals(0, mockSpanner.countRequestsOfType(RollbackRequest.class)); + } + @Test public void testDmlReturning() { try (Connection connection = createConnection()) { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AutoDmlBatchMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AutoDmlBatchMockServerTest.java index a7467997c6a..b359bcb60cc 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AutoDmlBatchMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AutoDmlBatchMockServerTest.java @@ -97,6 +97,8 @@ public void testDmlWithReturningAfterDml() { // DML with a THEN RETURN clause cannot be batched. This therefore flushes the batch and // executes the INSERT ... THEN RETURN statement as a separate ExecuteSqlRequest. try (ResultSet resultSet = connection.executeQuery(INSERT_RETURNING_STATEMENT)) { + assertTrue(resultSet.next()); + assertEquals(1L, resultSet.getLong(0)); assertFalse(resultSet.next()); } @@ -123,6 +125,8 @@ public void testDmlWithReturningAfterDml_usingExecute() { StatementResult result = connection.execute(INSERT_RETURNING_STATEMENT); assertEquals(ResultType.RESULT_SET, result.getResultType()); try (ResultSet resultSet = result.getResultSet()) { + assertTrue(resultSet.next()); + assertEquals(1L, resultSet.getLong(0)); assertFalse(resultSet.next()); } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/CallTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/CallTest.java new file mode 100644 index 00000000000..5a46d4cd58f --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/CallTest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.connection; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; + +import com.google.cloud.spanner.MockSpannerServiceImpl; +import com.google.cloud.spanner.ResultSet; +import com.google.cloud.spanner.Statement; +import com.google.spanner.v1.ResultSetMetadata; +import com.google.spanner.v1.StructType; +import com.google.spanner.v1.StructType.Field; +import com.google.spanner.v1.Type; +import com.google.spanner.v1.TypeCode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class CallTest extends AbstractMockServerTest { + + @Test + public void testCancelQuery() { + // 'CALL' should be recognized as a valid query keyword. + Statement statement = Statement.of("call cancel_query('1234')"); + mockSpanner.putStatementResult( + MockSpannerServiceImpl.StatementResult.query( + statement, + com.google.spanner.v1.ResultSet.newBuilder() + .setMetadata( + ResultSetMetadata.newBuilder() + .setRowType( + StructType.newBuilder() + .addFields( + Field.newBuilder() + .setName("call_result_tvf") + .setType(Type.newBuilder().setCode(TypeCode.BOOL).build()) + .build()) + .build()) + .build()) + .build())); + + try (Connection connection = createConnection()) { + try (ResultSet resultSet = connection.executeQuery(statement)) { + assertFalse(resultSet.next()); + assertEquals(1, resultSet.getColumnCount()); + } + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ClientContextMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ClientContextMockServerTest.java new file mode 100644 index 00000000000..093af070ea6 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ClientContextMockServerTest.java @@ -0,0 +1,353 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.connection; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; + +import com.google.cloud.spanner.DatabaseClient; +import com.google.cloud.spanner.DatabaseId; +import com.google.cloud.spanner.Dialect; +import com.google.cloud.spanner.MockSpannerServiceImpl; +import com.google.cloud.spanner.Mutation; +import com.google.cloud.spanner.ResultSet; +import com.google.cloud.spanner.Spanner; +import com.google.cloud.spanner.SpannerOptions; +import com.google.protobuf.Value; +import com.google.spanner.v1.BeginTransactionRequest; +import com.google.spanner.v1.CommitRequest; +import com.google.spanner.v1.ExecuteBatchDmlRequest; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.RequestOptions; +import java.util.Collections; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +@RunWith(Parameterized.class) +public class ClientContextMockServerTest extends AbstractMockServerTest { + + @Parameters(name = "dialect = {0}") + public static Object[] data() { + return Dialect.values(); + } + + @Parameter public Dialect dialect; + + private Dialect currentDialect; + + private static final RequestOptions.ClientContext CLIENT_CONTEXT = + RequestOptions.ClientContext.newBuilder() + .putSecureContext("test-key", Value.newBuilder().setStringValue("test-value").build()) + .build(); + + @Before + public void setupDialect() { + if (currentDialect != dialect) { + mockSpanner.putStatementResult( + MockSpannerServiceImpl.StatementResult.detectDialectResult(dialect)); + SpannerPool.closeSpannerPool(); + currentDialect = dialect; + } + } + + @After + public void clearRequests() { + mockSpanner.clearRequests(); + } + + @Test + public void testQuery_PropagatesClientContext() { + try (Connection connection = createConnection()) { + connection.setClientContext(CLIENT_CONTEXT); + try (ResultSet ignore = connection.executeQuery(SELECT_COUNT_STATEMENT)) {} + + assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + assertEquals( + CLIENT_CONTEXT, + mockSpanner + .getRequestsOfType(ExecuteSqlRequest.class) + .get(0) + .getRequestOptions() + .getClientContext()); + } + } + + @Test + public void testUpdate_PropagatesClientContext() { + try (Connection connection = createConnection()) { + connection.setClientContext(CLIENT_CONTEXT); + connection.executeUpdate(INSERT_STATEMENT); + + assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + assertEquals( + CLIENT_CONTEXT, + mockSpanner + .getRequestsOfType(ExecuteSqlRequest.class) + .get(0) + .getRequestOptions() + .getClientContext()); + } + } + + @Test + public void testBatchUpdate_PropagatesClientContext() { + try (Connection connection = createConnection()) { + connection.setClientContext(CLIENT_CONTEXT); + connection.executeBatchUpdate(Collections.singletonList(INSERT_STATEMENT)); + + assertEquals(1, mockSpanner.countRequestsOfType(ExecuteBatchDmlRequest.class)); + assertEquals( + CLIENT_CONTEXT, + mockSpanner + .getRequestsOfType(ExecuteBatchDmlRequest.class) + .get(0) + .getRequestOptions() + .getClientContext()); + } + } + + @Test + public void testCommit_PropagatesClientContext() { + try (Connection connection = createConnection()) { + connection.setClientContext(CLIENT_CONTEXT); + connection.executeUpdate(INSERT_STATEMENT); + connection.commit(); + + assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); + assertEquals( + CLIENT_CONTEXT, + mockSpanner + .getRequestsOfType(CommitRequest.class) + .get(0) + .getRequestOptions() + .getClientContext()); + } + } + + @Test + public void testBeginTransaction_PropagatesClientContextWithLazyStart() { + // The BeginTransaction option is inlined with the first statement. + try (Connection connection = createConnection()) { + connection.setClientContext(CLIENT_CONTEXT); + connection.beginTransaction(); + connection.executeUpdate(INSERT_STATEMENT); + + assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + ExecuteSqlRequest request = mockSpanner.getRequestsOfType(ExecuteSqlRequest.class).get(0); + assertEquals(CLIENT_CONTEXT, request.getRequestOptions().getClientContext()); + assertEquals(0, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + } + } + + @Test + public void testBeginTransaction_PropagatesClientContextWithEagerStartAborted() { + // We can force an explicit BeginTransaction RPC by failing the first statement with an ABORTED + // error. If the statement fails before returning a transaction ID, the retry will use an + // explicit BeginTransaction RPC. + // Note: This relies on triggering a retry logic which is the only way to force explicit + // BeginTransaction in the standard Connection API flow without additional configuration (like + // setting delayTransactionStartUntilFirstWrite=false which is not exposed publicly here). + try (Connection connection = createConnection()) { + // Abort the next statement. This will cause the ExecuteSql request (which carries the + // BeginTransaction option) to fail with an ABORTED error. + // Since the request fails, the client does not receive the transaction ID. + // The retry logic in TransactionRunnerImpl/ReadWriteTransaction will then force an + // explicit BeginTransaction RPC to ensure a transaction is started before retrying the + // statement. + mockSpanner.abortNextStatement(); + + connection.setClientContext(CLIENT_CONTEXT); + connection.beginTransaction(); + connection.executeUpdate(INSERT_STATEMENT); + + // We expect two ExecuteSqlRequests. + // 1. The first one fails with ABORTED. This request includes the BeginTransaction option. + // 2. The retry. + int executeSqlCount = mockSpanner.countRequestsOfType(ExecuteSqlRequest.class); + assertEquals(2, executeSqlCount); + + for (ExecuteSqlRequest req : mockSpanner.getRequestsOfType(ExecuteSqlRequest.class)) { + assertEquals(CLIENT_CONTEXT, req.getRequestOptions().getClientContext()); + } + + // We also expect 1 BeginTransactionRequest because the retry used explicit BeginTransaction. + assertEquals(1, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + BeginTransactionRequest beginRequest = + mockSpanner.getRequestsOfType(BeginTransactionRequest.class).get(0); + assertEquals(CLIENT_CONTEXT, beginRequest.getRequestOptions().getClientContext()); + } + } + + @Test + public void testBeginTransaction_PropagatesClientContextWithEagerStartMutations() { + // We can also force an explicit BeginTransaction RPC by constructing a transaction + // that only issues mutations. Mutation RPCs cannot start a transaction, so + // if they are the only RPCs in the transaction, then an explicit BeginTransaction + // must be issued. + try (Connection connection = createConnection()) { + connection.setClientContext(CLIENT_CONTEXT); + connection.beginTransaction(); + connection.bufferedWrite(Mutation.newInsertBuilder("my-table").set("my-col").to(1L).build()); + connection.commit(); + + assertEquals(1, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + BeginTransactionRequest request = + mockSpanner.getRequestsOfType(BeginTransactionRequest.class).get(0); + assertEquals(CLIENT_CONTEXT, request.getRequestOptions().getClientContext()); + assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); + CommitRequest commitRequest = mockSpanner.getRequestsOfType(CommitRequest.class).get(0); + assertEquals(CLIENT_CONTEXT, commitRequest.getRequestOptions().getClientContext()); + } + } + + @Test + public void testDatabaseClient_ClientContextMerging() { + String projectId = "test-project"; + String instanceId = "test-instance"; + String databaseId = "test-database"; + + // 1. Define the default ClientContext in SpannerOptions. + RequestOptions.ClientContext defaultContext = + RequestOptions.ClientContext.newBuilder() + .putSecureContext("key1", Value.newBuilder().setStringValue("default_value1").build()) + .putSecureContext("key2", Value.newBuilder().setStringValue("default_value2").build()) + .build(); + + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId(projectId) + .setHost("http://localhost:" + getPort()) + .usePlainText() + .setDefaultClientContext(defaultContext) + .build(); + + try (Spanner spanner = options.getService()) { + DatabaseClient client = + spanner.getDatabaseClient(DatabaseId.of(projectId, instanceId, databaseId)); + + // 2. Define the request-specific ClientContext that overrides one key and adds a new one. + RequestOptions.ClientContext requestContext = + RequestOptions.ClientContext.newBuilder() + .putSecureContext("key2", Value.newBuilder().setStringValue("request_value2").build()) + .putSecureContext("key3", Value.newBuilder().setStringValue("request_value3").build()) + .build(); + + // 3. Define the expected merged ClientContext (Union + Overwrite). + RequestOptions.ClientContext expectedContext = + RequestOptions.ClientContext.newBuilder() + .putSecureContext("key1", Value.newBuilder().setStringValue("default_value1").build()) + .putSecureContext("key2", Value.newBuilder().setStringValue("request_value2").build()) + .putSecureContext("key3", Value.newBuilder().setStringValue("request_value3").build()) + .build(); + + // Execute a query with the request context. + try (ResultSet rs = + client + .singleUse() + .executeQuery( + SELECT_COUNT_STATEMENT, + com.google.cloud.spanner.Options.clientContext(requestContext))) { + rs.next(); + } + + assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + RequestOptions.ClientContext actualContext = + mockSpanner + .getRequestsOfType(ExecuteSqlRequest.class) + .get(0) + .getRequestOptions() + .getClientContext(); + + assertEquals(expectedContext, actualContext); + + // Verify specifically that key2 was overwritten and key1 was preserved. + assertEquals( + "request_value2", actualContext.getSecureContextOrThrow("key2").getStringValue()); + assertEquals( + "default_value1", actualContext.getSecureContextOrThrow("key1").getStringValue()); + } + } + + @Test + public void testPersistence() { + try (Connection connection = createConnection()) { + connection.setClientContext(CLIENT_CONTEXT); + try (ResultSet ignore = connection.executeQuery(SELECT_COUNT_STATEMENT)) {} + assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + assertEquals( + CLIENT_CONTEXT, + mockSpanner + .getRequestsOfType(ExecuteSqlRequest.class) + .get(0) + .getRequestOptions() + .getClientContext()); + + connection.executeUpdate(INSERT_STATEMENT); + assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + assertEquals( + CLIENT_CONTEXT, + mockSpanner + .getRequestsOfType(ExecuteSqlRequest.class) + .get(1) + .getRequestOptions() + .getClientContext()); + + connection.commit(); + assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); + assertEquals( + CLIENT_CONTEXT, + mockSpanner + .getRequestsOfType(CommitRequest.class) + .get(0) + .getRequestOptions() + .getClientContext()); + } + } + + @Test + public void testClearClientContext() { + try (Connection connection = createConnection()) { + connection.setClientContext(CLIENT_CONTEXT); + try (ResultSet ignore = connection.executeQuery(SELECT_COUNT_STATEMENT)) {} + + assertEquals( + CLIENT_CONTEXT, + mockSpanner + .getRequestsOfType(ExecuteSqlRequest.class) + .get(0) + .getRequestOptions() + .getClientContext()); + + connection.setClientContext(null); + try (ResultSet ignore = connection.executeQuery(SELECT_COUNT_STATEMENT)) {} + + assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + assertFalse( + mockSpanner + .getRequestsOfType(ExecuteSqlRequest.class) + .get(1) + .getRequestOptions() + .hasClientContext()); + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionImplTest.java index ead2fd0f655..c1a5e2873de 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionImplTest.java @@ -1948,6 +1948,45 @@ private void assertThrowResultNotAllowed( "Only statements that return a result of one of the following types are allowed")); } + @Test + public void testSetAndGetClientContext() { + try (Connection connection = + createConnection( + ConnectionOptions.newBuilder() + .setUri(URI) + .setCredentials(NoCredentials.getInstance()) + .build())) { + com.google.spanner.v1.RequestOptions.ClientContext context = + com.google.spanner.v1.RequestOptions.ClientContext.newBuilder() + .putSecureContext( + "key", com.google.protobuf.Value.newBuilder().setStringValue("test").build()) + .build(); + connection.setClientContext(context); + assertEquals(context, connection.getClientContext()); + } + } + + @Test + public void testResetClearsClientContext() { + try (Connection connection = + createConnection( + ConnectionOptions.newBuilder() + .setUri(URI) + .setCredentials(NoCredentials.getInstance()) + .build())) { + com.google.spanner.v1.RequestOptions.ClientContext context = + com.google.spanner.v1.RequestOptions.ClientContext.newBuilder() + .putSecureContext( + "key", com.google.protobuf.Value.newBuilder().setStringValue("test").build()) + .build(); + connection.setClientContext(context); + assertEquals(context, connection.getClientContext()); + + connection.reset(); + assertNull(connection.getClientContext()); + } + } + @Test public void testProtoDescriptorsAlwaysAllowed() { ConnectionOptions connectionOptions = mock(ConnectionOptions.class); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionOptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionOptionsTest.java index 18fd5cb6143..f745e9ad63e 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionOptionsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionOptionsTest.java @@ -1418,4 +1418,113 @@ public void testUniverseDomain() { connection.close(); } + + @Test + public void testEnableDynamicChannelPool() { + // Default value + assertNull( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database") + .setCredentials(NoCredentials.getInstance()) + .build() + .isEnableDynamicChannelPool()); + // Enabled + assertTrue( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database?enableDynamicChannelPool=true") + .setCredentials(NoCredentials.getInstance()) + .build() + .isEnableDynamicChannelPool()); + } + + @Test + public void testDisableDynamicChannelPool() { + assertFalse( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database?enableDynamicChannelPool=false") + .setCredentials(NoCredentials.getInstance()) + .build() + .isEnableDynamicChannelPool()); + } + + @Test + public void testDcpMinChannels() { + // Default value + assertNull( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database") + .setCredentials(NoCredentials.getInstance()) + .build() + .getDcpMinChannels()); + // Custom value + assertEquals( + Integer.valueOf(3), + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database?dcpMinChannels=3") + .setCredentials(NoCredentials.getInstance()) + .build() + .getDcpMinChannels()); + } + + @Test + public void testDcpMaxChannels() { + // Default value + assertNull( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database") + .setCredentials(NoCredentials.getInstance()) + .build() + .getDcpMaxChannels()); + // Custom value + assertEquals( + Integer.valueOf(15), + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database?dcpMaxChannels=15") + .setCredentials(NoCredentials.getInstance()) + .build() + .getDcpMaxChannels()); + } + + @Test + public void testDcpInitialChannels() { + // Default value + assertNull( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database") + .setCredentials(NoCredentials.getInstance()) + .build() + .getDcpInitialChannels()); + // Custom value + assertEquals( + Integer.valueOf(5), + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database?dcpInitialChannels=5") + .setCredentials(NoCredentials.getInstance()) + .build() + .getDcpInitialChannels()); + } + + @Test + public void testDcpWithAllOptions() { + ConnectionOptions options = + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/test-project-123/instances/test-instance/databases/test-database" + + "?enableDynamicChannelPool=true;dcpMinChannels=3;dcpMaxChannels=15;dcpInitialChannels=5") + .setCredentials(NoCredentials.getInstance()) + .build(); + assertTrue(options.isEnableDynamicChannelPool()); + assertEquals(Integer.valueOf(3), options.getDcpMinChannels()); + assertEquals(Integer.valueOf(15), options.getDcpMaxChannels()); + assertEquals(Integer.valueOf(5), options.getDcpInitialChannels()); + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java index 8b78fe4d14b..2b48c64d2e0 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java @@ -291,4 +291,13 @@ public void testSetLocalInvalidValue() { assertTrue(connection.isRetryAbortsInternally()); } } + + @Test + public void testGetConnectionProperty() { + try (Connection connection = createConnection()) { + ConnectionProperty unknownLength = ConnectionProperties.UNKNOWN_LENGTH; + assertEquals( + unknownLength.getDefaultValue(), connection.getConnectionPropertyValue(unknownLength)); + } + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java index 72ef90c9cf6..c8469ae08a9 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java @@ -23,8 +23,6 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; import com.google.cloud.spanner.AbortedException; import com.google.cloud.spanner.Dialect; import com.google.cloud.spanner.ErrorCode; @@ -36,10 +34,7 @@ import com.google.cloud.spanner.SpannerOptions; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.TimestampBound; -import com.google.cloud.spanner.connection.ConnectionOptions.Builder; -import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType; import com.google.common.collect.ImmutableList; -import com.google.spanner.v1.BatchCreateSessionsRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.DirectedReadOptions; import com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas; @@ -50,11 +45,8 @@ import com.google.spanner.v1.RequestOptions; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Arrays; import java.util.Collections; -import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import java.util.function.Consumer; import java.util.function.Supplier; import javax.annotation.Nonnull; @@ -385,82 +377,6 @@ private void assertResetProperty( } } - public static class ConnectionMinSessionsTest extends AbstractMockServerTest { - - @AfterClass - public static void reset() { - mockSpanner.reset(); - } - - protected String getBaseUrl() { - return super.getBaseUrl() + ";minSessions=1"; - } - - @Test - public void testMinSessions() throws InterruptedException, TimeoutException { - try (Connection connection = createConnection()) { - mockSpanner.waitForRequestsToContain( - input -> - input instanceof BatchCreateSessionsRequest - && ((BatchCreateSessionsRequest) input).getSessionCount() == 1, - 5000L); - } - } - } - - public static class ConnectionMaxSessionsTest extends AbstractMockServerTest { - - @AfterClass - public static void reset() { - mockSpanner.reset(); - } - - protected String getBaseUrl() { - return super.getBaseUrl() + ";maxSessions=1"; - } - - @Override - protected Builder configureConnectionOptions(Builder builder) { - return builder.setStatementExecutorType(StatementExecutorType.PLATFORM_THREAD); - } - - @Test - public void testMaxSessions() - throws InterruptedException, TimeoutException, ExecutionException { - try (Connection connection1 = createConnection(); - Connection connection2 = createConnection()) { - connection1.beginTransactionAsync(); - connection2.beginTransactionAsync(); - - ApiFuture count1 = connection1.executeUpdateAsync(INSERT_STATEMENT); - ApiFuture count2 = connection2.executeUpdateAsync(INSERT_STATEMENT); - - // Commit the transactions. Both should be able to finish, but both used the same session. - ApiFuture commit1 = connection1.commitAsync(); - ApiFuture commit2 = connection2.commitAsync(); - - // At least one transaction must wait until the other has finished before it can get a - // session. - assertThat(count1.isDone() && count2.isDone()).isFalse(); - assertThat(commit1.isDone() && commit2.isDone()).isFalse(); - - // Wait until both finishes. - ApiFutures.allAsList(Arrays.asList(commit1, commit2)).get(5L, TimeUnit.SECONDS); - - assertThat(count1.isDone()).isTrue(); - assertThat(count2.isDone()).isTrue(); - if (isMultiplexedSessionsEnabled(connection1.getSpanner())) { - // We don't use the multiplexed session, so we don't know whether the server had time to - // create it or not. That means that we have between 1 and 2 sessions on the server. - assertThat(mockSpanner.numSessionsCreated()).isAtLeast(1); - assertThat(mockSpanner.numSessionsCreated()).isAtMost(2); - } else { - assertThat(mockSpanner.numSessionsCreated()).isEqualTo(1); - } - } - } - } - public static class ConnectionRPCPriorityTest extends AbstractMockServerTest { @AfterClass diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/LocalConnectionCheckerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/LocalConnectionCheckerTest.java index 487ac3c0180..daf42b55af4 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/LocalConnectionCheckerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/LocalConnectionCheckerTest.java @@ -15,7 +15,6 @@ */ package com.google.cloud.spanner.connection; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.cloud.spanner.MockSpannerTestUtil.SELECT1; import static com.google.cloud.spanner.MockSpannerTestUtil.SELECT1_RESULTSET; import static org.junit.Assert.assertEquals; @@ -40,7 +39,6 @@ public class LocalConnectionCheckerTest { @BeforeClass public static void beforeClass() throws Exception { - disableDefaultMtlsProvider(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ReadWriteTransactionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ReadWriteTransactionTest.java index 947fe9d33cf..7d0fa94c9b0 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ReadWriteTransactionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ReadWriteTransactionTest.java @@ -287,6 +287,21 @@ public void testExecuteUpdate() { assertThat(get(transaction.executeUpdateAsync(CallType.SYNC, parsedStatement)), is(1L)); } + @Test + public void testExecuteQueryWithDmlReturningWithoutRetry() { + ParsedStatement parsedStatement = mock(ParsedStatement.class); + when(parsedStatement.getType()).thenReturn(StatementType.UPDATE); + when(parsedStatement.isUpdate()).thenReturn(true); + when(parsedStatement.hasReturningClause()).thenReturn(true); + Statement statement = Statement.of("INSERT INTO TEST (ID, NAME) VALUES (1, 'x') THEN RETURN *"); + when(parsedStatement.getStatement()).thenReturn(statement); + + ReadWriteTransaction transaction = createSubject(/* commitBehavior= */ CommitBehavior.SUCCEED); + ResultSet rs = + get(transaction.executeQueryAsync(CallType.SYNC, parsedStatement, AnalyzeMode.NONE)); + assertThat(rs, is(notNullValue())); + } + @Test public void testGetCommitTimestampBeforeCommit() { ParsedStatement parsedStatement = mock(ParsedStatement.class); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/RetryDmlAsPartitionedDmlMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/RetryDmlAsPartitionedDmlMockServerTest.java index cce6b7fe083..d5e44fdcefc 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/RetryDmlAsPartitionedDmlMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/RetryDmlAsPartitionedDmlMockServerTest.java @@ -43,10 +43,37 @@ import io.grpc.StatusRuntimeException; import org.junit.Test; import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; -@RunWith(JUnit4.class) +@RunWith(Parameterized.class) public class RetryDmlAsPartitionedDmlMockServerTest extends AbstractMockServerTest { + private enum ExceptionType { + MutationLimitExceeded { + @Override + StatusRuntimeException createException() { + return createTransactionMutationLimitExceededException(); + } + }, + ResourceLimitExceeded { + @Override + StatusRuntimeException createException() { + return createTransactionResourceLimitExceededException(); + } + }; + + abstract StatusRuntimeException createException(); + } + + @Parameters(name = "exception = {0}") + public static Object[] data() { + return ExceptionType.values(); + } + + @SuppressWarnings("ClassEscapesDefinedScope") + @Parameter + public ExceptionType exceptionType; static StatusRuntimeException createTransactionMutationLimitExceededException() { Metadata.Key key = @@ -70,10 +97,16 @@ static StatusRuntimeException createTransactionMutationLimitExceededException() .asRuntimeException(trailers); } + static StatusRuntimeException createTransactionResourceLimitExceededException() { + return Status.INVALID_ARGUMENT + .withDescription("Transaction resource limits exceeded") + .asRuntimeException(); + } + @Test public void testTransactionMutationLimitExceeded_isNotRetriedByDefault() { mockSpanner.setExecuteSqlExecutionTime( - SimulatedExecutionTime.ofException(createTransactionMutationLimitExceededException())); + SimulatedExecutionTime.ofException(exceptionType.createException())); try (Connection connection = createConnection()) { connection.setAutocommit(true); @@ -95,7 +128,7 @@ public void testTransactionMutationLimitExceeded_isNotRetriedByDefault() { public void testTransactionMutationLimitExceeded_canBeRetriedAsPDML() { Statement statement = Statement.of("update test set value=1 where true"); mockSpanner.setExecuteSqlExecutionTime( - SimulatedExecutionTime.ofException(createTransactionMutationLimitExceededException())); + SimulatedExecutionTime.ofException(exceptionType.createException())); mockSpanner.putStatementResult( MockSpannerServiceImpl.StatementResult.update(statement, 100000L)); @@ -134,7 +167,7 @@ public void testTransactionMutationLimitExceeded_retryAsPDMLFails() { Statement statement = Statement.of("insert into test (id, value) select -id, value from test"); // The transactional update statement uses ExecuteSql(..). mockSpanner.setExecuteSqlExecutionTime( - SimulatedExecutionTime.ofException(createTransactionMutationLimitExceededException())); + SimulatedExecutionTime.ofException(exceptionType.createException())); mockSpanner.putStatementResult( MockSpannerServiceImpl.StatementResult.exception( statement, @@ -230,7 +263,7 @@ public void testTransactionMutationLimitExceeded_isWrappedAsCauseOfBatchUpdateEx Statement statement = Statement.of(sql); mockSpanner.putStatementResult( MockSpannerServiceImpl.StatementResult.exception( - statement, createTransactionMutationLimitExceededException())); + statement, exceptionType.createException())); try (Connection connection = createConnection()) { connection.setAutocommit(true); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/RunTransactionMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/RunTransactionMockServerTest.java index bc0acca3255..d4af5dd4e7e 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/RunTransactionMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/RunTransactionMockServerTest.java @@ -151,7 +151,7 @@ public void testRunTransaction_rollbacksAfterException() { return null; })); assertEquals(ErrorCode.INVALID_ARGUMENT, exception.getErrorCode()); - assertTrue(exception.getMessage(), exception.getMessage().endsWith("invalid statement")); + assertTrue(exception.getMessage(), exception.getMessage().contains("invalid statement")); } assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); assertEquals(0, mockSpanner.countRequestsOfType(CommitRequest.class)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SpannerPoolTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SpannerPoolTest.java index 973dc5ea17c..b03288354b2 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SpannerPoolTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SpannerPoolTest.java @@ -635,4 +635,140 @@ public void testOpenTelemetry() { spanner2 = pool.getSpanner(optionsOpenTelemetry3, connection2); assertNotEquals(spanner1, spanner2); } + + @Test + public void testDynamicChannelPoolSettings() { + SpannerPoolKey keyWithoutDcp = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri("cloudspanner:/projects/p/instances/i/databases/d") + .setCredentials(NoCredentials.getInstance()) + .build()); + SpannerPoolKey keyWithDcpEnabled = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d?enableDynamicChannelPool=true") + .setCredentials(NoCredentials.getInstance()) + .build()); + SpannerPoolKey keyWithDcpDisabled = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d?enableDynamicChannelPool=false") + .setCredentials(NoCredentials.getInstance()) + .build()); + SpannerPoolKey keyWithDcpAndMinChannels = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d?enableDynamicChannelPool=true;dcpMinChannels=3") + .setCredentials(NoCredentials.getInstance()) + .build()); + SpannerPoolKey keyWithDcpAndMaxChannels = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d?enableDynamicChannelPool=true;dcpMaxChannels=15") + .setCredentials(NoCredentials.getInstance()) + .build()); + SpannerPoolKey keyWithDcpAndInitialChannels = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d?enableDynamicChannelPool=true;dcpInitialChannels=5") + .setCredentials(NoCredentials.getInstance()) + .build()); + + // DCP settings should affect the SpannerPoolKey + assertNotEquals(keyWithoutDcp, keyWithDcpEnabled); + assertNotEquals(keyWithoutDcp, keyWithDcpDisabled); + assertNotEquals(keyWithDcpEnabled, keyWithDcpDisabled); + + // Different channel settings should create different keys + assertNotEquals(keyWithDcpEnabled, keyWithDcpAndMinChannels); + assertNotEquals(keyWithDcpEnabled, keyWithDcpAndMaxChannels); + assertNotEquals(keyWithDcpEnabled, keyWithDcpAndInitialChannels); + + // Same configuration should create equal keys + assertEquals( + keyWithDcpEnabled, + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d?enableDynamicChannelPool=true") + .setCredentials(NoCredentials.getInstance()) + .build())); + assertEquals( + keyWithDcpAndMinChannels, + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d?enableDynamicChannelPool=true;dcpMinChannels=3") + .setCredentials(NoCredentials.getInstance()) + .build())); + } + + @Test + public void testDynamicChannelPoolWithAllSettings() { + SpannerPoolKey keyWithAllDcpSettings = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d" + + "?enableDynamicChannelPool=true;dcpMinChannels=3;dcpMaxChannels=15;dcpInitialChannels=5") + .setCredentials(NoCredentials.getInstance()) + .build()); + SpannerPoolKey keyWithDifferentMaxChannels = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d" + + "?enableDynamicChannelPool=true;dcpMinChannels=3;dcpMaxChannels=20;dcpInitialChannels=5") + .setCredentials(NoCredentials.getInstance()) + .build()); + + assertNotEquals(keyWithAllDcpSettings, keyWithDifferentMaxChannels); + + // Same configuration should be equal + assertEquals( + keyWithAllDcpSettings, + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d" + + "?enableDynamicChannelPool=true;dcpMinChannels=3;dcpMaxChannels=15;dcpInitialChannels=5") + .setCredentials(NoCredentials.getInstance()) + .build())); + } + + @Test + public void testExplicitlyDisabledDynamicChannelPool() { + SpannerPoolKey keyWithoutDcpSetting = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri("cloudspanner:/projects/p/instances/i/databases/d") + .setCredentials(NoCredentials.getInstance()) + .build()); + SpannerPoolKey keyWithDcpExplicitlyDisabled = + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d?enableDynamicChannelPool=false") + .setCredentials(NoCredentials.getInstance()) + .build()); + + // Keys should be different because one has explicit false and one has null (default) + assertNotEquals(keyWithoutDcpSetting, keyWithDcpExplicitlyDisabled); + + // Verify the explicit false setting is preserved + assertEquals( + keyWithDcpExplicitlyDisabled, + SpannerPoolKey.of( + ConnectionOptions.newBuilder() + .setUri( + "cloudspanner:/projects/p/instances/i/databases/d?enableDynamicChannelPool=false") + .setCredentials(NoCredentials.getInstance()) + .build())); + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SpannerStatementParserTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SpannerStatementParserTest.java index 035ab72959b..048f95ed778 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SpannerStatementParserTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SpannerStatementParserTest.java @@ -16,10 +16,16 @@ package com.google.cloud.spanner.connection; +import static com.google.cloud.spanner.ErrorCode.INVALID_ARGUMENT; import static com.google.cloud.spanner.connection.StatementParserTest.assertUnclosedLiteral; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import com.google.cloud.spanner.Dialect; +import com.google.cloud.spanner.SpannerException; +import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.connection.StatementParserTest.CommentInjector; import org.junit.Test; import org.junit.runner.RunWith; @@ -39,6 +45,55 @@ static String skip(String sql, int currentIndex) { return sql.substring(currentIndex, position); } + @Test + public void testRemoveCommentsAndTrim() { + AbstractStatementParser parser = + AbstractStatementParser.getInstance(Dialect.GOOGLE_STANDARD_SQL); + + // Statements that should parse correctly + String[] validStatements = + new String[] { + "SELECT '\\\\'", // SELECT '\\' (escaped backslash, followed by quote) + "SELECT '\\''", // SELECT '\'' (escaped quote, followed by an actual closing quote) + "SELECT '\\\\\\\\'" // SELECT '\\\\' (two escaped backslashes) + }; + for (String sql : validStatements) { + assertEquals(sql, parser.removeCommentsAndTrim(sql)); + } + + // Statements that contain an unclosed literal because the final quote is + // escaped + String[] invalidStatements = + new String[] { + "SELECT '\\'" // SELECT '\' (escaped closing quote) + }; + + for (String sql : invalidStatements) { + try { + parser.removeCommentsAndTrim(sql); + fail("Expected SpannerException for unclosed literal: " + sql); + } catch (SpannerException e) { + assertEquals(INVALID_ARGUMENT, e.getErrorCode()); + } + } + } + + @Test + public void testReturningClauseWithBackslashes() { + AbstractStatementParser parser = + AbstractStatementParser.getInstance(Dialect.GOOGLE_STANDARD_SQL); + + // Valid returning clause, double backslash in string literal should be handled + // correctly. + String sqlWithReturning = "INSERT INTO my_table (value) VALUES ('foo \\\\ bar') THEN RETURN id"; + assertTrue(parser.parse(Statement.of(sqlWithReturning)).hasReturningClause()); + + // No returning clause, `then return` is inside a string literal with a double + // backslash. + String sqlWithoutReturning = "INSERT INTO my_table (value) VALUES ('then \\\\ return')"; + assertFalse(parser.parse(Statement.of(sqlWithoutReturning)).hasReturningClause()); + } + @Test public void testSkip() { assertEquals("", skip("")); @@ -54,6 +109,7 @@ public void testSkip() { assertEquals("'foo\"bar\"'", skip("'foo\"bar\"' ", 0)); assertEquals("\"foo'bar'\"", skip("\"foo'bar'\" ", 0)); assertEquals("`foo'bar'`", skip("`foo'bar'` ", 0)); + assertEquals("'test\\\\'", skip("'test\\\\'", 0)); assertEquals("'''foo'bar'''", skip("'''foo'bar''' ", 0)); assertEquals("'''foo\\'bar'''", skip("'''foo\\'bar''' ", 0)); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementParserTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementParserTest.java index c37b769419c..300517faaf0 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementParserTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementParserTest.java @@ -1268,6 +1268,10 @@ public void testGoogleStandardSQLDialectConvertPositionalParametersToNamedParame "@p1'''?it\\'?s \n ?it\\'?s'''@p2", parser.convertPositionalParametersToNamedParameters('?', "?'''?it\\'?s \n ?it\\'?s'''?") .sqlWithNamedParameters); + assertEquals( + "@p1'?test?\\\\'@p2", + parser.convertPositionalParametersToNamedParameters('?', "?'?test?\\\\'?") + .sqlWithNamedParameters); assertUnclosedLiteral(parser, "?'?it\\'?s \n ?it\\'?s'?"); assertUnclosedLiteral(parser, "?'?it\\'?s \n ?it\\'?s?"); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/TransactionMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/TransactionMockServerTest.java index 1c78f7031e6..45f68b11a5b 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/TransactionMockServerTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/TransactionMockServerTest.java @@ -26,16 +26,20 @@ import com.google.cloud.spanner.Dialect; import com.google.cloud.spanner.ErrorCode; import com.google.cloud.spanner.MockSpannerServiceImpl; +import com.google.cloud.spanner.Options; import com.google.cloud.spanner.ResultSet; import com.google.cloud.spanner.SpannerException; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.connection.ITAbstractSpannerTest.ITConnection; +import com.google.cloud.spanner.connection.StatementResult.ResultType; +import com.google.spanner.v1.BeginTransactionRequest; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.ExecuteBatchDmlRequest; import com.google.spanner.v1.ExecuteSqlRequest; import com.google.spanner.v1.TransactionOptions.IsolationLevel; import com.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode; import io.grpc.Deadline.Ticker; +import io.grpc.Status; import java.time.Duration; import java.util.ArrayList; import java.util.Collection; @@ -113,6 +117,54 @@ public void testDml() { assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); } + @Test + public void testFailedFirstDml() { + Statement invalidInsert = Statement.of("insert into my_table (id, name) values (1, 'test')"); + mockSpanner.putStatementResult( + MockSpannerServiceImpl.StatementResult.exception( + invalidInsert, + Status.ALREADY_EXISTS.withDescription("Row 1 already exists").asRuntimeException())); + + try (Connection connection = createConnection()) { + SpannerException exception = + assertThrows(SpannerException.class, () -> connection.executeUpdate(invalidInsert)); + assertEquals(ErrorCode.ALREADY_EXISTS, exception.getErrorCode()); + connection.commit(); + } + // The transaction should be internally retried with an explicit BeginTransaction request, as + // the first statement in the transaction failed. + assertEquals(1, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + assertEquals(1, mockSpanner.countRequestsOfType(CommitRequest.class)); + } + + @Test + public void testFailedFirstAndLastDml() { + Statement invalidInsert = + Statement.of("insert into my_table (id, name) values (1, 'test') then return id"); + mockSpanner.putStatementResult( + MockSpannerServiceImpl.StatementResult.exception( + invalidInsert, + Status.ALREADY_EXISTS.withDescription("Row 1 already exists").asRuntimeException())); + + try (Connection connection = createConnection()) { + SpannerException exception = + assertThrows( + SpannerException.class, + () -> connection.executeQuery(invalidInsert, Options.lastStatement())); + assertEquals(ErrorCode.ALREADY_EXISTS, exception.getErrorCode()); + + // The same error should be repeated for the commit. + exception = assertThrows(SpannerException.class, connection::commit); + assertEquals(ErrorCode.ALREADY_EXISTS, exception.getErrorCode()); + } + // The transaction should be not be retried, as the last_statement flag was set. + assertEquals(0, mockSpanner.countRequestsOfType(BeginTransactionRequest.class)); + assertEquals(1, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class)); + // There is no CommitRequest, because the statement never returned a transaction ID. + assertEquals(0, mockSpanner.countRequestsOfType(CommitRequest.class)); + } + @Test public void testDmlReturning() { try (Connection connection = createConnection()) { @@ -306,5 +358,45 @@ public long nanoTime() { } @Test - public void testTransactionTimeoutInAutoCommit() {} + public void testCanUseAllMethodsWithInternalRetriesDisabled() { + // Verify that all query/update methods work as expected when internal retries have been + // disabled. + try (Connection connection = createConnection()) { + connection.setAutocommit(false); + connection.setRetryAbortsInternally(false); + + try (ResultSet result = connection.executeQuery(SELECT1_STATEMENT)) { + assertTrue(result.next()); + assertEquals(1L, result.getLong(0)); + assertFalse(result.next()); + } + assertEquals(1, connection.executeUpdate(INSERT_STATEMENT)); + try (ResultSet result = connection.executeQuery(INSERT_RETURNING_STATEMENT)) { + assertTrue(result.next()); + assertEquals(1L, result.getLong(0)); + assertFalse(result.next()); + } + + StatementResult statementResult = connection.execute(SELECT1_STATEMENT); + assertEquals(ResultType.RESULT_SET, statementResult.getResultType()); + try (ResultSet result = statementResult.getResultSet()) { + assertTrue(result.next()); + assertEquals(1L, result.getLong(0)); + assertFalse(result.next()); + } + + statementResult = connection.execute(INSERT_STATEMENT); + assertEquals(ResultType.UPDATE_COUNT, statementResult.getResultType()); + assertEquals(1L, statementResult.getUpdateCount().longValue()); + + statementResult = connection.execute(INSERT_RETURNING_STATEMENT); + assertEquals(ResultType.RESULT_SET, statementResult.getResultType()); + try (ResultSet result = statementResult.getResultSet()) { + assertTrue(result.next()); + assertEquals(1L, result.getLong(0)); + assertFalse(result.next()); + } + connection.commit(); + } + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBuiltInMetricsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBuiltInMetricsTest.java index 13dda2c4426..f0e1cf20861 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBuiltInMetricsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBuiltInMetricsTest.java @@ -128,18 +128,9 @@ public void testBuiltinMetricsWithDefaultOTEL() throws Exception { response = metricClient.listTimeSeriesCallable().call(request); } - // afe_latencies metric currently does not return data as afe server-timing header is - // disabled. - // Keeping this check to enable this check in the future. - if (metric.equals("afe_latencies")) { - assertWithMessage("Metric " + metric + " returned data.") - .that(response.getTimeSeriesCount()) - .isEqualTo(0); - } else { - assertWithMessage("Metric " + metric + " didn't return any data.") - .that(response.getTimeSeriesCount()) - .isGreaterThan(0); - } + assertWithMessage("Metric " + metric + " didn't return any data.") + .that(response.getTimeSeriesCount()) + .isGreaterThan(0); } } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITClosedSessionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITClosedSessionTest.java deleted file mode 100644 index 6ffb0e1ca68..00000000000 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITClosedSessionTest.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.spanner.it; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; -import static org.junit.Assume.assumeFalse; - -import com.google.cloud.spanner.AbortedException; -import com.google.cloud.spanner.Database; -import com.google.cloud.spanner.IntegrationTestWithClosedSessionsEnv; -import com.google.cloud.spanner.IntegrationTestWithClosedSessionsEnv.DatabaseClientWithClosedSessionImpl; -import com.google.cloud.spanner.ParallelIntegrationTest; -import com.google.cloud.spanner.ReadOnlyTransaction; -import com.google.cloud.spanner.ResultSet; -import com.google.cloud.spanner.SessionNotFoundException; -import com.google.cloud.spanner.Statement; -import com.google.cloud.spanner.TimestampBound; -import com.google.cloud.spanner.TransactionContext; -import com.google.cloud.spanner.TransactionManager; -import com.google.cloud.spanner.TransactionRunner; -import java.util.concurrent.TimeUnit; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** Test the automatic re-creation of sessions that have been invalidated by the server. */ -@Category(ParallelIntegrationTest.class) -@RunWith(JUnit4.class) -public class ITClosedSessionTest { - // Run each test case twice to ensure that a retried session does not affect subsequent - // transactions. - private static final int RUNS_PER_TEST_CASE = 2; - - @ClassRule - public static IntegrationTestWithClosedSessionsEnv env = - new IntegrationTestWithClosedSessionsEnv(); - - private static Database db; - private static DatabaseClientWithClosedSessionImpl client; - - @BeforeClass - public static void setUpDatabase() { - // For multiplexed sessions, it will never be invalidated by the server and hence the client - // will never receive an exception with code NOT_FOUND and the text 'Session not found'. - assumeFalse( - env.getTestHelper().getOptions().getSessionPoolOptions().getUseMultiplexedSession()); - - // Empty database. - db = env.getTestHelper().createTestDatabase(); - client = (DatabaseClientWithClosedSessionImpl) env.getTestHelper().getDatabaseClient(db); - } - - @Before - public void setup() { - client.setAllowSessionReplacing(true); - } - - @Test - public void testSingleUse() { - // This should trigger an exception with code NOT_FOUND and the text 'Session not found'. - client.invalidateNextSession(); - for (int run = 0; run < RUNS_PER_TEST_CASE; run++) { - try (ResultSet rs = Statement.of("SELECT 1").executeQuery(client.singleUse())) { - assertThat(rs.next()).isTrue(); - assertThat(rs.getLong(0)).isEqualTo(1L); - assertThat(rs.next()).isFalse(); - } - } - } - - @Test - public void testSingleUseNoRecreation() { - // This should trigger an exception with code NOT_FOUND and the text 'Session not found'. - client.setAllowSessionReplacing(false); - client.invalidateNextSession(); - try (ResultSet rs = Statement.of("SELECT 1").executeQuery(client.singleUse())) { - rs.next(); - fail("Expected exception"); - } catch (SessionNotFoundException ex) { - assertNotNull(ex.getMessage()); - } - } - - @Test - public void testSingleUseBound() { - // This should trigger an exception with code NOT_FOUND and the text 'Session not found'. - client.invalidateNextSession(); - for (int run = 0; run < RUNS_PER_TEST_CASE; run++) { - try (ResultSet rs = - Statement.of("SELECT 1") - .executeQuery( - client.singleUse(TimestampBound.ofExactStaleness(10L, TimeUnit.SECONDS)))) { - assertThat(rs.next()).isTrue(); - assertThat(rs.getLong(0)).isEqualTo(1L); - assertThat(rs.next()).isFalse(); - } - } - } - - @Test - public void testSingleUseReadOnlyTransaction() { - client.invalidateNextSession(); - for (int run = 0; run < RUNS_PER_TEST_CASE; run++) { - try (ReadOnlyTransaction txn = client.singleUseReadOnlyTransaction()) { - try (ResultSet rs = txn.executeQuery(Statement.of("SELECT 1"))) { - assertThat(rs.next()).isTrue(); - assertThat(rs.getLong(0)).isEqualTo(1L); - assertThat(rs.next()).isFalse(); - } - assertThat(txn.getReadTimestamp()).isNotNull(); - } - } - } - - @Test - public void testSingleUseReadOnlyTransactionBound() { - client.invalidateNextSession(); - for (int run = 0; run < RUNS_PER_TEST_CASE; run++) { - try (ReadOnlyTransaction txn = - client.singleUseReadOnlyTransaction( - TimestampBound.ofMaxStaleness(10L, TimeUnit.SECONDS))) { - try (ResultSet rs = txn.executeQuery(Statement.of("SELECT 1"))) { - assertThat(rs.next()).isTrue(); - assertThat(rs.getLong(0)).isEqualTo(1L); - assertThat(rs.next()).isFalse(); - } - assertThat(txn.getReadTimestamp()).isNotNull(); - } - } - } - - @Test - public void testReadOnlyTransaction() { - client.invalidateNextSession(); - for (int run = 0; run < RUNS_PER_TEST_CASE; run++) { - try (ReadOnlyTransaction txn = client.readOnlyTransaction()) { - for (int i = 0; i < 2; i++) { - try (ResultSet rs = txn.executeQuery(Statement.of("SELECT 1"))) { - assertThat(rs.next()).isTrue(); - assertThat(rs.getLong(0)).isEqualTo(1L); - assertThat(rs.next()).isFalse(); - } - } - assertThat(txn.getReadTimestamp()).isNotNull(); - } - } - } - - @Test - public void testReadOnlyTransactionNoRecreation() { - client.setAllowSessionReplacing(false); - client.invalidateNextSession(); - try (ReadOnlyTransaction txn = client.readOnlyTransaction()) { - try (ResultSet rs = txn.executeQuery(Statement.of("SELECT 1"))) { - rs.next(); - fail("Expected exception"); - } - fail("Expected exception"); - } catch (SessionNotFoundException ex) { - assertNotNull(ex.getMessage()); - } - } - - @Test - public void testReadOnlyTransactionBound() { - client.invalidateNextSession(); - for (int run = 0; run < RUNS_PER_TEST_CASE; run++) { - try (ReadOnlyTransaction txn = - client.readOnlyTransaction(TimestampBound.ofExactStaleness(10L, TimeUnit.SECONDS))) { - for (int i = 0; i < 2; i++) { - try (ResultSet rs = txn.executeQuery(Statement.of("SELECT 1"))) { - assertThat(rs.next()).isTrue(); - assertThat(rs.getLong(0)).isEqualTo(1L); - assertThat(rs.next()).isFalse(); - } - } - assertThat(txn.getReadTimestamp()).isNotNull(); - } - } - } - - @Test - public void testReadWriteTransaction() { - client.invalidateNextSession(); - for (int run = 0; run < RUNS_PER_TEST_CASE; run++) { - TransactionRunner txn = client.readWriteTransaction(); - txn.run( - transaction -> { - for (int i = 0; i < 2; i++) { - try (ResultSet rs = transaction.executeQuery(Statement.of("SELECT 1"))) { - assertThat(rs.next()).isTrue(); - assertThat(rs.getLong(0)).isEqualTo(1L); - assertThat(rs.next()).isFalse(); - } - } - return null; - }); - } - } - - @Test - public void testReadWriteTransactionNoRecreation() { - client.setAllowSessionReplacing(false); - client.invalidateNextSession(); - try { - TransactionRunner txn = client.readWriteTransaction(); - txn.run( - transaction -> { - try (ResultSet rs = transaction.executeQuery(Statement.of("SELECT 1"))) { - rs.next(); - fail("Expected exception"); - } - return null; - }); - fail("Expected exception"); - } catch (SessionNotFoundException ex) { - assertNotNull(ex.getMessage()); - } - } - - @Test - public void testTransactionManager() throws InterruptedException { - client.invalidateNextSession(); - for (int run = 0; run < 2; run++) { - try (TransactionManager manager = client.transactionManager()) { - TransactionContext txn = manager.begin(); - try { - while (true) { - for (int i = 0; i < 2; i++) { - try (ResultSet rs = txn.executeQuery(Statement.of("SELECT 1"))) { - assertThat(rs.next()).isTrue(); - assertThat(rs.getLong(0)).isEqualTo(1L); - assertThat(rs.next()).isFalse(); - } - } - manager.commit(); - break; - } - } catch (AbortedException e) { - long retryDelayInMillis = e.getRetryDelayInMillis(); - if (retryDelayInMillis > 0) { - Thread.sleep(retryDelayInMillis); - } - txn = manager.resetForRetry(); - } - } - } - } - - @Test - public void testTransactionManagerNoRecreation() { - client.setAllowSessionReplacing(false); - client.invalidateNextSession(); - try (TransactionManager manager = client.transactionManager()) { - TransactionContext txn = manager.begin(); - while (true) { - try (ResultSet rs = txn.executeQuery(Statement.of("SELECT 1"))) { - rs.next(); - fail("Expected exception"); - } - } - } catch (SessionNotFoundException ex) { - assertNotNull(ex.getMessage()); - } - } -} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITMutableCredentialsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITMutableCredentialsTest.java new file mode 100644 index 00000000000..c136305bcdd --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITMutableCredentialsTest.java @@ -0,0 +1,106 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.it; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.junit.Assume.assumeTrue; + +import com.google.auth.oauth2.GoogleCredentials; +import com.google.auth.oauth2.ServiceAccountCredentials; +import com.google.cloud.spanner.IntegrationTestEnv; +import com.google.cloud.spanner.MutableCredentials; +import com.google.cloud.spanner.SerialIntegrationTest; +import com.google.cloud.spanner.Spanner; +import com.google.cloud.spanner.SpannerOptions; +import com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient; +import com.google.spanner.admin.instance.v1.ProjectName; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Paths; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@Category(SerialIntegrationTest.class) +@RunWith(JUnit4.class) +public class ITMutableCredentialsTest { + + private static final String INVALID_CERT_PATH = + "/com/google/cloud/spanner/connection/test-key.json"; + + @ClassRule public static final IntegrationTestEnv env = new IntegrationTestEnv(); + + @Test + public void testMutableCredentialsUpdateAuthorizationForRunningClient() throws IOException { + GoogleCredentials validCredentials = null; + + // accept cert path overridden by environment variable for local testing + if (System.getenv("GOOGLE_ACCOUNT_CREDENTIALS") != null) { + try (InputStream stream = + Files.newInputStream(Paths.get(System.getenv("GOOGLE_ACCOUNT_CREDENTIALS")))) { + validCredentials = GoogleCredentials.fromStream(stream); + } + } else { + try { + validCredentials = GoogleCredentials.getApplicationDefault(); + } catch (IOException e) { + } + } + + // credentials must be ServiceAccountCredentials + assumeTrue(validCredentials instanceof ServiceAccountCredentials); + + ServiceAccountCredentials invalidCredentials; + try (InputStream stream = + ITMutableCredentialsTest.class.getResourceAsStream(INVALID_CERT_PATH)) { + invalidCredentials = ServiceAccountCredentials.fromStream(stream); + } + + // create MutableCredentials first with valid credentials + MutableCredentials mutableCredentials = + new MutableCredentials((ServiceAccountCredentials) validCredentials); + + SpannerOptions options = + env.getTestHelper().getOptions().toBuilder() + // this setting is required in the scenario SPANNER_EMULATOR_HOST is set otherwise + // SpannerOptions overrides credentials to NoCredentials + .setEmulatorHost(null) + .setCredentials(mutableCredentials) + .build(); + + ProjectName projectName = ProjectName.of(options.getProjectId()); + try (Spanner spanner = options.getService(); + InstanceAdminClient instanceAdminClient = spanner.createInstanceAdminClient()) { + instanceAdminClient.listInstances(projectName); + + // update mutableCredentials now to use an invalid credentials + mutableCredentials.updateCredentials(invalidCredentials); + + try { + // this call should now fail with new invalid credentials + instanceAdminClient.listInstances(projectName); + fail("Expected UNAUTHENTICATED after switching to invalid credentials"); + } catch (Exception e) { + assertTrue(e.getMessage().contains("UNAUTHENTICATED")); + } + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITQueryTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITQueryTest.java index d24a3ca1012..eb3f1b00edd 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITQueryTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITQueryTest.java @@ -17,11 +17,13 @@ package com.google.cloud.spanner.it; import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator; +import static com.google.cloud.spanner.testing.ExperimentalHostHelper.isExperimentalHost; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.truth.Truth.assertThat; import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeFalse; @@ -131,16 +133,24 @@ public void simple() { @Test public void badQuery() { - try { - execute(Statement.of("SELECT Apples AND Oranges"), Type.int64()); - fail("Expected exception"); - } catch (SpannerException ex) { - assertThat(ex.getErrorCode()).isEqualTo(ErrorCode.INVALID_ARGUMENT); - if (dialect.dialect == Dialect.POSTGRESQL) { - assertThat(ex.getMessage()).contains("column \"apples\" does not exist"); - } else { - assertThat(ex.getMessage()).contains("Unrecognized name: Apples"); - } + SpannerException exception = + assertThrows( + SpannerException.class, + () -> execute(Statement.of("SELECT Apples AND Oranges"), Type.int64())); + assertEquals(ErrorCode.INVALID_ARGUMENT, exception.getErrorCode()); + if (dialect.dialect == Dialect.POSTGRESQL) { + assertTrue( + exception.getMessage(), + exception.getMessage().contains("column \"apples\" does not exist")); + // See https://www.postgresql.org/docs/current/errcodes-appendix.html + // '42703' == undefined_column + assumeFalse( + "Skipping PGErrorCode check on experimental host due to b/473270453", + isExperimentalHost()); + assertEquals("42703", exception.getPostgreSQLErrorCode()); + } else { + assertTrue( + exception.getMessage(), exception.getMessage().contains("Unrecognized name: Apples")); } } @@ -418,11 +428,6 @@ public void bindDateNull() { @Test public void bindUuid() { - // TODO: Remove once it is enabled in emulator. - assumeFalse("Emulator does not support UUID yet", isUsingEmulator()); - // TODO: Remove once it is enabled in production universe. - assumeTrue("UUID is currently only supported in cloud-devel", isUsingCloudDevel()); - UUID uuid = UUID.randomUUID(); Struct row = execute(Statement.newBuilder(selectValueQuery).bind("p1").to(uuid), Type.uuid()); assertThat(row.isNull(0)).isFalse(); @@ -431,11 +436,6 @@ public void bindUuid() { @Test public void bindUuidNull() { - // TODO: Remove once it is enabled in emulator. - assumeFalse("Emulator does not support UUID yet", isUsingEmulator()); - // TODO: Remove once it is enabled in production universe. - assumeTrue("UUID is currently only supported in cloud-devel", isUsingCloudDevel()); - Struct row = execute(Statement.newBuilder(selectValueQuery).bind("p1").to((UUID) null), Type.uuid()); assertThat(row.isNull(0)).isTrue(); @@ -838,11 +838,6 @@ public void bindDateArrayNull() { @Test public void bindUuidArray() { - // TODO: Remove once it is enabled in emulator. - assumeFalse("Emulator does not support UUID yet", isUsingEmulator()); - // TODO: Remove once it is enabled in production universe. - assumeTrue("UUID is currently only supported in cloud-devel", isUsingCloudDevel()); - UUID u1 = UUID.randomUUID(); UUID u2 = UUID.randomUUID(); @@ -856,11 +851,6 @@ public void bindUuidArray() { @Test public void bindUuidArrayEmpty() { - // TODO: Remove once it is enabled in emulator. - assumeFalse("Emulator does not support UUID yet", isUsingEmulator()); - // TODO: Remove once it is enabled in production universe. - assumeTrue("UUID is currently only supported in cloud-devel", isUsingCloudDevel()); - Struct row = execute( Statement.newBuilder(selectValueQuery).bind("p1").toUuidArray(Collections.emptyList()), @@ -871,11 +861,6 @@ public void bindUuidArrayEmpty() { @Test public void bindUuidArrayNull() { - // TODO: Remove once it is enabled in emulator. - assumeFalse("Emulator does not support UUID yet", isUsingEmulator()); - // TODO: Remove once it is enabled in production universe. - assumeTrue("UUID is currently only supported in cloud-devel", isUsingCloudDevel()); - Struct row = execute( Statement.newBuilder(selectValueQuery).bind("p1").toUuidArray(null), diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITQueueTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITQueueTest.java new file mode 100644 index 00000000000..eba3fb2865b --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITQueueTest.java @@ -0,0 +1,163 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.it; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; +import static org.junit.Assume.assumeTrue; + +import com.google.cloud.ByteArray; +import com.google.cloud.spanner.*; +import com.google.cloud.spanner.connection.ConnectionOptions; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import org.junit.*; +import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +/** Integration test for Cloud Spanner Queue. */ +@Category(ParallelIntegrationTest.class) +@RunWith(Parameterized.class) +public class ITQueueTest { + @ClassRule public static IntegrationTestEnv env = new IntegrationTestEnv(); + + @Parameterized.Parameters(name = "Dialect = {0}") + public static List data() { + List params = new ArrayList<>(); + params.add(new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL)); + return params; + } + + @Parameterized.Parameter() public DialectTestParameter dialect; + + private static DatabaseClient googleStandardSQLClient; + + private static final String[] GOOGLE_STANDARD_SQL_SCHEMA = + new String[] { + "CREATE Queue Q1 (" + + " Id INT64 NOT NULL," + + " Payload BYTES(MAX) NOT NULL," + + ") PRIMARY KEY (Id), " + + "OPTIONS (receive_mode = 'PULL')", + "CREATE TABLE T1 (" + + " K1 INT64 NOT NULL," + + " K INT64 NOT NULL," + + ") PRIMARY KEY (K1)" + }; + + private static DatabaseClient client; + + private Struct readRow(String queue, Key key, String... columns) { + return client.singleUse(TimestampBound.strong()).readRow(queue, key, Arrays.asList(columns)); + } + + @BeforeClass + public static void setUpTestSuite() { + // TODO: remove once the feature is fully enabled in prod + assumeTrue("Queue tests are temporarily disabled", false); + Database googleStandardSQLDatabase = + env.getTestHelper().createTestDatabase(GOOGLE_STANDARD_SQL_SCHEMA); + googleStandardSQLClient = env.getTestHelper().getDatabaseClient(googleStandardSQLDatabase); + System.out.println("Database created"); + } + + @Before + public void setUp() { + // TODO: add postgres schema & client after feature is enabled + client = googleStandardSQLClient; + } + + @AfterClass + public static void teardown() { + ConnectionOptions.closeSpanner(); + } + + @Test + public void testSendAndAckMutation() { + client.write( + Arrays.asList( + Mutation.newSendBuilder("Q1") + .setKey(Key.of(1)) + .setPayload(Value.bytes(ByteArray.copyFrom("payload1"))) + .build(), + Mutation.newSendBuilder("Q1") + .setKey(Key.of(2)) + .setPayload(Value.bytes(ByteArray.copyFrom("payload2"))) + .build(), + Mutation.newSendBuilder("Q1") + .setKey(Key.of(3)) + .setPayload(Value.bytes(ByteArray.copyFrom("payload3"))) + .setDeliveryTime(Instant.now()) + .build())); + + // Verifying messages are in the queue. + Struct row = readRow("Q1", Key.of(1), "Payload"); + assertThat(row == null).isFalse(); + assertThat(row.isNull(0)).isFalse(); + assertThat(row.getBytes(0)).isEqualTo(ByteArray.copyFrom("payload1")); + + row = readRow("Q1", Key.of(2), "Payload"); + assertThat(row.isNull(0)).isFalse(); + assertThat(row.getBytes(0)).isEqualTo(ByteArray.copyFrom("payload2")); + + row = readRow("Q1", Key.of(3), "Payload"); + assertThat(row.isNull(0)).isFalse(); + assertThat(row.getBytes(0)).isEqualTo(ByteArray.copyFrom("payload3")); + + // Ack-ing the first two messages. + client.write( + Arrays.asList( + Mutation.newAckBuilder("Q1").setKey(Key.of(1)).build(), + Mutation.newAckBuilder("Q1").setKey(Key.of(2)).build())); + + // Verifying the first 2 messages are acked and remvoed from the queue + row = readRow("Q1", Key.of(1), "Payload"); + assertThat(row == null).isTrue(); + row = readRow("Q1", Key.of(2), "Payload"); + assertThat(row == null).isTrue(); + row = readRow("Q1", Key.of(3), "Payload"); + assertThat(row.isNull(0)).isFalse(); + assertThat(row.getBytes(0)).isEqualTo(ByteArray.copyFrom("payload3")); + } + + @Test + public void testAckNotFound() { + // Enable IgnoreNotFound. + client.write( + Collections.singletonList( + Mutation.newAckBuilder("Q1").setKey(Key.of(1)).setIgnoreNotFound(true).build())); + Struct row = readRow("Q1", Key.of(1), "Payload"); + assertThat(row == null).isTrue(); + + // Disable IgnoreNotFound. + SpannerException thrown = + assertThrows( + SpannerException.class, + () -> + client.write( + Collections.singletonList( + Mutation.newAckBuilder("Q1") + .setKey(Key.of(1)) + .setIgnoreNotFound(false) + .build()))); + assertThat(thrown).hasMessageThat().contains("NOT_FOUND: Message not found"); + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITTransactionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITTransactionTest.java index 76b5436aba9..da55d1d5367 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITTransactionTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITTransactionTest.java @@ -41,7 +41,10 @@ import com.google.cloud.spanner.ReadContext; import com.google.cloud.spanner.ReadOnlyTransaction; import com.google.cloud.spanner.ResultSet; +import com.google.cloud.spanner.Spanner; import com.google.cloud.spanner.SpannerException; +import com.google.cloud.spanner.SpannerOptions; +import com.google.cloud.spanner.SpannerOptions.Builder.DefaultReadWriteTransactionOptions; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.Struct; import com.google.cloud.spanner.TimestampBound; @@ -52,6 +55,8 @@ import com.google.common.collect.Sets; import com.google.common.util.concurrent.SettableFuture; import com.google.common.util.concurrent.Uninterruptibles; +import com.google.spanner.v1.TransactionOptions.IsolationLevel; +import com.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -213,6 +218,54 @@ public void basicsUsingQuery() throws InterruptedException { }); } + @Test + public void isolationLevelAndReadLockModeSetAtClientLevelTest() { + SpannerOptions options = + env.getTestHelper().getOptions().toBuilder() + .setDefaultTransactionOptions( + DefaultReadWriteTransactionOptions.newBuilder() + .setIsolationLevel(IsolationLevel.REPEATABLE_READ) + .setReadLockMode(ReadLockMode.OPTIMISTIC) + .build()) + .build(); + try (Spanner spanner = options.getService()) { + DatabaseClient client = spanner.getDatabaseClient(db.getId()); + Long updatedRows = + client + .readWriteTransaction() + .run( + transaction -> + transaction.executeUpdate( + Statement.of("INSERT INTO T (K, V) VALUES ('test1', 2)"))); + assertThat(updatedRows).isEqualTo(1L); + } + } + + @Test + public void isolationLevelAndReadLockModeSetAtClientAndTxnLevelTest() { + SpannerOptions options = + env.getTestHelper().getOptions().toBuilder() + .setDefaultTransactionOptions( + DefaultReadWriteTransactionOptions.newBuilder() + .setIsolationLevel(IsolationLevel.REPEATABLE_READ) + .setReadLockMode(ReadLockMode.OPTIMISTIC) + .build()) + .build(); + try (Spanner spanner = options.getService()) { + DatabaseClient client = spanner.getDatabaseClient(db.getId()); + Long updatedRows = + client + .readWriteTransaction( + Options.isolationLevel(IsolationLevel.SERIALIZABLE), + Options.readLockMode(ReadLockMode.PESSIMISTIC)) + .run( + transaction -> + transaction.executeUpdate( + Statement.of("INSERT INTO T (K, V) VALUES ('test1', 2)"))); + assertThat(updatedRows).isEqualTo(1L); + } + } + @Test public void userExceptionPreventsCommit() { class UserException extends Exception { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITUuidTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITUuidTest.java index 561602abfe2..7bec70930c7 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITUuidTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITUuidTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner.it; -import static com.google.common.base.Strings.isNullOrEmpty; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -61,23 +60,11 @@ public class ITUuidTest { @ClassRule public static IntegrationTestEnv env = new IntegrationTestEnv(); - private static boolean isUsingCloudDevel() { - String jobType = System.getenv("JOB_TYPE"); - - // Assumes that the jobType contains the string "cloud-devel" to signal that - // the environment is cloud-devel. - return !isNullOrEmpty(jobType) && jobType.contains("cloud-devel"); - } - @Parameterized.Parameters(name = "Dialect = {0}") public static List data() { - // TODO: Remove once it is enabled in production universe. - if (isUsingCloudDevel()) { - return Arrays.asList( - new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL), - new DialectTestParameter(Dialect.POSTGRESQL)); - } - return Collections.emptyList(); + return Arrays.asList( + new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL), + new DialectTestParameter(Dialect.POSTGRESQL)); } @Parameterized.Parameter() public DialectTestParameter dialect; diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/ChannelFinderGoldenTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/ChannelFinderGoldenTest.java new file mode 100644 index 00000000000..525313f1ab4 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/ChannelFinderGoldenTest.java @@ -0,0 +1,203 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +import com.google.protobuf.TextFormat; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.ReadRequest; +import com.google.spanner.v1.RoutingHint; +import io.grpc.CallOptions; +import io.grpc.ClientCall; +import io.grpc.ManagedChannel; +import io.grpc.MethodDescriptor; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import spanner.cloud.location.FinderTestCase; +import spanner.cloud.location.FinderTestCases; + +@RunWith(JUnit4.class) +public class ChannelFinderGoldenTest { + + @Test + public void goldenTest() throws Exception { + FinderTestCases.Builder builder = FinderTestCases.newBuilder(); + try (InputStream inputStream = + getClass().getClassLoader().getResourceAsStream("finder_test.textproto"); + InputStreamReader reader = + new InputStreamReader(Objects.requireNonNull(inputStream), StandardCharsets.UTF_8)) { + TextFormat.merge(reader, builder); + } + + FinderTestCases testCases = builder.build(); + + for (FinderTestCase testCase : testCases.getTestCaseList()) { + FakeEndpointCache endpointCache = new FakeEndpointCache(); + ChannelFinder finder = new ChannelFinder(endpointCache); + finder.useDeterministicRandom(); + + for (FinderTestCase.Event event : testCase.getEventList()) { + if (event.hasCacheUpdate()) { + finder.update(event.getCacheUpdate()); + } + + if (!event.getUnhealthyServersList().isEmpty()) { + endpointCache.setUnhealthyServers(new HashSet<>(event.getUnhealthyServersList())); + } else { + endpointCache.setUnhealthyServers(Collections.emptySet()); + } + + switch (event.getRequestCase()) { + case READ: + ReadRequest.Builder readBuilder = event.getRead().toBuilder(); + ChannelEndpoint readEndpoint = finder.findServer(readBuilder); + assertHintAndServer( + testCase.getName(), event, readBuilder.getRoutingHint(), readEndpoint); + break; + case SQL: + ExecuteSqlRequest.Builder sqlBuilder = event.getSql().toBuilder(); + ChannelEndpoint sqlEndpoint = finder.findServer(sqlBuilder); + assertHintAndServer( + testCase.getName(), event, sqlBuilder.getRoutingHint(), sqlEndpoint); + break; + case REQUEST_NOT_SET: + default: + break; + } + } + } + } + + private static void assertHintAndServer( + String testCaseName, + FinderTestCase.Event event, + RoutingHint actualHint, + ChannelEndpoint endpoint) { + assertEquals( + "RoutingHint mismatch for test case: " + testCaseName, event.getHint(), actualHint); + String expectedServer = event.getServer(); + if (!expectedServer.isEmpty()) { + assertNotNull("Expected server for test case: " + testCaseName, endpoint); + assertEquals(expectedServer, endpoint.getAddress()); + } else { + assertNull("Expected no server for test case: " + testCaseName, endpoint); + } + } + + private static final class FakeEndpointCache implements ChannelEndpointCache { + private final Map endpoints = new HashMap<>(); + private final FakeEndpoint defaultEndpoint = new FakeEndpoint("default"); + private volatile Set unhealthyServers = Collections.emptySet(); + + void setUnhealthyServers(Set unhealthyServers) { + this.unhealthyServers = unhealthyServers; + } + + @Override + public ChannelEndpoint defaultChannel() { + return defaultEndpoint; + } + + @Override + public ChannelEndpoint get(String address) { + return endpoints.computeIfAbsent(address, FakeEndpoint::new); + } + + @Override + public void evict(String address) { + endpoints.remove(address); + } + + @Override + public void shutdown() { + endpoints.clear(); + } + + private final class FakeEndpoint implements ChannelEndpoint { + private final String address; + + private FakeEndpoint(String address) { + this.address = address; + } + + @Override + public String getAddress() { + return address; + } + + @Override + public boolean isHealthy() { + return !unhealthyServers.contains(address); + } + + @Override + public ManagedChannel getChannel() { + return new ManagedChannel() { + @Override + public ManagedChannel shutdown() { + return this; + } + + @Override + public ManagedChannel shutdownNow() { + return this; + } + + @Override + public boolean isShutdown() { + return false; + } + + @Override + public boolean isTerminated() { + return false; + } + + @Override + public boolean awaitTermination(long timeout, TimeUnit unit) { + return true; + } + + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + throw new UnsupportedOperationException(); + } + + @Override + public String authority() { + return address; + } + }; + } + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java index ee90f99d260..7a6a9f78d4b 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner.spi.v1; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static com.google.common.truth.Truth.assertThat; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; @@ -27,14 +26,24 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeTrue; +import com.google.api.core.ApiFunction; import com.google.api.gax.core.GaxProperties; import com.google.api.gax.grpc.GrpcCallContext; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.HeaderProvider; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.auth.Credentials; import com.google.auth.oauth2.AccessToken; import com.google.auth.oauth2.OAuth2Credentials; +import com.google.cloud.NoCredentials; import com.google.cloud.ServiceOptions; +import com.google.cloud.grpc.GcpManagedChannelOptions; +import com.google.cloud.grpc.GcpManagedChannelOptions.GcpMetricsOptions; +import com.google.cloud.grpc.fallback.GcpFallbackChannelOptions; +import com.google.cloud.grpc.fallback.GcpFallbackOpenTelemetry; import com.google.cloud.spanner.DatabaseClient; import com.google.cloud.spanner.DatabaseId; import com.google.cloud.spanner.Dialect; @@ -76,20 +85,29 @@ import io.grpc.ServerInterceptor; import io.grpc.Status; import io.grpc.auth.MoreCallCredentials; +import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder; import io.grpc.protobuf.lite.ProtoLiteUtils; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator; import io.opentelemetry.context.propagation.ContextPropagators; import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.metrics.SdkMeterProvider; +import io.opentelemetry.sdk.metrics.data.MetricData; +import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; import io.opentelemetry.sdk.trace.SdkTracerProvider; import io.opentelemetry.sdk.trace.samplers.Sampler; +import java.io.IOException; import java.net.InetSocketAddress; import java.time.Duration; +import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.concurrent.Executor; +import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -167,7 +185,6 @@ public static Object[] data() { @Before public void startServer() throws Exception { - disableDefaultMtlsProvider(); // Enable OpenTelemetry tracing. SpannerOptionsHelper.resetActiveTracingFramework(); SpannerOptions.enableOpenTelemetryTraces(); @@ -874,6 +891,230 @@ public void testCreateSession_whenMultiplexedSessionIsFalse_assertSessionProto() rpc.shutdown(); } + @Test + public void testChannelEndpointCacheFactoryUsedWhenLocationApiEnabled() { + AtomicBoolean factoryCalled = new AtomicBoolean(false); + ChannelEndpointCacheFactory factory = + baseProvider -> { + factoryCalled.set(true); + return new GrpcChannelEndpointCache(baseProvider); + }; + + try { + SpannerOptions.useEnvironment( + new SpannerOptions.SpannerEnvironment() { + @Override + public boolean isEnableLocationApi() { + return true; + } + }); + SpannerOptions options = + createSpannerOptions().toBuilder().setChannelEndpointCacheFactory(factory).build(); + GapicSpannerRpc rpc = new GapicSpannerRpc(options, true); + rpc.shutdown(); + assertTrue(factoryCalled.get()); + } finally { + SpannerOptions.useDefaultEnvironment(); + } + } + + @Test + public void testLocationApiDoesNotOverrideExplicitChannelProvider() { + AtomicBoolean factoryCalled = new AtomicBoolean(false); + ChannelEndpointCacheFactory factory = + baseProvider -> { + factoryCalled.set(true); + return new GrpcChannelEndpointCache(baseProvider); + }; + + AtomicBoolean providerUsed = new AtomicBoolean(false); + TransportChannelProvider channelProvider = + new RecordingTransportChannelProvider( + address.getHostString(), server.getPort(), providerUsed); + + try { + SpannerOptions.useEnvironment( + new SpannerOptions.SpannerEnvironment() { + @Override + public boolean isEnableLocationApi() { + return true; + } + }); + SpannerOptions options = + createSpannerOptions().toBuilder() + .setChannelProvider(channelProvider) + .setChannelEndpointCacheFactory(factory) + .build(); + GapicSpannerRpc rpc = new GapicSpannerRpc(options, true); + rpc.shutdown(); + assertTrue(providerUsed.get()); + assertFalse(factoryCalled.get()); + } finally { + SpannerOptions.useDefaultEnvironment(); + } + } + + @Test + public void testLocationApiDisabledInOptionsDoesNotCreateKeyAwareChannelProvider() { + AtomicBoolean factoryCalled = new AtomicBoolean(false); + ChannelEndpointCacheFactory factory = + baseProvider -> { + factoryCalled.set(true); + return new GrpcChannelEndpointCache(baseProvider); + }; + + try { + SpannerOptions.useEnvironment( + new SpannerOptions.SpannerEnvironment() { + @Override + public boolean isEnableLocationApi() { + return false; + } + }); + SpannerOptions options = + createSpannerOptions().toBuilder().setChannelEndpointCacheFactory(factory).build(); + GapicSpannerRpc rpc = new GapicSpannerRpc(options, true); + rpc.shutdown(); + assertFalse(factoryCalled.get()); + } finally { + SpannerOptions.useDefaultEnvironment(); + } + } + + @Test + public void testGrpcGcpExtensionPreservesChannelConfigurator() throws Exception { + InstantiatingGrpcChannelProvider.Builder channelProviderBuilder = + InstantiatingGrpcChannelProvider.newBuilder(); + AtomicBoolean baseConfiguratorCalled = new AtomicBoolean(false); + channelProviderBuilder.setChannelConfigurator( + builder -> { + baseConfiguratorCalled.set(true); + return builder; + }); + + SpannerOptions options = + SpannerOptions.newBuilder().setProjectId("[PROJECT]").enableGrpcGcpExtension().build(); + + java.lang.reflect.Method method = + GapicSpannerRpc.class.getDeclaredMethod( + "maybeEnableGrpcGcpExtension", + InstantiatingGrpcChannelProvider.Builder.class, + SpannerOptions.class); + method.setAccessible(true); + method.invoke(null, channelProviderBuilder, options); + + ApiFunction chainedConfigurator = + channelProviderBuilder.getChannelConfigurator(); + chainedConfigurator.apply(NettyChannelBuilder.forAddress("localhost", 1)); + + assertTrue(baseConfiguratorCalled.get()); + } + + @Test + public void testGrpcGcpOtelMetricsDisabledSkipsMeterInjection() throws Exception { + SpannerOptions options = + SpannerOptions.newBuilder() + .setProjectId("[PROJECT]") + .setGrpcGcpOtelMetricsEnabled(false) + .build(); + + java.lang.reflect.Method method = + GapicSpannerRpc.class.getDeclaredMethod( + "grpcGcpOptionsWithMetricsAndDcp", SpannerOptions.class); + method.setAccessible(true); + GcpManagedChannelOptions grpcGcpOptions = + (GcpManagedChannelOptions) method.invoke(null, options); + GcpMetricsOptions metricsOptions = grpcGcpOptions.getMetricsOptions(); + + assertNotNull(metricsOptions); + assertNull(metricsOptions.getOpenTelemetryMeter()); + } + + private static final class RecordingTransportChannelProvider implements TransportChannelProvider { + private final String host; + private final int port; + private final AtomicBoolean used; + + private RecordingTransportChannelProvider(String host, int port, AtomicBoolean used) { + this.host = host; + this.port = port; + this.used = used; + } + + @Override + public GrpcTransportChannel getTransportChannel() throws IOException { + used.set(true); + return GrpcTransportChannel.newBuilder() + .setManagedChannel(ManagedChannelBuilder.forAddress(host, port).usePlaintext().build()) + .build(); + } + + @Override + public String getTransportName() { + return GrpcTransportChannel.getGrpcTransportName(); + } + + @Override + public boolean needsEndpoint() { + return false; + } + + @Override + public boolean needsCredentials() { + return false; + } + + @Override + public boolean needsExecutor() { + return false; + } + + @Override + public boolean needsHeaders() { + return false; + } + + @Override + public boolean shouldAutoClose() { + return true; + } + + @Override + public TransportChannelProvider withEndpoint(String endpoint) { + return this; + } + + @Override + public TransportChannelProvider withCredentials(Credentials credentials) { + return this; + } + + @Override + public TransportChannelProvider withHeaders(Map headers) { + return this; + } + + @Override + public TransportChannelProvider withPoolSize(int poolSize) { + return this; + } + + @Override + public TransportChannelProvider withExecutor(ScheduledExecutorService executor) { + return this; + } + + @Override + public TransportChannelProvider withExecutor(Executor executor) { + return this; + } + + @Override + public boolean acceptsPoolSize() { + return false; + } + } + private SpannerOptions createSpannerOptions() { String endpoint = address.getHostString() + ":" + server.getPort(); return SpannerOptions.newBuilder() @@ -889,4 +1130,193 @@ private SpannerOptions createSpannerOptions() { .setCallCredentialsProvider(() -> MoreCallCredentials.from(VARIABLE_CREDENTIALS)) .build(); } + + static class TestableGapicSpannerRpc extends GapicSpannerRpc { + public TestableGapicSpannerRpc(SpannerOptions options) { + super(options); + } + + @Override + OpenTelemetry getFallbackOpenTelemetry(SpannerOptions options) { + return options.getOpenTelemetry(); + } + + @Override + GcpFallbackChannelOptions createFallbackChannelOptions( + GcpFallbackOpenTelemetry fallbackTelemetry, int minFailedCalls) { + // Override default 1-minute period to 10ms for instant testing + return GcpFallbackChannelOptions.newBuilder() + .setPrimaryChannelName("directpath") + .setFallbackChannelName("cloudpath") + .setMinFailedCalls(10) + .setPeriod(Duration.ofMillis(5)) + .setGcpFallbackOpenTelemetry(fallbackTelemetry) + .build(); + } + } + + @Test + public void testFallbackIntegration_doesNotSwitchWhenThresholdNotMet() throws Exception { + // Setup OpenTelemetry to capture metrics + InMemoryMetricReader metricReader = InMemoryMetricReader.create(); + SdkMeterProvider meterProvider = + SdkMeterProvider.builder().registerMetricReader(metricReader).build(); + OpenTelemetrySdk openTelemetry = + OpenTelemetrySdk.builder().setMeterProvider(meterProvider).build(); + + SpannerOptions.useEnvironment( + new SpannerOptions.SpannerEnvironment() { + @Override + public boolean isEnableGcpFallback() { + return true; + } + }); + try { + SpannerOptions.Builder builder = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setEnableDirectAccess(true) + .setHost("http://localhost:1") // Closed port + .setCredentials(NoCredentials.getInstance()) + .setOpenTelemetry(openTelemetry); + // Make sure the ExecuteBatchDml RPC fails quickly to keep the test fast. + // Note that the timeout is actually not used. It is the fact that it does not retry that + // makes it fail fast. + builder + .getSpannerStubSettingsBuilder() + .executeBatchDmlSettings() + .setSimpleTimeoutNoRetriesDuration(Duration.ofSeconds(10)); + // Setup Options with invalid host to force error + SpannerOptions options = builder.build(); + + TestableGapicSpannerRpc rpc = new TestableGapicSpannerRpc(options); + try { + // Make a call that is expected to fail + SpannerException exception = + assertThrows( + SpannerException.class, + () -> + rpc.executeBatchDml( + com.google.spanner.v1.ExecuteBatchDmlRequest.newBuilder() + .setSession("projects/p/instances/i/databases/d/sessions/s") + .build(), + null)); + assertEquals(ErrorCode.UNAVAILABLE, exception.getErrorCode()); + + // Wait briefly for the 10ms period to trigger the fallback check + Thread.sleep(10); + + // Verify Fallback via Metrics + Collection metrics = metricReader.collectAllMetrics(); + boolean fallbackOccurred = + metrics.stream() + .anyMatch(md -> md.getName().contains("fallback_count") && hasValue(md)); + + assertFalse("Fallback metric should not be present", fallbackOccurred); + + } finally { + rpc.shutdown(); + } + } finally { + SpannerOptions.useDefaultEnvironment(); + } + } + + static class TestableGapicSpannerRpcWithLowerMinFailedCalls extends GapicSpannerRpc { + public TestableGapicSpannerRpcWithLowerMinFailedCalls(SpannerOptions options) { + super(options); + } + + @Override + OpenTelemetry getFallbackOpenTelemetry(SpannerOptions options) { + return options.getOpenTelemetry(); + } + + @Override + GcpFallbackChannelOptions createFallbackChannelOptions( + GcpFallbackOpenTelemetry fallbackTelemetry, int minFailedCalls) { + // Override default 1-minute period to 10ms for instant testing + return GcpFallbackChannelOptions.newBuilder() + .setPrimaryChannelName("directpath") + .setFallbackChannelName("cloudpath") + .setMinFailedCalls(1) + .setPeriod(Duration.ofMillis(5)) + .setGcpFallbackOpenTelemetry(fallbackTelemetry) + .build(); + } + } + + @Test + public void testFallbackIntegration_switchesToFallbackOnFailure() throws Exception { + // Setup OpenTelemetry to capture metrics + InMemoryMetricReader metricReader = InMemoryMetricReader.create(); + SdkMeterProvider meterProvider = + SdkMeterProvider.builder().registerMetricReader(metricReader).build(); + OpenTelemetrySdk openTelemetry = + OpenTelemetrySdk.builder().setMeterProvider(meterProvider).build(); + + SpannerOptions.useEnvironment( + new SpannerOptions.SpannerEnvironment() { + @Override + public boolean isEnableGcpFallback() { + return true; + } + }); + try { + SpannerOptions.Builder builder = + SpannerOptions.newBuilder() + .setProjectId("test-project") + .setEnableDirectAccess(true) + .setHost("http://localhost:1") // Closed port + .setCredentials(NoCredentials.getInstance()) + .setOpenTelemetry(openTelemetry); + // Make sure the ExecuteBatchDml RPC fails quickly to keep the test fast. + // Note that the timeout is actually not used. It is the fact that it does not retry that + // makes it fail fast. + builder + .getSpannerStubSettingsBuilder() + .executeBatchDmlSettings() + .setSimpleTimeoutNoRetriesDuration(Duration.ofSeconds(10)); + // Setup Options with invalid host to force error + SpannerOptions options = builder.build(); + + TestableGapicSpannerRpcWithLowerMinFailedCalls rpc = + new TestableGapicSpannerRpcWithLowerMinFailedCalls(options); + try { + // Make a call that is expected to fail + SpannerException exception = + assertThrows( + SpannerException.class, + () -> + rpc.executeBatchDml( + com.google.spanner.v1.ExecuteBatchDmlRequest.newBuilder() + .setSession("projects/p/instances/i/databases/d/sessions/s") + .build(), + null)); + assertEquals(ErrorCode.UNAVAILABLE, exception.getErrorCode()); + + // Wait briefly for the 10ms period to trigger the fallback check + Thread.sleep(10); + + // Verify Fallback via Metrics + Collection metrics = metricReader.collectAllMetrics(); + boolean fallbackOccurred = + metrics.stream() + .anyMatch(md -> md.getName().contains("fallback_count") && hasValue(md)); + + assertTrue( + "Fallback metric should be present, indicating GcpFallbackChannel is active", + fallbackOccurred); + + } finally { + rpc.shutdown(); + } + } finally { + SpannerOptions.useDefaultEnvironment(); + } + } + + private boolean hasValue(MetricData metricData) { + return metricData.getLongSumData().getPoints().stream().anyMatch(point -> point.getValue() > 0); + } } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GfeLatencyTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GfeLatencyTest.java index 5067eb09ff9..bcded26d685 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GfeLatencyTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GfeLatencyTest.java @@ -16,9 +16,7 @@ package com.google.cloud.spanner.spi.v1; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.*; import com.google.auth.oauth2.AccessToken; import com.google.auth.oauth2.OAuth2Credentials; @@ -55,10 +53,7 @@ import java.util.Random; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.*; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -133,7 +128,6 @@ public class GfeLatencyTest { @BeforeClass public static void startServer() throws Exception { - disableDefaultMtlsProvider(); //noinspection deprecation SpannerRpcViews.registerGfeLatencyAndHeaderMissingCountViews(); @@ -259,7 +253,7 @@ public void testGfeMissingHeaderCountExecuteStreamingSql() throws InterruptedExc SpannerRpcViews.SPANNER_GFE_HEADER_MISSING_COUNT_VIEW, "google.spanner.v1.Spanner/ExecuteStreamingSql", true); - assertEquals(1, count1); + assertTrue(count1 >= 1); } @Test @@ -270,7 +264,7 @@ public void testGfeMissingHeaderExecuteSql() throws InterruptedException { long count = getMetric( SpannerRpcViews.SPANNER_GFE_HEADER_MISSING_COUNT_VIEW, - "google.spanner.v1.Spanner/ExecuteSql", + "google.spanner.v1.Spanner/Commit", false); assertEquals(0, count); @@ -280,7 +274,7 @@ public void testGfeMissingHeaderExecuteSql() throws InterruptedException { long count1 = getMetric( SpannerRpcViews.SPANNER_GFE_HEADER_MISSING_COUNT_VIEW, - "google.spanner.v1.Spanner/ExecuteSql", + "google.spanner.v1.Spanner/Commit", true); assertEquals(1, count1); } diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GrpcChannelEndpointCacheTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GrpcChannelEndpointCacheTest.java new file mode 100644 index 00000000000..56e6d3cfc2b --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GrpcChannelEndpointCacheTest.java @@ -0,0 +1,125 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.cloud.spanner.SpannerException; +import io.grpc.ManagedChannelBuilder; +import org.junit.Test; + +public class GrpcChannelEndpointCacheTest { + + private static InstantiatingGrpcChannelProvider createProvider(String endpoint) { + return InstantiatingGrpcChannelProvider.newBuilder() + .setEndpoint(endpoint) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .build(); + } + + @Test + public void defaultChannelIsCached() throws Exception { + GrpcChannelEndpointCache cache = new GrpcChannelEndpointCache(createProvider("localhost:1234")); + try { + ChannelEndpoint defaultChannel = cache.defaultChannel(); + ChannelEndpoint server = cache.get(defaultChannel.getAddress()); + assertThat(server).isSameInstanceAs(defaultChannel); + } finally { + cache.shutdown(); + } + } + + @Test + public void getCachesPerAddress() throws Exception { + GrpcChannelEndpointCache cache = new GrpcChannelEndpointCache(createProvider("localhost:1234")); + try { + ChannelEndpoint first = cache.get("localhost:1111"); + ChannelEndpoint second = cache.get("localhost:1111"); + ChannelEndpoint third = cache.get("localhost:2222"); + + assertThat(second).isSameInstanceAs(first); + assertThat(third).isNotSameInstanceAs(first); + } finally { + cache.shutdown(); + } + } + + @Test + public void routedChannelsReuseDefaultAuthority() throws Exception { + GrpcChannelEndpointCache cache = new GrpcChannelEndpointCache(createProvider("localhost:1234")); + try { + ChannelEndpoint routed = cache.get("localhost:1111"); + + assertThat(routed.getChannel().authority()).isEqualTo("localhost:1234"); + } finally { + cache.shutdown(); + } + } + + @Test + public void evictRemovesNonDefaultServer() throws Exception { + GrpcChannelEndpointCache cache = new GrpcChannelEndpointCache(createProvider("localhost:1234")); + try { + ChannelEndpoint first = cache.get("localhost:1111"); + cache.evict("localhost:1111"); + ChannelEndpoint second = cache.get("localhost:1111"); + + assertThat(second).isNotSameInstanceAs(first); + } finally { + cache.shutdown(); + } + } + + @Test + public void evictIgnoresDefaultChannel() throws Exception { + GrpcChannelEndpointCache cache = new GrpcChannelEndpointCache(createProvider("localhost:1234")); + try { + ChannelEndpoint defaultChannel = cache.defaultChannel(); + cache.evict(defaultChannel.getAddress()); + ChannelEndpoint server = cache.get(defaultChannel.getAddress()); + + assertThat(server).isSameInstanceAs(defaultChannel); + } finally { + cache.shutdown(); + } + } + + @Test + public void shutdownPreventsNewServers() throws Exception { + GrpcChannelEndpointCache cache = new GrpcChannelEndpointCache(createProvider("localhost:1234")); + cache.shutdown(); + + assertThrows(SpannerException.class, () -> cache.get("localhost:1111")); + assertThat(cache.defaultChannel().getChannel().isShutdown()).isTrue(); + } + + @Test + public void healthReflectsChannelShutdown() throws Exception { + GrpcChannelEndpointCache cache = new GrpcChannelEndpointCache(createProvider("localhost:1234")); + try { + ChannelEndpoint server = cache.get("localhost:1111"); + assertThat(server.isHealthy()).isTrue(); + + server.getChannel().shutdownNow(); + assertThat(server.isHealthy()).isFalse(); + } finally { + cache.shutdown(); + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyAwareChannelTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyAwareChannelTest.java new file mode 100644 index 00000000000..a4919389a85 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyAwareChannelTest.java @@ -0,0 +1,1253 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThrows; + +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.ListValue; +import com.google.protobuf.TextFormat; +import com.google.protobuf.Value; +import com.google.spanner.v1.BeginTransactionRequest; +import com.google.spanner.v1.CacheUpdate; +import com.google.spanner.v1.CommitRequest; +import com.google.spanner.v1.CommitResponse; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.Group; +import com.google.spanner.v1.Mutation; +import com.google.spanner.v1.PartialResultSet; +import com.google.spanner.v1.Range; +import com.google.spanner.v1.ReadRequest; +import com.google.spanner.v1.RecipeList; +import com.google.spanner.v1.ResultSet; +import com.google.spanner.v1.ResultSetMetadata; +import com.google.spanner.v1.RollbackRequest; +import com.google.spanner.v1.RoutingHint; +import com.google.spanner.v1.SpannerGrpc; +import com.google.spanner.v1.Tablet; +import com.google.spanner.v1.Transaction; +import com.google.spanner.v1.TransactionOptions; +import com.google.spanner.v1.TransactionSelector; +import io.grpc.CallOptions; +import io.grpc.ClientCall; +import io.grpc.ManagedChannel; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.Status; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class KeyAwareChannelTest { + private static final String DEFAULT_ADDRESS = "default:1234"; + private static final String SESSION = + "projects/p/instances/i/databases/d/sessions/test-session-id"; + + @Test + public void cancelBeforeStartPreservesTrailersAndSkipsDelegateCreation() throws Exception { + TestHarness harness = createHarness(); + ClientCall call = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + + Metadata causeTrailers = new Metadata(); + Metadata.Key key = Metadata.Key.of("debug", Metadata.ASCII_STRING_MARSHALLER); + causeTrailers.put(key, "timeout"); + RuntimeException cause = + Status.DEADLINE_EXCEEDED + .withDescription("server timeout") + .asRuntimeException(causeTrailers); + + call.cancel("cancelled by client", cause); + CapturingListener listener = new CapturingListener<>(); + call.start(listener, new Metadata()); + + assertThat(harness.defaultManagedChannel.callCount()).isEqualTo(0); + assertThat(listener.closeCount).isEqualTo(1); + assertThat(listener.closedStatus.getCode()).isEqualTo(Status.Code.CANCELLED); + assertThat(listener.closedStatus.getDescription()).isEqualTo("cancelled by client"); + assertThat(listener.closedTrailers.get(key)).isEqualTo("timeout"); + } + + @Test + public void cancelAfterStartBeforeSendSkipsDelegateCreation() throws Exception { + TestHarness harness = createHarness(); + ClientCall call = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + + CapturingListener listener = new CapturingListener<>(); + call.start(listener, new Metadata()); + call.cancel("cancel", null); + call.sendMessage(ExecuteSqlRequest.newBuilder().setSession(SESSION).build()); + + assertThat(harness.defaultManagedChannel.callCount()).isEqualTo(0); + assertThat(listener.closeCount).isEqualTo(1); + assertThat(listener.closedStatus.getCode()).isEqualTo(Status.Code.CANCELLED); + } + + @Test + public void cancelAfterDelegateCreationDelegatesToUnderlyingCall() throws Exception { + TestHarness harness = createHarness(); + ClientCall call = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + + CapturingListener listener = new CapturingListener<>(); + call.start(listener, new Metadata()); + call.sendMessage(ExecuteSqlRequest.newBuilder().setSession(SESSION).build()); + + @SuppressWarnings("unchecked") + RecordingClientCall delegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + RuntimeException cause = new RuntimeException("boom"); + call.cancel("cancel now", cause); + + assertThat(delegate.cancelCalled).isTrue(); + assertThat(delegate.cancelMessage).isEqualTo("cancel now"); + assertThat(delegate.cancelCause).isSameInstanceAs(cause); + assertThat(listener.closeCount).isEqualTo(0); + } + + @Test + public void sendMessageBeforeStartThrows() throws Exception { + TestHarness harness = createHarness(); + ClientCall call = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + + assertThrows( + IllegalStateException.class, + () -> call.sendMessage(ExecuteSqlRequest.newBuilder().setSession(SESSION).build())); + } + + @Test + public void deadlineExceededFromDelegateIsForwardedToListener() throws Exception { + TestHarness harness = createHarness(); + ClientCall call = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + CapturingListener listener = new CapturingListener<>(); + + call.start(listener, new Metadata()); + call.sendMessage(ExecuteSqlRequest.newBuilder().setSession(SESSION).build()); + + @SuppressWarnings("unchecked") + RecordingClientCall delegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + Metadata trailers = new Metadata(); + Metadata.Key key = Metadata.Key.of("timeout", Metadata.ASCII_STRING_MARSHALLER); + trailers.put(key, "true"); + Status status = Status.DEADLINE_EXCEEDED.withDescription("rpc timeout"); + delegate.emitOnClose(status, trailers); + + assertThat(listener.closeCount).isEqualTo(1); + assertThat(listener.closedStatus).isEqualTo(status); + assertThat(listener.closedTrailers.get(key)).isEqualTo("true"); + } + + @Test + public void timeoutOnCommitClearsTransactionAffinity() throws Exception { + TestHarness harness = createHarness(); + ByteString transactionId = ByteString.copyFromUtf8("tx-1"); + + ClientCall beginCall = + harness.channel.newCall(SpannerGrpc.getBeginTransactionMethod(), CallOptions.DEFAULT); + beginCall.start(new CapturingListener(), new Metadata()); + beginCall.sendMessage(BeginTransactionRequest.newBuilder().setSession(SESSION).build()); + + @SuppressWarnings("unchecked") + RecordingClientCall beginDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + beginDelegate.emitOnMessage(Transaction.newBuilder().setId(transactionId).build()); + beginDelegate.emitOnClose(Status.OK, new Metadata()); + + ClientCall commitCall = + harness.channel.newCall(SpannerGrpc.getCommitMethod(), CallOptions.DEFAULT); + commitCall.start(new CapturingListener(), new Metadata()); + commitCall.sendMessage( + CommitRequest.newBuilder().setSession(SESSION).setTransactionId(transactionId).build()); + + assertThat(harness.endpointCache.getCount(DEFAULT_ADDRESS)).isEqualTo(1); + + @SuppressWarnings("unchecked") + RecordingClientCall commitDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + commitDelegate.emitOnClose(Status.DEADLINE_EXCEEDED, new Metadata()); + + ClientCall rollbackCall = + harness.channel.newCall(SpannerGrpc.getRollbackMethod(), CallOptions.DEFAULT); + rollbackCall.start(new CapturingListener(), new Metadata()); + rollbackCall.sendMessage( + RollbackRequest.newBuilder().setSession(SESSION).setTransactionId(transactionId).build()); + + assertThat(harness.endpointCache.getCount(DEFAULT_ADDRESS)).isEqualTo(1); + } + + @Test + public void requestAfterCancelBeforeSendIsIgnored() throws Exception { + TestHarness harness = createHarness(); + ClientCall call = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + + CapturingListener listener = new CapturingListener<>(); + call.start(listener, new Metadata()); + call.cancel("cancel", null); + call.request(10); + call.sendMessage(ExecuteSqlRequest.newBuilder().setSession(SESSION).build()); + + assertThat(harness.defaultManagedChannel.callCount()).isEqualTo(0); + assertThat(listener.closeCount).isEqualTo(1); + assertThat(listener.closedStatus.getCode()).isEqualTo(Status.Code.CANCELLED); + } + + @Test + public void resultSetCacheUpdateRoutesSubsequentRequest() throws Exception { + TestHarness harness = createHarness(); + ExecuteSqlRequest request = + ExecuteSqlRequest.newBuilder() + .setSession(SESSION) + .setRoutingHint(RoutingHint.newBuilder().setKey(bytes("a")).build()) + .build(); + + ClientCall firstCall = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + firstCall.start(new CapturingListener(), new Metadata()); + firstCall.sendMessage(request); + + @SuppressWarnings("unchecked") + RecordingClientCall firstDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + CacheUpdate cacheUpdate = + CacheUpdate.newBuilder() + .setDatabaseId(7L) + .addRange( + Range.newBuilder() + .setStartKey(bytes("a")) + .setLimitKey(bytes("z")) + .setGroupUid(9L) + .setSplitId(1L) + .setGeneration(bytes("1"))) + .addGroup( + Group.newBuilder() + .setGroupUid(9L) + .setGeneration(bytes("1")) + .addTablets( + Tablet.newBuilder() + .setTabletUid(3L) + .setServerAddress("routed:1234") + .setIncarnation(bytes("1")) + .setDistance(0))) + .build(); + + firstDelegate.emitOnMessage(ResultSet.newBuilder().setCacheUpdate(cacheUpdate).build()); + + ClientCall secondCall = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + secondCall.start(new CapturingListener(), new Metadata()); + secondCall.sendMessage(request); + + assertThat(harness.endpointCache.callCountForAddress(DEFAULT_ADDRESS)).isEqualTo(1); + assertThat(harness.endpointCache.callCountForAddress("routed:1234")).isEqualTo(1); + } + + @Test + public void beginTransactionWithMutationKeyAddsRoutingHint() throws Exception { + TestHarness harness = createHarness(); + seedCache(harness, createMutationRoutingCacheUpdate()); + + Mutation mutation = createInsertMutation("b"); + ClientCall beginCall = + harness.channel.newCall(SpannerGrpc.getBeginTransactionMethod(), CallOptions.DEFAULT); + beginCall.start(new CapturingListener(), new Metadata()); + beginCall.sendMessage( + BeginTransactionRequest.newBuilder().setSession(SESSION).setMutationKey(mutation).build()); + + @SuppressWarnings("unchecked") + RecordingClientCall beginDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + assertNotNull(beginDelegate.lastMessage); + assertEquals(7L, beginDelegate.lastMessage.getRoutingHint().getDatabaseId()); + assertEquals( + "1", beginDelegate.lastMessage.getRoutingHint().getSchemaGeneration().toStringUtf8()); + assertFalse(beginDelegate.lastMessage.getRoutingHint().getKey().isEmpty()); + } + + @Test + public void transactionCacheUpdateEnablesCommitRoutingHint() throws Exception { + TestHarness harness = createHarness(); + ByteString transactionId = ByteString.copyFromUtf8("tx-with-cache-update"); + + ClientCall beginCall = + harness.channel.newCall(SpannerGrpc.getBeginTransactionMethod(), CallOptions.DEFAULT); + beginCall.start(new CapturingListener(), new Metadata()); + beginCall.sendMessage(BeginTransactionRequest.newBuilder().setSession(SESSION).build()); + + @SuppressWarnings("unchecked") + RecordingClientCall beginDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + beginDelegate.emitOnMessage( + Transaction.newBuilder() + .setId(transactionId) + .setCacheUpdate(createMutationRoutingCacheUpdate()) + .build()); + beginDelegate.emitOnClose(Status.OK, new Metadata()); + + ClientCall commitCall = + harness.channel.newCall(SpannerGrpc.getCommitMethod(), CallOptions.DEFAULT); + commitCall.start(new CapturingListener(), new Metadata()); + commitCall.sendMessage( + CommitRequest.newBuilder() + .setSession(SESSION) + .setTransactionId(transactionId) + .addMutations(createInsertMutation("b")) + .build()); + + @SuppressWarnings("unchecked") + RecordingClientCall commitDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + assertNotNull(commitDelegate.lastMessage); + assertEquals(7L, commitDelegate.lastMessage.getRoutingHint().getDatabaseId()); + assertEquals( + "1", commitDelegate.lastMessage.getRoutingHint().getSchemaGeneration().toStringUtf8()); + assertFalse(commitDelegate.lastMessage.getRoutingHint().getKey().isEmpty()); + } + + @Test + public void singleUseCommitWithMutationsRoutesUsingRoutingHint() throws Exception { + TestHarness harness = createHarness(); + seedCache(harness, createMutationRecipeCacheUpdate()); + + ClientCall firstCommitCall = + harness.channel.newCall(SpannerGrpc.getCommitMethod(), CallOptions.DEFAULT); + firstCommitCall.start(new CapturingListener(), new Metadata()); + firstCommitCall.sendMessage( + CommitRequest.newBuilder() + .setSession(SESSION) + .setSingleUseTransaction( + TransactionOptions.newBuilder() + .setReadWrite(TransactionOptions.ReadWrite.getDefaultInstance())) + .addMutations(createInsertMutation("b")) + .build()); + + @SuppressWarnings("unchecked") + RecordingClientCall firstCommitDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + assertNotNull(firstCommitDelegate.lastMessage); + RoutingHint routingHint = firstCommitDelegate.lastMessage.getRoutingHint(); + assertFalse(routingHint.getKey().isEmpty()); + + seedCache(harness, createRangeCacheUpdateForHint(routingHint)); + + ClientCall secondCommitCall = + harness.channel.newCall(SpannerGrpc.getCommitMethod(), CallOptions.DEFAULT); + secondCommitCall.start(new CapturingListener(), new Metadata()); + secondCommitCall.sendMessage( + CommitRequest.newBuilder() + .setSession(SESSION) + .setSingleUseTransaction( + TransactionOptions.newBuilder() + .setReadWrite(TransactionOptions.ReadWrite.getDefaultInstance())) + .addMutations(createInsertMutation("b")) + .build()); + + assertThat(harness.endpointCache.callCountForAddress(DEFAULT_ADDRESS)).isEqualTo(3); + assertThat(harness.endpointCache.callCountForAddress("server-a:1234")).isEqualTo(1); + + @SuppressWarnings("unchecked") + RecordingClientCall commitDelegate = + (RecordingClientCall) + harness.endpointCache.latestCallForAddress("server-a:1234"); + + assertNotNull(commitDelegate.lastMessage); + assertEquals(7L, commitDelegate.lastMessage.getRoutingHint().getDatabaseId()); + assertEquals( + "1", commitDelegate.lastMessage.getRoutingHint().getSchemaGeneration().toStringUtf8()); + assertFalse(commitDelegate.lastMessage.getRoutingHint().getKey().isEmpty()); + } + + @Test + public void singleUseCommitUsesSameMutationSelectionHeuristicAsBeginTransaction() + throws Exception { + TestHarness harness = createHarness(); + seedCache(harness, createMutationRecipeCacheUpdate()); + + Mutation deleteMutation = createDeleteMutation("b"); + + ClientCall beginCall = + harness.channel.newCall(SpannerGrpc.getBeginTransactionMethod(), CallOptions.DEFAULT); + beginCall.start(new CapturingListener(), new Metadata()); + beginCall.sendMessage( + BeginTransactionRequest.newBuilder() + .setSession(SESSION) + .setMutationKey(deleteMutation) + .build()); + + @SuppressWarnings("unchecked") + RecordingClientCall beginDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + assertNotNull(beginDelegate.lastMessage); + RoutingHint expectedRoutingHint = beginDelegate.lastMessage.getRoutingHint(); + + ClientCall commitCall = + harness.channel.newCall(SpannerGrpc.getCommitMethod(), CallOptions.DEFAULT); + commitCall.start(new CapturingListener(), new Metadata()); + commitCall.sendMessage( + CommitRequest.newBuilder() + .setSession(SESSION) + .setSingleUseTransaction( + TransactionOptions.newBuilder() + .setReadWrite(TransactionOptions.ReadWrite.getDefaultInstance())) + .addMutations(createInsertMutation("a")) + .addMutations(deleteMutation) + .build()); + + @SuppressWarnings("unchecked") + RecordingClientCall commitDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + assertNotNull(commitDelegate.lastMessage); + assertEquals(expectedRoutingHint, commitDelegate.lastMessage.getRoutingHint()); + } + + @Test + public void commitWithTransactionIdRoutesUsingRoutingHintWhenAffinityMissing() throws Exception { + TestHarness harness = createHarness(); + ByteString transactionId = ByteString.copyFromUtf8("tx-without-affinity"); + seedCache(harness, createMutationRecipeCacheUpdate()); + + ClientCall firstCommitCall = + harness.channel.newCall(SpannerGrpc.getCommitMethod(), CallOptions.DEFAULT); + firstCommitCall.start(new CapturingListener(), new Metadata()); + firstCommitCall.sendMessage( + CommitRequest.newBuilder() + .setSession(SESSION) + .setTransactionId(transactionId) + .addMutations(createInsertMutation("b")) + .build()); + + @SuppressWarnings("unchecked") + RecordingClientCall firstCommitDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + assertNotNull(firstCommitDelegate.lastMessage); + RoutingHint routingHint = firstCommitDelegate.lastMessage.getRoutingHint(); + assertFalse(routingHint.getKey().isEmpty()); + + seedCache(harness, createRangeCacheUpdateForHint(routingHint)); + + ClientCall secondCommitCall = + harness.channel.newCall(SpannerGrpc.getCommitMethod(), CallOptions.DEFAULT); + secondCommitCall.start(new CapturingListener(), new Metadata()); + secondCommitCall.sendMessage( + CommitRequest.newBuilder() + .setSession(SESSION) + .setTransactionId(transactionId) + .addMutations(createInsertMutation("b")) + .build()); + + assertThat(harness.endpointCache.callCountForAddress(DEFAULT_ADDRESS)).isEqualTo(3); + assertThat(harness.endpointCache.callCountForAddress("server-a:1234")).isEqualTo(1); + + @SuppressWarnings("unchecked") + RecordingClientCall commitDelegate = + (RecordingClientCall) + harness.endpointCache.latestCallForAddress("server-a:1234"); + + assertNotNull(commitDelegate.lastMessage); + assertEquals(7L, commitDelegate.lastMessage.getRoutingHint().getDatabaseId()); + assertEquals( + "1", commitDelegate.lastMessage.getRoutingHint().getSchemaGeneration().toStringUtf8()); + assertFalse(commitDelegate.lastMessage.getRoutingHint().getKey().isEmpty()); + } + + @Test + public void commitResponseCacheUpdateEnablesSubsequentBeginRoutingHint() throws Exception { + TestHarness harness = createHarness(); + ByteString transactionId = ByteString.copyFromUtf8("tx-before-commit-cache-update"); + + ClientCall beginCall = + harness.channel.newCall(SpannerGrpc.getBeginTransactionMethod(), CallOptions.DEFAULT); + beginCall.start(new CapturingListener(), new Metadata()); + beginCall.sendMessage(BeginTransactionRequest.newBuilder().setSession(SESSION).build()); + + @SuppressWarnings("unchecked") + RecordingClientCall beginDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + beginDelegate.emitOnMessage(Transaction.newBuilder().setId(transactionId).build()); + beginDelegate.emitOnClose(Status.OK, new Metadata()); + + ClientCall commitCall = + harness.channel.newCall(SpannerGrpc.getCommitMethod(), CallOptions.DEFAULT); + commitCall.start(new CapturingListener(), new Metadata()); + commitCall.sendMessage( + CommitRequest.newBuilder().setSession(SESSION).setTransactionId(transactionId).build()); + + @SuppressWarnings("unchecked") + RecordingClientCall commitDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + commitDelegate.emitOnMessage( + CommitResponse.newBuilder().setCacheUpdate(createMutationRoutingCacheUpdate()).build()); + commitDelegate.emitOnClose(Status.OK, new Metadata()); + + Mutation mutation = createInsertMutation("b"); + ClientCall secondBeginCall = + harness.channel.newCall(SpannerGrpc.getBeginTransactionMethod(), CallOptions.DEFAULT); + secondBeginCall.start(new CapturingListener(), new Metadata()); + secondBeginCall.sendMessage( + BeginTransactionRequest.newBuilder().setSession(SESSION).setMutationKey(mutation).build()); + + @SuppressWarnings("unchecked") + RecordingClientCall routedBeginDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + + assertNotNull(routedBeginDelegate.lastMessage); + assertEquals(7L, routedBeginDelegate.lastMessage.getRoutingHint().getDatabaseId()); + assertEquals( + "1", routedBeginDelegate.lastMessage.getRoutingHint().getSchemaGeneration().toStringUtf8()); + assertFalse(routedBeginDelegate.lastMessage.getRoutingHint().getKey().isEmpty()); + } + + @Test + public void readOnlyTransactionRoutesEachReadIndependently() throws Exception { + TestHarness harness = createHarness(); + ByteString transactionId = ByteString.copyFromUtf8("ro-tx-1"); + + // 1. Begin a read-only transaction (stale read). + ClientCall beginCall = + harness.channel.newCall(SpannerGrpc.getBeginTransactionMethod(), CallOptions.DEFAULT); + CapturingListener beginListener = new CapturingListener<>(); + beginCall.start(beginListener, new Metadata()); + beginCall.sendMessage( + BeginTransactionRequest.newBuilder() + .setSession(SESSION) + .setOptions( + TransactionOptions.newBuilder() + .setReadOnly( + TransactionOptions.ReadOnly.newBuilder() + .setReturnReadTimestamp(true) + .build())) + .build()); + + // BeginTransaction goes to default channel. + assertThat(harness.defaultManagedChannel.callCount()).isEqualTo(1); + + @SuppressWarnings("unchecked") + RecordingClientCall beginDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + beginDelegate.emitOnMessage(Transaction.newBuilder().setId(transactionId).build()); + beginDelegate.emitOnClose(Status.OK, new Metadata()); + + // 2. Populate cache with routing data for two different key ranges. + CacheUpdate cacheUpdate = + CacheUpdate.newBuilder() + .setDatabaseId(7L) + .addRange( + Range.newBuilder() + .setStartKey(bytes("a")) + .setLimitKey(bytes("m")) + .setGroupUid(1L) + .setSplitId(1L) + .setGeneration(bytes("1"))) + .addRange( + Range.newBuilder() + .setStartKey(bytes("m")) + .setLimitKey(bytes("z")) + .setGroupUid(2L) + .setSplitId(2L) + .setGeneration(bytes("1"))) + .addGroup( + Group.newBuilder() + .setGroupUid(1L) + .setGeneration(bytes("1")) + .addTablets( + Tablet.newBuilder() + .setTabletUid(1L) + .setServerAddress("server-a:1234") + .setIncarnation(bytes("1")) + .setDistance(0))) + .addGroup( + Group.newBuilder() + .setGroupUid(2L) + .setGeneration(bytes("1")) + .addTablets( + Tablet.newBuilder() + .setTabletUid(2L) + .setServerAddress("server-b:1234") + .setIncarnation(bytes("1")) + .setDistance(0))) + .build(); + + // Seed the cache via a dummy query response with cache update. + ClientCall seedCall = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + seedCall.start(new CapturingListener(), new Metadata()); + seedCall.sendMessage( + ExecuteSqlRequest.newBuilder() + .setSession(SESSION) + .setRoutingHint(RoutingHint.newBuilder().setKey(bytes("a")).build()) + .build()); + @SuppressWarnings("unchecked") + RecordingClientCall seedDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + seedDelegate.emitOnMessage(ResultSet.newBuilder().setCacheUpdate(cacheUpdate).build()); + + // 3. Send a streaming read with key in range [a, m) → should go to server-a. + ClientCall readCallA = + harness.channel.newCall(SpannerGrpc.getStreamingReadMethod(), CallOptions.DEFAULT); + readCallA.start(new CapturingListener(), new Metadata()); + readCallA.sendMessage( + ReadRequest.newBuilder() + .setSession(SESSION) + .setTransaction(TransactionSelector.newBuilder().setId(transactionId)) + .setRoutingHint(RoutingHint.newBuilder().setKey(bytes("b")).build()) + .build()); + + assertThat(harness.endpointCache.callCountForAddress("server-a:1234")).isEqualTo(1); + + // 4. Send an ExecuteStreamingSql with key in range [m, z) → should go to server-b. + ClientCall queryCallB = + harness.channel.newCall(SpannerGrpc.getExecuteStreamingSqlMethod(), CallOptions.DEFAULT); + queryCallB.start(new CapturingListener(), new Metadata()); + queryCallB.sendMessage( + ExecuteSqlRequest.newBuilder() + .setSession(SESSION) + .setTransaction(TransactionSelector.newBuilder().setId(transactionId)) + .setRoutingHint(RoutingHint.newBuilder().setKey(bytes("n")).build()) + .build()); + + assertThat(harness.endpointCache.callCountForAddress("server-b:1234")).isEqualTo(1); + + // Neither read was pinned to the default host (besides the initial begin + seed). + // default had: 1 begin + 1 seed = 2 calls + assertThat(harness.defaultManagedChannel.callCount()).isEqualTo(2); + } + + @Test + public void readOnlyInlinedBeginExecuteSqlRoutesSubsequentRequestsIndependently() + throws Exception { + TestHarness harness = createHarness(); + ByteString transactionId = ByteString.copyFromUtf8("ro-inline-sql"); + + seedCache(harness, createTwoRangeCacheUpdate()); + + // First query begins a read-only transaction inline and routes to server-a. + ClientCall firstCall = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + firstCall.start(new CapturingListener(), new Metadata()); + firstCall.sendMessage( + ExecuteSqlRequest.newBuilder() + .setSession(SESSION) + .setTransaction( + TransactionSelector.newBuilder() + .setBegin( + TransactionOptions.newBuilder() + .setReadOnly( + TransactionOptions.ReadOnly.newBuilder() + .setReturnReadTimestamp(true) + .build()) + .build())) + .setRoutingHint(RoutingHint.newBuilder().setKey(bytes("b")).build()) + .build()); + + assertThat(harness.endpointCache.callCountForAddress("server-a:1234")).isEqualTo(1); + + @SuppressWarnings("unchecked") + RecordingClientCall firstDelegate = + (RecordingClientCall) + harness.endpointCache.latestCallForAddress("server-a:1234"); + firstDelegate.emitOnMessage( + ResultSet.newBuilder() + .setMetadata( + ResultSetMetadata.newBuilder() + .setTransaction(Transaction.newBuilder().setId(transactionId))) + .build()); + + // Second query in same txn should route by key to server-b, not affinity-pin to server-a. + ClientCall secondCall = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + secondCall.start(new CapturingListener(), new Metadata()); + secondCall.sendMessage( + ExecuteSqlRequest.newBuilder() + .setSession(SESSION) + .setTransaction(TransactionSelector.newBuilder().setId(transactionId)) + .setRoutingHint(RoutingHint.newBuilder().setKey(bytes("n")).build()) + .build()); + + assertThat(harness.endpointCache.callCountForAddress("server-a:1234")).isEqualTo(1); + assertThat(harness.endpointCache.callCountForAddress("server-b:1234")).isEqualTo(1); + assertThat(harness.defaultManagedChannel.callCount()).isEqualTo(1); + } + + @Test + public void readOnlyInlinedBeginReadRoutesSubsequentRequestsIndependently() throws Exception { + TestHarness harness = createHarness(); + ByteString transactionId = ByteString.copyFromUtf8("ro-inline-read"); + + seedCache(harness, createTwoRangeCacheUpdate()); + + // First read begins a read-only transaction inline and routes to server-a. + ClientCall firstCall = + harness.channel.newCall(SpannerGrpc.getStreamingReadMethod(), CallOptions.DEFAULT); + firstCall.start(new CapturingListener(), new Metadata()); + firstCall.sendMessage( + ReadRequest.newBuilder() + .setSession(SESSION) + .setTransaction( + TransactionSelector.newBuilder() + .setBegin( + TransactionOptions.newBuilder() + .setReadOnly( + TransactionOptions.ReadOnly.newBuilder() + .setReturnReadTimestamp(true) + .build()) + .build())) + .setRoutingHint(RoutingHint.newBuilder().setKey(bytes("b")).build()) + .build()); + + assertThat(harness.endpointCache.callCountForAddress("server-a:1234")).isEqualTo(1); + + @SuppressWarnings("unchecked") + RecordingClientCall firstDelegate = + (RecordingClientCall) + harness.endpointCache.latestCallForAddress("server-a:1234"); + firstDelegate.emitOnMessage( + PartialResultSet.newBuilder() + .setMetadata( + ResultSetMetadata.newBuilder() + .setTransaction(Transaction.newBuilder().setId(transactionId))) + .build()); + + // Second read in same txn should route by key to server-b, not affinity-pin to server-a. + ClientCall secondCall = + harness.channel.newCall(SpannerGrpc.getStreamingReadMethod(), CallOptions.DEFAULT); + secondCall.start(new CapturingListener(), new Metadata()); + secondCall.sendMessage( + ReadRequest.newBuilder() + .setSession(SESSION) + .setTransaction(TransactionSelector.newBuilder().setId(transactionId)) + .setRoutingHint(RoutingHint.newBuilder().setKey(bytes("n")).build()) + .build()); + + assertThat(harness.endpointCache.callCountForAddress("server-a:1234")).isEqualTo(1); + assertThat(harness.endpointCache.callCountForAddress("server-b:1234")).isEqualTo(1); + assertThat(harness.defaultManagedChannel.callCount()).isEqualTo(1); + } + + @Test + public void readOnlyTransactionDoesNotRecordAffinity() throws Exception { + TestHarness harness = createHarness(); + ByteString transactionId = ByteString.copyFromUtf8("ro-tx-2"); + + // Begin a read-only transaction. + ClientCall beginCall = + harness.channel.newCall(SpannerGrpc.getBeginTransactionMethod(), CallOptions.DEFAULT); + beginCall.start(new CapturingListener(), new Metadata()); + beginCall.sendMessage( + BeginTransactionRequest.newBuilder() + .setSession(SESSION) + .setOptions( + TransactionOptions.newBuilder() + .setReadOnly( + TransactionOptions.ReadOnly.newBuilder() + .setReturnReadTimestamp(true) + .build())) + .build()); + + @SuppressWarnings("unchecked") + RecordingClientCall beginDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + beginDelegate.emitOnMessage(Transaction.newBuilder().setId(transactionId).build()); + beginDelegate.emitOnClose(Status.OK, new Metadata()); + + // No affinity should be recorded for the default endpoint. + // Verify by checking that the endpoint cache was never queried for affinity lookup. + // The default endpoint getCount tracks affinity lookups. + assertThat(harness.endpointCache.getCount(DEFAULT_ADDRESS)).isEqualTo(0); + + // Send a read using the transaction ID (no cache populated, so falls back to default). + ClientCall readCall = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + readCall.start(new CapturingListener(), new Metadata()); + readCall.sendMessage( + ExecuteSqlRequest.newBuilder() + .setSession(SESSION) + .setTransaction(TransactionSelector.newBuilder().setId(transactionId)) + .build()); + + // The read goes to default (no cache data), but NOT because of affinity. + // No affinity lookup should have been performed for the read-only txn. + assertThat(harness.endpointCache.getCount(DEFAULT_ADDRESS)).isEqualTo(0); + + // Now receive a response with the transaction ID — should NOT record affinity. + @SuppressWarnings("unchecked") + RecordingClientCall readDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + readDelegate.emitOnMessage( + ResultSet.newBuilder() + .setMetadata( + ResultSetMetadata.newBuilder() + .setTransaction(Transaction.newBuilder().setId(transactionId))) + .build()); + + // Still no affinity recorded. + assertThat(harness.endpointCache.getCount(DEFAULT_ADDRESS)).isEqualTo(0); + } + + @Test + public void readOnlyTransactionCleanupOnClose() throws Exception { + TestHarness harness = createHarness(); + ByteString transactionId = ByteString.copyFromUtf8("ro-tx-3"); + + // Begin a read-only transaction. + ClientCall beginCall = + harness.channel.newCall(SpannerGrpc.getBeginTransactionMethod(), CallOptions.DEFAULT); + beginCall.start(new CapturingListener(), new Metadata()); + beginCall.sendMessage( + BeginTransactionRequest.newBuilder() + .setSession(SESSION) + .setOptions( + TransactionOptions.newBuilder() + .setReadOnly( + TransactionOptions.ReadOnly.newBuilder() + .setReturnReadTimestamp(true) + .build())) + .build()); + + @SuppressWarnings("unchecked") + RecordingClientCall beginDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + beginDelegate.emitOnMessage(Transaction.newBuilder().setId(transactionId).build()); + beginDelegate.emitOnClose(Status.OK, new Metadata()); + + // Clear transaction affinity (simulates MultiUseReadOnlyTransaction.close()). + harness.channel.clearTransactionAffinity(transactionId); + } + + private static CacheUpdate createTwoRangeCacheUpdate() { + return CacheUpdate.newBuilder() + .setDatabaseId(7L) + .addRange( + Range.newBuilder() + .setStartKey(bytes("a")) + .setLimitKey(bytes("m")) + .setGroupUid(1L) + .setSplitId(1L) + .setGeneration(bytes("1"))) + .addRange( + Range.newBuilder() + .setStartKey(bytes("m")) + .setLimitKey(bytes("z")) + .setGroupUid(2L) + .setSplitId(2L) + .setGeneration(bytes("1"))) + .addGroup( + Group.newBuilder() + .setGroupUid(1L) + .setGeneration(bytes("1")) + .addTablets( + Tablet.newBuilder() + .setTabletUid(1L) + .setServerAddress("server-a:1234") + .setIncarnation(bytes("1")) + .setDistance(0))) + .addGroup( + Group.newBuilder() + .setGroupUid(2L) + .setGeneration(bytes("1")) + .addTablets( + Tablet.newBuilder() + .setTabletUid(2L) + .setServerAddress("server-b:1234") + .setIncarnation(bytes("1")) + .setDistance(0))) + .build(); + } + + private static CacheUpdate createMutationRoutingCacheUpdate() throws TextFormat.ParseException { + return createMutationRecipeCacheUpdate().toBuilder() + .mergeFrom( + createRangeCacheUpdateForHint(RoutingHint.newBuilder().setKey(bytes("a")).build())) + .build(); + } + + private static CacheUpdate createMutationRecipeCacheUpdate() throws TextFormat.ParseException { + RecipeList keyRecipes = + parseRecipeList( + "schema_generation: \"1\"\n" + + "recipe {\n" + + " table_name: \"T\"\n" + + " part { tag: 1 }\n" + + " part {\n" + + " order: ASCENDING\n" + + " null_order: NULLS_FIRST\n" + + " type { code: STRING }\n" + + " identifier: \"k\"\n" + + " }\n" + + "}\n"); + return CacheUpdate.newBuilder().setDatabaseId(7L).setKeyRecipes(keyRecipes).build(); + } + + private static CacheUpdate createRangeCacheUpdateForHint(RoutingHint hint) { + ByteString key = hint.getKey(); + ByteString limitKey = + hint.getLimitKey().isEmpty() + ? key.concat(ByteString.copyFrom(new byte[] {0})) + : hint.getLimitKey(); + return CacheUpdate.newBuilder() + .setDatabaseId(7L) + .addRange( + Range.newBuilder() + .setStartKey(key) + .setLimitKey(limitKey) + .setGroupUid(1L) + .setSplitId(1L) + .setGeneration(bytes("1"))) + .addGroup( + Group.newBuilder() + .setGroupUid(1L) + .setGeneration(bytes("1")) + .addTablets( + Tablet.newBuilder() + .setTabletUid(1L) + .setServerAddress("server-a:1234") + .setIncarnation(bytes("1")) + .setDistance(0))) + .build(); + } + + private static void seedCache(TestHarness harness, CacheUpdate cacheUpdate) { + ClientCall seedCall = + harness.channel.newCall(SpannerGrpc.getExecuteSqlMethod(), CallOptions.DEFAULT); + seedCall.start(new CapturingListener(), new Metadata()); + seedCall.sendMessage( + ExecuteSqlRequest.newBuilder() + .setSession(SESSION) + .setRoutingHint(RoutingHint.newBuilder().setKey(bytes("a")).build()) + .build()); + + @SuppressWarnings("unchecked") + RecordingClientCall seedDelegate = + (RecordingClientCall) + harness.defaultManagedChannel.latestCall(); + seedDelegate.emitOnMessage(ResultSet.newBuilder().setCacheUpdate(cacheUpdate).build()); + } + + private static Mutation createInsertMutation(String keyValue) { + return Mutation.newBuilder() + .setInsert( + Mutation.Write.newBuilder() + .setTable("T") + .addColumns("k") + .addValues( + ListValue.newBuilder() + .addValues(Value.newBuilder().setStringValue(keyValue).build()) + .build())) + .build(); + } + + private static Mutation createDeleteMutation(String keyValue) { + return Mutation.newBuilder() + .setDelete( + Mutation.Delete.newBuilder() + .setTable("T") + .setKeySet( + com.google.spanner.v1.KeySet.newBuilder() + .addKeys( + ListValue.newBuilder() + .addValues(Value.newBuilder().setStringValue(keyValue).build()) + .build()) + .build())) + .build(); + } + + private static RecipeList parseRecipeList(String text) throws TextFormat.ParseException { + RecipeList.Builder builder = RecipeList.newBuilder(); + TextFormat.merge(text, builder); + return builder.build(); + } + + private static TestHarness createHarness() throws IOException { + FakeEndpointCache endpointCache = new FakeEndpointCache(DEFAULT_ADDRESS); + InstantiatingGrpcChannelProvider provider = + InstantiatingGrpcChannelProvider.newBuilder().setEndpoint("localhost:9999").build(); + KeyAwareChannel channel = KeyAwareChannel.create(provider, baseProvider -> endpointCache); + return new TestHarness(channel, endpointCache, endpointCache.defaultManagedChannel()); + } + + private static final class TestHarness { + private final KeyAwareChannel channel; + private final FakeEndpointCache endpointCache; + private final FakeManagedChannel defaultManagedChannel; + + private TestHarness( + KeyAwareChannel channel, + FakeEndpointCache endpointCache, + FakeManagedChannel defaultManagedChannel) { + this.channel = channel; + this.endpointCache = endpointCache; + this.defaultManagedChannel = defaultManagedChannel; + } + } + + private static final class CapturingListener extends ClientCall.Listener { + private int closeCount; + @Nullable private Status closedStatus; + @Nullable private Metadata closedTrailers; + + @Override + public void onClose(Status status, Metadata trailers) { + this.closeCount++; + this.closedStatus = status; + this.closedTrailers = trailers; + } + } + + private static final class FakeEndpointCache implements ChannelEndpointCache { + private final String defaultAddress; + private final FakeEndpoint defaultEndpoint; + private final Map endpoints = new HashMap<>(); + private final Map getCount = new HashMap<>(); + + private FakeEndpointCache(String defaultAddress) { + this.defaultAddress = defaultAddress; + this.defaultEndpoint = new FakeEndpoint(defaultAddress); + } + + @Override + public ChannelEndpoint defaultChannel() { + return defaultEndpoint; + } + + @Override + public ChannelEndpoint get(String address) { + getCount.put(address, getCount.getOrDefault(address, 0) + 1); + if (defaultAddress.equals(address)) { + return defaultEndpoint; + } + return endpoints.computeIfAbsent(address, FakeEndpoint::new); + } + + @Override + public void evict(String address) { + endpoints.remove(address); + } + + @Override + public void shutdown() { + defaultEndpoint.channel.shutdown(); + for (FakeEndpoint endpoint : endpoints.values()) { + endpoint.channel.shutdown(); + } + endpoints.clear(); + } + + int getCount(String address) { + return getCount.getOrDefault(address, 0); + } + + FakeManagedChannel defaultManagedChannel() { + return defaultEndpoint.channel; + } + + int callCountForAddress(String address) { + if (defaultAddress.equals(address)) { + return defaultEndpoint.channel.callCount(); + } + FakeEndpoint endpoint = endpoints.get(address); + return endpoint == null ? 0 : endpoint.channel.callCount(); + } + + RecordingClientCall latestCallForAddress(String address) { + if (defaultAddress.equals(address)) { + return defaultEndpoint.channel.latestCall(); + } + FakeEndpoint endpoint = endpoints.get(address); + if (endpoint == null) { + throw new IllegalStateException("No endpoint for address: " + address); + } + return endpoint.channel.latestCall(); + } + } + + private static final class FakeEndpoint implements ChannelEndpoint { + private final String address; + private final FakeManagedChannel channel; + + private FakeEndpoint(String address) { + this.address = address; + this.channel = new FakeManagedChannel(address); + } + + @Override + public String getAddress() { + return address; + } + + @Override + public boolean isHealthy() { + return true; + } + + @Override + public ManagedChannel getChannel() { + return channel; + } + } + + private static final class FakeManagedChannel extends ManagedChannel { + private final String authority; + private final List> calls = new ArrayList<>(); + private boolean shutdown; + + private FakeManagedChannel(String authority) { + this.authority = authority; + } + + @Override + public ManagedChannel shutdown() { + shutdown = true; + return this; + } + + @Override + public ManagedChannel shutdownNow() { + shutdown = true; + return this; + } + + @Override + public boolean isShutdown() { + return shutdown; + } + + @Override + public boolean isTerminated() { + return shutdown; + } + + @Override + public boolean awaitTermination(long timeout, TimeUnit unit) { + return shutdown; + } + + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + RecordingClientCall call = new RecordingClientCall<>(); + calls.add(call); + return call; + } + + @Override + public String authority() { + return authority; + } + + int callCount() { + return calls.size(); + } + + RecordingClientCall latestCall() { + return calls.get(calls.size() - 1); + } + } + + private static final class RecordingClientCall + extends ClientCall { + @Nullable private ClientCall.Listener listener; + @Nullable private RequestT lastMessage; + private boolean cancelCalled; + @Nullable private String cancelMessage; + @Nullable private Throwable cancelCause; + + @Override + public void start(ClientCall.Listener responseListener, Metadata headers) { + this.listener = responseListener; + } + + @Override + public void request(int numMessages) {} + + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) { + this.cancelCalled = true; + this.cancelMessage = message; + this.cancelCause = cause; + } + + @Override + public void halfClose() {} + + @Override + public void sendMessage(RequestT message) { + this.lastMessage = message; + } + + void emitOnMessage(ResponseT response) { + if (listener != null) { + listener.onMessage(response); + } + } + + void emitOnClose(Status status, Metadata trailers) { + if (listener != null) { + listener.onClose(status, trailers); + } + } + } + + private static ByteString bytes(String value) { + return ByteString.copyFromUtf8(value); + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRangeCacheGoldenTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRangeCacheGoldenTest.java new file mode 100644 index 00000000000..763a36dbfd6 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRangeCacheGoldenTest.java @@ -0,0 +1,204 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + +import com.google.protobuf.TextFormat; +import com.google.spanner.v1.DirectedReadOptions; +import com.google.spanner.v1.RoutingHint; +import io.grpc.CallOptions; +import io.grpc.ClientCall; +import io.grpc.ManagedChannel; +import io.grpc.MethodDescriptor; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import spanner.cloud.location.RangeCacheTestCase; +import spanner.cloud.location.RangeCacheTestCases; + +@RunWith(JUnit4.class) +public class KeyRangeCacheGoldenTest { + + private static final int DEFAULT_MIN_ENTRIES_FOR_RANDOM_PICK = 1000; + + @Test + public void goldenTest() throws Exception { + RangeCacheTestCases.Builder builder = RangeCacheTestCases.newBuilder(); + try (InputStream inputStream = + getClass().getClassLoader().getResourceAsStream("range_cache_test.textproto"); + InputStreamReader reader = + new InputStreamReader(Objects.requireNonNull(inputStream), StandardCharsets.UTF_8)) { + TextFormat.merge(reader, builder); + } + + RangeCacheTestCases testCases = builder.build(); + + for (RangeCacheTestCase testCase : testCases.getTestCaseList()) { + FakeEndpointCache endpointCache = new FakeEndpointCache(); + KeyRangeCache cache = new KeyRangeCache(endpointCache); + cache.useDeterministicRandom(); + + for (RangeCacheTestCase.Step step : testCase.getStepList()) { + if (step.hasUpdate()) { + cache.addRanges(step.getUpdate()); + } + for (RangeCacheTestCase.Step.Test test : step.getTestList()) { + cache.setMinCacheEntriesForRandomPick(DEFAULT_MIN_ENTRIES_FOR_RANDOM_PICK); + int minEntries = test.getMinCacheEntriesForRandomPick(); + if (minEntries != 0) { + cache.setMinCacheEntriesForRandomPick(minEntries); + } + + RoutingHint.Builder hintBuilder = RoutingHint.newBuilder(); + if (!test.getKey().isEmpty()) { + hintBuilder.setKey(test.getKey()); + } + if (!test.getLimitKey().isEmpty()) { + hintBuilder.setLimitKey(test.getLimitKey()); + } + + DirectedReadOptions directedReadOptions = + test.hasDirectedReadOptions() + ? test.getDirectedReadOptions() + : DirectedReadOptions.getDefaultInstance(); + + KeyRangeCache.RangeMode rangeMode = + test.getRangeMode() == RangeCacheTestCase.Step.Test.RangeMode.PICK_RANDOM + ? KeyRangeCache.RangeMode.PICK_RANDOM + : KeyRangeCache.RangeMode.COVERING_SPLIT; + + ChannelEndpoint server = + cache.fillRoutingHint(test.getLeader(), rangeMode, directedReadOptions, hintBuilder); + + assertEquals( + "RoutingHint mismatch for test case: " + testCase.getName(), + test.getResult(), + hintBuilder.build()); + if (!test.getServer().isEmpty()) { + assertNotNull("Expected server for test case: " + testCase.getName(), server); + assertEquals(test.getServer(), server.getAddress()); + } else { + assertNull("Expected no server for test case: " + testCase.getName(), server); + } + } + } + + cache.clear(); + } + } + + private static final class FakeEndpointCache implements ChannelEndpointCache { + private final Map endpoints = new HashMap<>(); + private final FakeEndpoint defaultEndpoint = new FakeEndpoint("default"); + + @Override + public ChannelEndpoint defaultChannel() { + return defaultEndpoint; + } + + @Override + public ChannelEndpoint get(String address) { + return endpoints.computeIfAbsent(address, FakeEndpoint::new); + } + + @Override + public void evict(String address) { + endpoints.remove(address); + } + + @Override + public void shutdown() { + endpoints.clear(); + } + } + + private static final class FakeEndpoint implements ChannelEndpoint { + private final String address; + private final ManagedChannel channel = new FakeManagedChannel(); + + FakeEndpoint(String address) { + this.address = address; + } + + @Override + public String getAddress() { + return address; + } + + @Override + public boolean isHealthy() { + return true; + } + + @Override + public ManagedChannel getChannel() { + return channel; + } + } + + private static final class FakeManagedChannel extends ManagedChannel { + private boolean shutdown = false; + + @Override + public ManagedChannel shutdown() { + shutdown = true; + return this; + } + + @Override + public boolean isShutdown() { + return shutdown; + } + + @Override + public boolean isTerminated() { + return shutdown; + } + + @Override + public ManagedChannel shutdownNow() { + shutdown = true; + return this; + } + + @Override + public boolean awaitTermination(long timeout, TimeUnit unit) { + return shutdown; + } + + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + throw new UnsupportedOperationException(); + } + + @Override + public String authority() { + return "fake"; + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRangeCacheTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRangeCacheTest.java new file mode 100644 index 00000000000..2405aa7a062 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRangeCacheTest.java @@ -0,0 +1,271 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import com.google.protobuf.ByteString; +import com.google.spanner.v1.CacheUpdate; +import com.google.spanner.v1.DirectedReadOptions; +import com.google.spanner.v1.Group; +import com.google.spanner.v1.Range; +import com.google.spanner.v1.RoutingHint; +import com.google.spanner.v1.Tablet; +import io.grpc.CallOptions; +import io.grpc.ClientCall; +import io.grpc.ManagedChannel; +import io.grpc.MethodDescriptor; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class KeyRangeCacheTest { + + @Test + public void skipsUnhealthyTabletAfterItIsCached() { + FakeEndpointCache endpointCache = new FakeEndpointCache(); + KeyRangeCache cache = new KeyRangeCache(endpointCache); + + cache.addRanges( + CacheUpdate.newBuilder() + .addRange( + Range.newBuilder() + .setStartKey(bytes("a")) + .setLimitKey(bytes("z")) + .setGroupUid(5) + .setSplitId(1) + .setGeneration(bytes("1"))) + .addGroup( + Group.newBuilder() + .setGroupUid(5) + .setGeneration(bytes("1")) + .setLeaderIndex(0) + .addTablets( + Tablet.newBuilder() + .setTabletUid(1) + .setServerAddress("server1") + .setIncarnation(bytes("1")) + .setDistance(0)) + .addTablets( + Tablet.newBuilder() + .setTabletUid(2) + .setServerAddress("server2") + .setIncarnation(bytes("1")) + .setDistance(0))) + .build()); + + RoutingHint.Builder initialHint = RoutingHint.newBuilder().setKey(bytes("a")); + ChannelEndpoint initialServer = + cache.fillRoutingHint( + /* preferLeader= */ false, + KeyRangeCache.RangeMode.COVERING_SPLIT, + DirectedReadOptions.getDefaultInstance(), + initialHint); + assertNotNull(initialServer); + + endpointCache.setHealthy("server1", false); + + RoutingHint.Builder hint = RoutingHint.newBuilder().setKey(bytes("a")); + ChannelEndpoint server = + cache.fillRoutingHint( + /* preferLeader= */ false, + KeyRangeCache.RangeMode.COVERING_SPLIT, + DirectedReadOptions.getDefaultInstance(), + hint); + + assertNotNull(server); + assertEquals("server2", server.getAddress()); + assertEquals(1, hint.getSkippedTabletUidCount()); + assertEquals(1L, hint.getSkippedTabletUid(0).getTabletUid()); + } + + @Test + public void shrinkToEvictsRanges() { + FakeEndpointCache endpointCache = new FakeEndpointCache(); + KeyRangeCache cache = new KeyRangeCache(endpointCache); + + final int numRanges = 100; + for (int i = 0; i < numRanges; i++) { + CacheUpdate update = + CacheUpdate.newBuilder() + .addRange( + Range.newBuilder() + .setStartKey(bytes(String.format("%04d", i))) + .setLimitKey(bytes(String.format("%04d", i + 1))) + .setGroupUid(i) + .setSplitId(i) + .setGeneration(bytes("1"))) + .addGroup( + Group.newBuilder() + .setGroupUid(i) + .setGeneration(bytes("1")) + .addTablets( + Tablet.newBuilder() + .setTabletUid(i) + .setServerAddress("server" + i) + .setIncarnation(bytes("1")))) + .build(); + cache.addRanges(update); + } + + checkContents(cache, numRanges, numRanges); + + int shrinkTo = numRanges - numRanges / 4; + cache.shrinkTo(shrinkTo); + checkContents(cache, shrinkTo, 3 * numRanges / 4); + + cache.shrinkTo(numRanges / 8); + checkContents(cache, numRanges / 8, 7 * numRanges / 8); + + cache.shrinkTo(0); + checkContents(cache, 0, numRanges); + } + + private static void checkContents(KeyRangeCache cache, int expectedSize, int mustBeInCache) { + assertEquals(expectedSize, cache.size()); + int hitCount = 0; + for (int i = 0; i < 100; i++) { + RoutingHint.Builder hint = RoutingHint.newBuilder().setKey(bytes(String.format("%04d", i))); + ChannelEndpoint server = + cache.fillRoutingHint( + /* preferLeader= */ false, + KeyRangeCache.RangeMode.COVERING_SPLIT, + DirectedReadOptions.getDefaultInstance(), + hint); + if (i > mustBeInCache) { + assertNotNull(server); + } + if (server != null) { + hitCount++; + assertEquals("server" + i, server.getAddress()); + } + } + assertEquals(expectedSize, hitCount); + } + + private static ByteString bytes(String value) { + return ByteString.copyFromUtf8(value); + } + + private static final class FakeEndpointCache implements ChannelEndpointCache { + private final Map endpoints = new HashMap<>(); + private final FakeEndpoint defaultEndpoint = new FakeEndpoint("default"); + + @Override + public ChannelEndpoint defaultChannel() { + return defaultEndpoint; + } + + @Override + public ChannelEndpoint get(String address) { + return endpoints.computeIfAbsent(address, FakeEndpoint::new); + } + + @Override + public void evict(String address) { + endpoints.remove(address); + } + + @Override + public void shutdown() { + endpoints.clear(); + } + + void setHealthy(String address, boolean healthy) { + FakeEndpoint endpoint = endpoints.get(address); + if (endpoint != null) { + endpoint.setHealthy(healthy); + } + } + } + + private static final class FakeEndpoint implements ChannelEndpoint { + private final String address; + private final ManagedChannel channel = new FakeManagedChannel(); + private boolean healthy = true; + + FakeEndpoint(String address) { + this.address = address; + } + + @Override + public String getAddress() { + return address; + } + + @Override + public boolean isHealthy() { + return healthy; + } + + @Override + public ManagedChannel getChannel() { + return channel; + } + + void setHealthy(boolean healthy) { + this.healthy = healthy; + } + } + + private static final class FakeManagedChannel extends ManagedChannel { + private boolean shutdown = false; + + @Override + public ManagedChannel shutdown() { + shutdown = true; + return this; + } + + @Override + public boolean isShutdown() { + return shutdown; + } + + @Override + public boolean isTerminated() { + return shutdown; + } + + @Override + public ManagedChannel shutdownNow() { + shutdown = true; + return this; + } + + @Override + public boolean awaitTermination(long timeout, TimeUnit unit) { + return shutdown; + } + + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + throw new UnsupportedOperationException(); + } + + @Override + public String authority() { + return "fake"; + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRecipeCacheTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRecipeCacheTest.java new file mode 100644 index 00000000000..bcf89e529aa --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRecipeCacheTest.java @@ -0,0 +1,201 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.TextFormat; +import com.google.spanner.v1.ExecuteSqlRequest; +import com.google.spanner.v1.ReadRequest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class KeyRecipeCacheTest { + + @Test + public void fingerprintReadUsesShape() throws Exception { + ReadRequest req = + parseRead( + "table: \"T\"\n" + + "columns: \"c1\"\n" + + "columns: \"c2\"\n" + + "key_set { keys { values { string_value: \"foo\" } } }\n"); + + long fp = KeyRecipeCache.fingerprint(req); + assertNotEquals(0, fp); + assertEquals(fp, KeyRecipeCache.fingerprint(req)); + + ReadRequest diffTable = ReadRequest.newBuilder(req).setTable("U").build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(diffTable)); + + ReadRequest diffIndex = ReadRequest.newBuilder(req).setIndex("I").build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(diffIndex)); + + ReadRequest diffColumn = ReadRequest.newBuilder(req).setColumns(0, "c3").build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(diffColumn)); + + ReadRequest extraColumn = ReadRequest.newBuilder(req).addColumns("c4").build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(extraColumn)); + + ReadRequest removeColumn = ReadRequest.newBuilder(req).clearColumns().addColumns("c1").build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(removeColumn)); + + ReadRequest sameShape = + ReadRequest.newBuilder(req) + .clearKeySet() + .setKeySet(req.getKeySet().toBuilder().build()) + .build(); + assertEquals(fp, KeyRecipeCache.fingerprint(sameShape)); + + ReadRequest.Builder diffKeyValueBuilder = ReadRequest.newBuilder(req); + diffKeyValueBuilder + .getKeySetBuilder() + .getKeysBuilder(0) + .getValuesBuilder(0) + .setStringValue("bar"); + ReadRequest diffKeyValue = diffKeyValueBuilder.build(); + assertEquals(fp, KeyRecipeCache.fingerprint(diffKeyValue)); + } + + @Test + public void fingerprintExecuteSqlUsesParamShape() throws Exception { + ExecuteSqlRequest req = + parseExecuteSql( + "sql: \"SELECT * FROM T WHERE p1 = @p1 AND p2 = @p2\"\n" + + "params {\n" + + " fields { key: \"p1\" value { string_value: \"foo\" } }\n" + + " fields { key: \"p2\" value { string_value: \"99\" } }\n" + + "}\n" + + "param_types { key: \"p2\" value { code: INT64 } }\n" + + "query_options {\n" + + " optimizer_version: \"1\"\n" + + " optimizer_statistics_package: \"stats\"\n" + + "}\n"); + + long fp = KeyRecipeCache.fingerprint(req); + assertNotEquals(0, fp); + assertEquals(fp, KeyRecipeCache.fingerprint(req)); + + ExecuteSqlRequest diffSql = ExecuteSqlRequest.newBuilder(req).setSql("SELECT * FROM U").build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(diffSql)); + + ExecuteSqlRequest.Builder removeParamBuilder = ExecuteSqlRequest.newBuilder(req); + removeParamBuilder.getParamsBuilder().removeFields("p1"); + ExecuteSqlRequest removeParam = removeParamBuilder.build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(removeParam)); + + ExecuteSqlRequest.Builder addParamBuilder = ExecuteSqlRequest.newBuilder(req); + addParamBuilder.getParamsBuilder().putFields("p3", parseValue("string_value: \"foo\"")); + ExecuteSqlRequest addParam = addParamBuilder.build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(addParam)); + + ExecuteSqlRequest changeType = + ExecuteSqlRequest.newBuilder(req).putParamTypes("p1", parseType("code: BYTES")).build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(changeType)); + + ExecuteSqlRequest.Builder changeParamValueBuilder = ExecuteSqlRequest.newBuilder(req); + changeParamValueBuilder.getParamsBuilder().putFields("p1", parseValue("string_value: \"bar\"")); + ExecuteSqlRequest changeParamValue = changeParamValueBuilder.build(); + assertEquals(fp, KeyRecipeCache.fingerprint(changeParamValue)); + + ExecuteSqlRequest.Builder changeKindBuilder = ExecuteSqlRequest.newBuilder(req); + changeKindBuilder.getParamsBuilder().putFields("p1", parseValue("bool_value: true")); + ExecuteSqlRequest changeKind = changeKindBuilder.build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(changeKind)); + + ExecuteSqlRequest.Builder changeOptionsBuilder = ExecuteSqlRequest.newBuilder(req); + changeOptionsBuilder.getQueryOptionsBuilder().setOptimizerStatisticsPackage("stats_v2"); + ExecuteSqlRequest changeOptions = changeOptionsBuilder.build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(changeOptions)); + + ExecuteSqlRequest.Builder changeOptimizerBuilder = ExecuteSqlRequest.newBuilder(req); + changeOptimizerBuilder.getQueryOptionsBuilder().setOptimizerVersion("2"); + ExecuteSqlRequest changeOptimizer = changeOptimizerBuilder.build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(changeOptimizer)); + + ExecuteSqlRequest clearOptions = ExecuteSqlRequest.newBuilder(req).clearQueryOptions().build(); + assertNotEquals(fp, KeyRecipeCache.fingerprint(clearOptions)); + } + + @Test + public void computeKeysSetsRoutingHint() throws Exception { + KeyRecipeCache cache = new KeyRecipeCache(); + cache.addRecipes( + parseRecipeList( + "schema_generation: \"1\"\n" + + "recipe {\n" + + " table_name: \"T\"\n" + + " part { tag: 1 }\n" + + " part {\n" + + " order: ASCENDING\n" + + " null_order: NULLS_FIRST\n" + + " type { code: STRING }\n" + + " identifier: \"k\"\n" + + " }\n" + + "}\n")); + + ReadRequest.Builder request = + parseRead( + "table: \"T\"\n" + + "columns: \"c1\"\n" + + "key_set { keys { values { string_value: \"foo\" } } }\n") + .toBuilder(); + + cache.computeKeys(request); + assertTrue(request.getRoutingHint().getOperationUid() > 0); + assertEquals("1", request.getRoutingHint().getSchemaGeneration().toStringUtf8()); + assertTrue(request.getRoutingHint().getKey().size() > 0); + } + + private static ReadRequest parseRead(String text) throws TextFormat.ParseException { + ReadRequest.Builder builder = ReadRequest.newBuilder(); + TextFormat.merge(text, builder); + return builder.build(); + } + + private static ExecuteSqlRequest parseExecuteSql(String text) throws TextFormat.ParseException { + ExecuteSqlRequest.Builder builder = ExecuteSqlRequest.newBuilder(); + TextFormat.merge(text, builder); + return builder.build(); + } + + private static com.google.protobuf.Value parseValue(String text) + throws TextFormat.ParseException { + com.google.protobuf.Value.Builder builder = com.google.protobuf.Value.newBuilder(); + TextFormat.merge(text, builder); + return builder.build(); + } + + private static com.google.spanner.v1.Type parseType(String text) + throws TextFormat.ParseException { + com.google.spanner.v1.Type.Builder builder = com.google.spanner.v1.Type.newBuilder(); + TextFormat.merge(text, builder); + return builder.build(); + } + + private static com.google.spanner.v1.RecipeList parseRecipeList(String text) + throws TextFormat.ParseException { + com.google.spanner.v1.RecipeList.Builder builder = + com.google.spanner.v1.RecipeList.newBuilder(); + TextFormat.merge(text, builder); + return builder.build(); + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRecipeTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRecipeTest.java new file mode 100644 index 00000000000..3e946f10dc4 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRecipeTest.java @@ -0,0 +1,181 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.ByteString; +import com.google.protobuf.Struct; +import com.google.protobuf.TextFormat; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class KeyRecipeTest { + + @Test + public void queryParamsUsesStructIdentifiers() throws Exception { + com.google.spanner.v1.KeyRecipe recipeProto = + createRecipe( + "part { tag: 1 }\n" + + "part {\n" + + " order: ASCENDING\n" + + " null_order: NULLS_FIRST\n" + + " type { code: STRING }\n" + + " identifier: \"p0\"\n" + + " struct_identifiers: 1\n" + + "}\n"); + + Struct params = + parseStruct( + "fields {\n" + + " key: \"p0\"\n" + + " value {\n" + + " list_value { values { string_value: \"a\" } values { string_value: \"b\" }" + + " }\n" + + " }\n" + + "}\n"); + + KeyRecipe recipe = KeyRecipe.create(recipeProto); + TargetRange target = recipe.queryParamsToTargetRange(params); + assertEquals(expectedKey("b"), target.start); + assertTrue(target.limit.isEmpty()); + } + + @Test + public void queryParamsUsesConstantValue() throws Exception { + com.google.spanner.v1.KeyRecipe recipeProto = + createRecipe( + "part { tag: 1 }\n" + + "part {\n" + + " order: ASCENDING\n" + + " null_order: NULLS_FIRST\n" + + " type { code: STRING }\n" + + " value { string_value: \"const\" }\n" + + "}\n"); + + KeyRecipe recipe = KeyRecipe.create(recipeProto); + TargetRange target = recipe.queryParamsToTargetRange(Struct.getDefaultInstance()); + assertEquals(expectedKey("const"), target.start); + assertTrue(target.limit.isEmpty()); + } + + @Test + public void queryParamsCaseInsensitiveFallback() throws Exception { + com.google.spanner.v1.KeyRecipe recipeProto = + createRecipe( + "part { tag: 1 }\n" + + "part {\n" + + " order: ASCENDING\n" + + " null_order: NULLS_FIRST\n" + + " type { code: STRING }\n" + + " identifier: \"id\"\n" + + "}\n"); + + Struct params = + parseStruct( + "fields {\n" + " key: \"Id\"\n" + " value { string_value: \"foo\" }\n" + "}\n"); + + KeyRecipe recipe = KeyRecipe.create(recipeProto); + TargetRange target = recipe.queryParamsToTargetRange(params); + assertEquals(expectedKey("foo"), target.start); + assertTrue(target.limit.isEmpty()); + } + + @Test + public void queryParamsCaseInsensitiveDuplicateUsesLastValue() throws Exception { + com.google.spanner.v1.KeyRecipe recipeProto = + createRecipe( + "part { tag: 1 }\n" + + "part {\n" + + " order: ASCENDING\n" + + " null_order: NULLS_FIRST\n" + + " type { code: STRING }\n" + + " identifier: \"ID\"\n" + + "}\n"); + + // Both "Id" and "id" normalize to "id"; the last one ("id"→"bar") wins. + Struct params = + parseStruct( + "fields {\n" + + " key: \"Id\"\n" + + " value { string_value: \"foo\" }\n" + + "}\n" + + "fields {\n" + + " key: \"id\"\n" + + " value { string_value: \"bar\" }\n" + + "}\n"); + + KeyRecipe recipe = KeyRecipe.create(recipeProto); + TargetRange target = recipe.queryParamsToTargetRange(params); + assertEquals(expectedKey("bar"), target.start); + assertFalse(target.approximate); + assertTrue(target.limit.isEmpty()); + } + + @Test + public void queryParamsCaseInsensitiveSafeForTurkishDotI() throws Exception { + // Turkish upper-case İ (U+0130) lower-cases to two characters under Locale.ROOT + // (i + combining dot above), so "SİCİL".length() != "SİCİL".toLowerCase(ROOT).length() + // and "SİCİL".equalsIgnoreCase("SİCİL".toLowerCase(ROOT)) is false. + // This is still safe because both the recipe identifier (server-sent) and the user's + // bound parameter name go through the same Locale.ROOT lower-casing before the + // HashMap lookup, so they produce the same string on both sides and the match succeeds. + com.google.spanner.v1.KeyRecipe recipeProto = + createRecipe( + "part { tag: 1 }\n" + + "part {\n" + + " order: ASCENDING\n" + + " null_order: NULLS_FIRST\n" + + " type { code: STRING }\n" + + " identifier: \"SİCİL\"\n" + + "}\n"); + + Struct params = + parseStruct( + "fields {\n" + " key: \"SİCİL\"\n" + " value { string_value: \"test\" }\n" + "}\n"); + + KeyRecipe recipe = KeyRecipe.create(recipeProto); + TargetRange target = recipe.queryParamsToTargetRange(params); + assertEquals(expectedKey("test"), target.start); + assertTrue(target.limit.isEmpty()); + } + + private static com.google.spanner.v1.KeyRecipe createRecipe(String text) + throws TextFormat.ParseException { + com.google.spanner.v1.KeyRecipe.Builder builder = com.google.spanner.v1.KeyRecipe.newBuilder(); + TextFormat.merge(text, builder); + return builder.build(); + } + + private static Struct parseStruct(String text) throws TextFormat.ParseException { + Struct.Builder builder = Struct.newBuilder(); + TextFormat.merge(text, builder); + return builder.build(); + } + + private static ByteString expectedKey(String value) { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendCompositeTag(out, 1); + SsFormat.appendNotNullMarkerNullOrderedFirst(out); + SsFormat.appendStringIncreasing(out, value); + return ByteString.copyFrom(out.toByteArray()); + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/RecipeGoldenTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/RecipeGoldenTest.java new file mode 100644 index 00000000000..dc1fde01f0c --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/RecipeGoldenTest.java @@ -0,0 +1,128 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static org.junit.Assert.assertEquals; + +import com.google.protobuf.TextFormat; +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import spanner.cloud.location.RecipeTestCase; +import spanner.cloud.location.RecipeTestCases; + +@RunWith(JUnit4.class) +public class RecipeGoldenTest { + + // Pattern to match unknown TypeCode enum values (e.g., TOKENLIST) and replace with + // TYPE_CODE_UNSPECIFIED. This handles cases where the textproto contains enum values + // not yet available in the public API. + private static final Pattern UNKNOWN_TYPE_CODE_PATTERN = Pattern.compile("code:\\s*TOKENLIST"); + + @Test + public void goldenTest() throws Exception { + String content; + try (InputStream inputStream = + getClass().getClassLoader().getResourceAsStream("recipe_test.textproto"); + BufferedReader reader = + new BufferedReader( + new InputStreamReader( + Objects.requireNonNull(inputStream), StandardCharsets.UTF_8))) { + content = reader.lines().collect(Collectors.joining("\n")); + } + + // Replace unknown enum values with TYPE_CODE_UNSPECIFIED so parsing succeeds. + // Test cases with unrecognized types will produce invalid recipes that get skipped. + content = UNKNOWN_TYPE_CODE_PATTERN.matcher(content).replaceAll("code: TYPE_CODE_UNSPECIFIED"); + + RecipeTestCases.Builder builder = RecipeTestCases.newBuilder(); + TextFormat.merge(content, builder); + + RecipeTestCases testCases = builder.build(); + + for (RecipeTestCase testCase : testCases.getTestCaseList()) { + if (testCase.getName().contains("Random")) { + continue; + } + + if (testCase.getRecipes().getRecipeCount() == 0) { + continue; + } + + KeyRecipe recipe; + try { + recipe = KeyRecipe.create(testCase.getRecipes().getRecipe(0)); + } catch (IllegalArgumentException e) { + for (RecipeTestCase.Test test : testCase.getTestList()) { + assertEquals( + "Invalid recipe should result in approximate=true in test case: " + + testCase.getName(), + true, + test.getApproximate()); + } + continue; + } + + int testNum = 0; + for (RecipeTestCase.Test test : testCase.getTestList()) { + testNum++; + + TargetRange target; + switch (test.getOperationCase()) { + case KEY: + target = recipe.keyToTargetRange(test.getKey()); + break; + case KEY_RANGE: + target = recipe.keyRangeToTargetRange(test.getKeyRange()); + break; + case KEY_SET: + target = recipe.keySetToTargetRange(test.getKeySet()); + break; + case MUTATION: + target = recipe.mutationToTargetRange(test.getMutation()); + break; + case QUERY_PARAMS: + target = recipe.queryParamsToTargetRange(test.getQueryParams()); + break; + case OPERATION_NOT_SET: + default: + throw new UnsupportedOperationException("Unsupported operation in test case"); + } + + assertEquals( + "Start mismatch in test case: " + testCase.getName() + " test #" + testNum, + test.getStart(), + target.start); + assertEquals( + "Limit mismatch in test case: " + testCase.getName() + " test #" + testNum, + test.getLimit(), + target.limit); + assertEquals( + "Approximate mismatch in test case: " + testCase.getName() + " test #" + testNum, + test.getApproximate(), + target.approximate); + } + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/RequestIdInterceptorTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/RequestIdInterceptorTest.java new file mode 100644 index 00000000000..266a90a3aa5 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/RequestIdInterceptorTest.java @@ -0,0 +1,326 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static com.google.cloud.spanner.XGoogSpannerRequestId.REQUEST_ID_CALL_OPTIONS_KEY; +import static com.google.cloud.spanner.XGoogSpannerRequestId.REQUEST_ID_HEADER_KEY; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import com.google.cloud.grpc.GcpManagedChannel; +import com.google.cloud.spanner.XGoogSpannerRequestId; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.MethodDescriptor.Marshaller; +import java.io.InputStream; +import java.util.concurrent.atomic.AtomicReference; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Unit tests for {@link RequestIdInterceptor}. */ +@RunWith(JUnit4.class) +public class RequestIdInterceptorTest { + + // Pattern to parse request ID: version.randProcessId.clientId.channelId.requestId.attempt + private static final Pattern REQUEST_ID_PATTERN = + Pattern.compile("^(\\d)\\.([0-9a-z]{16})\\.(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)$"); + + @Test + public void testInterceptorSetsRequestIdHeader() { + RequestIdInterceptor interceptor = new RequestIdInterceptor(); + XGoogSpannerRequestId requestId = XGoogSpannerRequestId.of(1, 2, 3, 0); + CallOptions callOptions = + CallOptions.DEFAULT.withOption(REQUEST_ID_CALL_OPTIONS_KEY, requestId); + + AtomicReference capturedHeaders = new AtomicReference<>(); + + Channel fakeChannel = + new FakeChannel() { + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + return new FakeClientCall() { + @Override + public void start(Listener responseListener, Metadata headers) { + capturedHeaders.set(headers); + } + }; + } + }; + + MethodDescriptor methodDescriptor = createMethodDescriptor(); + ClientCall call = + interceptor.interceptCall(methodDescriptor, callOptions, fakeChannel); + call.start(new NoOpListener<>(), new Metadata()); + + assertNotNull(capturedHeaders.get()); + String headerValue = capturedHeaders.get().get(REQUEST_ID_HEADER_KEY); + assertNotNull(headerValue); + + // Verify the header matches the expected pattern with attempt incremented to 1. + Matcher matcher = REQUEST_ID_PATTERN.matcher(headerValue); + assertTrue("Header value should match request ID pattern", matcher.matches()); + // Attempt should be 1 (incremented from 0). + assertTrue("Attempt should be 1", headerValue.endsWith(".1")); + } + + @Test + public void testInterceptorUpdatesChannelIdFromGrpcGcp() { + RequestIdInterceptor interceptor = new RequestIdInterceptor(); + + // Start with channel ID 0 (placeholder when DCP is enabled). + XGoogSpannerRequestId requestId = XGoogSpannerRequestId.of(1, 0, 3, 0); + + // Simulate grpc-gcp setting the actual channel ID (0-based) in CallOptions. + int gcpChannelId = 5; // grpc-gcp channel IDs are 0-based. + CallOptions callOptions = + CallOptions.DEFAULT + .withOption(REQUEST_ID_CALL_OPTIONS_KEY, requestId) + .withOption(GcpManagedChannel.CHANNEL_ID_KEY, gcpChannelId); + + AtomicReference capturedHeaders = new AtomicReference<>(); + + Channel fakeChannel = + new FakeChannel() { + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + return new FakeClientCall() { + @Override + public void start(Listener responseListener, Metadata headers) { + capturedHeaders.set(headers); + } + }; + } + }; + + MethodDescriptor methodDescriptor = createMethodDescriptor(); + ClientCall call = + interceptor.interceptCall(methodDescriptor, callOptions, fakeChannel); + call.start(new NoOpListener<>(), new Metadata()); + + assertNotNull(capturedHeaders.get()); + String headerValue = capturedHeaders.get().get(REQUEST_ID_HEADER_KEY); + assertNotNull(headerValue); + + // Parse the header and verify the channel ID was updated. + // Expected channel ID in header is gcpChannelId + 1 = 6. + Matcher matcher = REQUEST_ID_PATTERN.matcher(headerValue); + assertTrue("Header value should match request ID pattern", matcher.matches()); + String channelIdStr = matcher.group(4); + // Channel ID should be gcpChannelId + 1 = 6. + assertTrue( + "Channel ID should be " + (gcpChannelId + 1), + channelIdStr.equals(String.valueOf(gcpChannelId + 1))); + } + + @Test + public void testInterceptorDoesNotUpdateChannelIdWhenNotProvided() { + RequestIdInterceptor interceptor = new RequestIdInterceptor(); + + // Start with a specific channel ID. + long originalChannelId = 3; + XGoogSpannerRequestId requestId = XGoogSpannerRequestId.of(1, originalChannelId, 5, 0); + + // No CHANNEL_ID_KEY set in CallOptions (grpc-gcp not used or not available). + CallOptions callOptions = + CallOptions.DEFAULT.withOption(REQUEST_ID_CALL_OPTIONS_KEY, requestId); + + AtomicReference capturedHeaders = new AtomicReference<>(); + + Channel fakeChannel = + new FakeChannel() { + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + return new FakeClientCall() { + @Override + public void start(Listener responseListener, Metadata headers) { + capturedHeaders.set(headers); + } + }; + } + }; + + MethodDescriptor methodDescriptor = createMethodDescriptor(); + ClientCall call = + interceptor.interceptCall(methodDescriptor, callOptions, fakeChannel); + call.start(new NoOpListener<>(), new Metadata()); + + assertNotNull(capturedHeaders.get()); + String headerValue = capturedHeaders.get().get(REQUEST_ID_HEADER_KEY); + assertNotNull(headerValue); + + // Parse the header and verify the channel ID remained unchanged. + Matcher matcher = REQUEST_ID_PATTERN.matcher(headerValue); + assertTrue("Header value should match request ID pattern", matcher.matches()); + String channelIdStr = matcher.group(4); + // Channel ID should remain 3. + assertTrue( + "Channel ID should remain " + originalChannelId, + channelIdStr.equals(String.valueOf(originalChannelId))); + } + + @Test + public void testInterceptorOverridesChannelIdWhenGrpcGcpProvides() { + RequestIdInterceptor interceptor = new RequestIdInterceptor(); + + // Start with a non-zero channel ID. + long originalChannelId = 3; + XGoogSpannerRequestId requestId = XGoogSpannerRequestId.of(1, originalChannelId, 5, 0); + + // Simulate grpc-gcp setting a different channel ID. + int gcpChannelId = 7; + CallOptions callOptions = + CallOptions.DEFAULT + .withOption(REQUEST_ID_CALL_OPTIONS_KEY, requestId) + .withOption(GcpManagedChannel.CHANNEL_ID_KEY, gcpChannelId); + + AtomicReference capturedHeaders = new AtomicReference<>(); + + Channel fakeChannel = + new FakeChannel() { + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + return new FakeClientCall() { + @Override + public void start(Listener responseListener, Metadata headers) { + capturedHeaders.set(headers); + } + }; + } + }; + + MethodDescriptor methodDescriptor = createMethodDescriptor(); + ClientCall call = + interceptor.interceptCall(methodDescriptor, callOptions, fakeChannel); + call.start(new NoOpListener<>(), new Metadata()); + + assertNotNull(capturedHeaders.get()); + String headerValue = capturedHeaders.get().get(REQUEST_ID_HEADER_KEY); + assertNotNull(headerValue); + + // Parse the header and verify the channel ID WAS updated to grpc-gcp's value. + Matcher matcher = REQUEST_ID_PATTERN.matcher(headerValue); + assertTrue("Header value should match request ID pattern", matcher.matches()); + String channelIdStr = matcher.group(4); + // Channel ID should be gcpChannelId + 1 = 8 (grpc-gcp's channel ID overrides the original). + assertTrue( + "Channel ID should be " + (gcpChannelId + 1) + " but was " + channelIdStr, + channelIdStr.equals(String.valueOf(gcpChannelId + 1))); + } + + @Test + public void testInterceptorWithNoRequestId() { + RequestIdInterceptor interceptor = new RequestIdInterceptor(); + + // No request ID in CallOptions. + CallOptions callOptions = CallOptions.DEFAULT; + + AtomicReference capturedHeaders = new AtomicReference<>(); + + Channel fakeChannel = + new FakeChannel() { + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + return new FakeClientCall() { + @Override + public void start(Listener responseListener, Metadata headers) { + capturedHeaders.set(headers); + } + }; + } + }; + + MethodDescriptor methodDescriptor = createMethodDescriptor(); + ClientCall call = + interceptor.interceptCall(methodDescriptor, callOptions, fakeChannel); + call.start(new NoOpListener<>(), new Metadata()); + + assertNotNull(capturedHeaders.get()); + // No request ID header should be set. + assertNull(capturedHeaders.get().get(REQUEST_ID_HEADER_KEY)); + } + + private static MethodDescriptor createMethodDescriptor() { + return MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("test/method") + .setRequestMarshaller(new FakeMarshaller<>()) + .setResponseMarshaller(new FakeMarshaller<>()) + .build(); + } + + private static class FakeMarshaller implements Marshaller { + @Override + public InputStream stream(T value) { + return null; + } + + @Override + public T parse(InputStream stream) { + return null; + } + } + + private abstract static class FakeChannel extends Channel { + @Override + public String authority() { + return "fake-authority"; + } + } + + private abstract static class FakeClientCall extends ClientCall { + @Override + public void start(Listener responseListener, Metadata headers) {} + + @Override + public void request(int numMessages) {} + + @Override + public void cancel(String message, Throwable cause) {} + + @Override + public void halfClose() {} + + @Override + public void sendMessage(ReqT message) {} + } + + private static class NoOpListener extends ClientCall.Listener { + @Override + public void onMessage(T message) {} + + @Override + public void onHeaders(Metadata headers) {} + + @Override + public void onClose(io.grpc.Status status, Metadata trailers) {} + + @Override + public void onReady() {} + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/SpannerRpcMetricsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/SpannerRpcMetricsTest.java index 89c874fe204..c6095dde7d2 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/SpannerRpcMetricsTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/SpannerRpcMetricsTest.java @@ -16,7 +16,6 @@ package com.google.cloud.spanner.spi.v1; -import static com.google.cloud.spanner.DisableDefaultMtlsProvider.disableDefaultMtlsProvider; import static org.junit.Assert.assertEquals; import com.google.cloud.NoCredentials; @@ -50,10 +49,7 @@ import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.*; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -73,6 +69,7 @@ public class SpannerRpcMetricsTest { private static DatabaseClient databaseClientNoHeader; private static String instanceId = "fake-instance"; private static String databaseId = "fake-database"; + private static String noHeaderdatabaseId = "fake-database-1"; private static String projectId = "fake-project"; private static AtomicInteger fakeServerTiming = new AtomicInteger(new Random().nextInt(1000) + 1); private static final Statement SELECT1AND2 = @@ -112,7 +109,6 @@ public class SpannerRpcMetricsTest { @BeforeClass public static void startServer() throws Exception { - disableDefaultMtlsProvider(); SpannerOptions.enableOpenTelemetryMetrics(); mockSpanner = new MockSpannerServiceImpl(); mockSpanner.setAbortProbability(0.0D); // We don't want any unpredictable aborted transactions. @@ -183,7 +179,7 @@ public void sendHeaders(Metadata headers) { createSpannerOptions(addressNoHeader, serverNoHeader).getService(); databaseClientNoHeader = spannerNoHeaderNoOpenTelemetry.getDatabaseClient( - DatabaseId.of(projectId, instanceId, databaseId)); + DatabaseId.of(projectId, instanceId, noHeaderdatabaseId)); } @AfterClass @@ -228,7 +224,8 @@ public void testGfeMissingHeaderExecuteSqlWithGlobalOpenTelemetry() throws Inter long count = getHeaderLatencyMetric( getMetricData("spanner/gfe_header_missing_count", inMemoryMetricReaderInjected), - "google.spanner.v1.Spanner/ExecuteSql"); + "google.spanner.v1.Spanner/Commit", + databaseId); assertEquals(0, count); databaseClientNoHeader @@ -237,7 +234,8 @@ public void testGfeMissingHeaderExecuteSqlWithGlobalOpenTelemetry() throws Inter long count1 = getHeaderLatencyMetric( getMetricData("spanner/gfe_header_missing_count", inMemoryMetricReader), - "google.spanner.v1.Spanner/ExecuteSql"); + "google.spanner.v1.Spanner/Commit", + noHeaderdatabaseId); assertEquals(1, count1); } @@ -273,9 +271,12 @@ private static SpannerOptions createSpannerOptions(InetSocketAddress address, Se .build(); } - private long getHeaderLatencyMetric(MetricData metricData, String methodName) { + private long getHeaderLatencyMetric(MetricData metricData, String methodName, String databaseId) { return metricData.getLongSumData().getPoints().stream() - .filter(x -> x.getAttributes().asMap().containsValue(methodName)) + .filter( + x -> + x.getAttributes().asMap().containsValue(methodName) + && x.getAttributes().asMap().containsValue(databaseId)) .findFirst() .get() .getValue(); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/SsFormatTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/SsFormatTest.java new file mode 100644 index 00000000000..da8a833db43 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/SsFormatTest.java @@ -0,0 +1,902 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.ByteString; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; +import java.util.TreeSet; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Unit tests for {@link SsFormat}. */ +@RunWith(JUnit4.class) +public class SsFormatTest { + + private static List signedIntTestValues; + private static List unsignedIntTestValues; + private static List doubleTestValues; + + /** Comparator for unsigned lexicographic comparison of byte arrays. */ + private static final Comparator UNSIGNED_BYTE_COMPARATOR = + (a, b) -> + ByteString.unsignedLexicographicalComparator() + .compare(ByteString.copyFrom(a), ByteString.copyFrom(b)); + + @BeforeClass + public static void setUpTestData() { + signedIntTestValues = buildSignedIntTestValues(); + unsignedIntTestValues = buildUnsignedIntTestValues(); + doubleTestValues = buildDoubleTestValues(); + } + + private static List buildSignedIntTestValues() { + TreeSet values = new TreeSet<>(); + + // Range of small values + for (int i = -300; i < 300; i++) { + values.add((long) i); + } + + // Powers of 2 and boundaries + for (int i = 0; i < 63; i++) { + long powerOf2 = 1L << i; + values.add(powerOf2); + values.add(powerOf2 - 1); + values.add(powerOf2 + 1); + values.add(-powerOf2); + values.add(-powerOf2 - 1); + values.add(-powerOf2 + 1); + } + + // Edge cases + values.add(Long.MIN_VALUE); + values.add(Long.MAX_VALUE); + + return new ArrayList<>(values); + } + + private static List buildUnsignedIntTestValues() { + TreeSet values = new TreeSet<>(Long::compareUnsigned); + + // Range of small values + for (int i = 0; i < 600; i++) { + values.add((long) i); + } + + // Powers of 2 and boundaries (treating as unsigned) + for (int i = 0; i < 64; i++) { + long powerOf2 = 1L << i; + values.add(powerOf2); + if (powerOf2 > 0) { + values.add(powerOf2 - 1); + } + values.add(powerOf2 + 1); + } + + // Max unsigned value (all bits set) + values.add(-1L); // 0xFFFFFFFFFFFFFFFF as unsigned + + return new ArrayList<>(values); + } + + private static List buildDoubleTestValues() { + TreeSet values = + new TreeSet<>( + (a, b) -> { + // Handle NaN specially - put at end + if (Double.isNaN(a) && Double.isNaN(b)) return 0; + if (Double.isNaN(a)) return 1; + if (Double.isNaN(b)) return -1; + return Double.compare(a, b); + }); + + // Basic values + values.add(0.0); + values.add(-0.0); + values.add(Double.POSITIVE_INFINITY); + values.add(Double.NEGATIVE_INFINITY); + values.add(Double.MIN_VALUE); + values.add(Double.MAX_VALUE); + values.add(-Double.MIN_VALUE); + values.add(-Double.MAX_VALUE); + + // Powers of 10 + double value = 1.0; + for (int i = 0; i < 10; i++) { + values.add(value); + values.add(-value); + value /= 10; + } + + long[] signs = {0, 1}; + long[] exponents = { + 0, 1, 2, 100, 200, 512, 1000, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, + 2000, 2045, 2046, 2047 + }; + long[] fractions = { + 0, + 1, + 2, + 10, + 16, + 255, + 256, + 32767, + 32768, + 65535, + 65536, + 1000000, + 0x7ffffffeL, + 0x7fffffffL, + 0x80000000L, + 0x80000001L, + 0x80000002L, + 0x0003456789abcdefL, + 0x0007fffffffffffeL, + 0x0007ffffffffffffL, + 0x0008000000000000L, + 0x0008000000000001L, + 0x000cba9876543210L, + 0x000fffffffff0000L, + 0x000ffffffffff000L, + 0x000fffffffffff00L, + 0x000ffffffffffff0L, + 0x000ffffffffffff8L, + 0x000ffffffffffffcL, + 0x000ffffffffffffeL, + 0x000fffffffffffffL + }; + + for (long sign : signs) { + for (long exponent : exponents) { + for (long fraction : fractions) { + long bits = (sign << 63) | (exponent << 52) | fraction; + values.add(Double.longBitsToDouble(bits)); + } + } + } + + return new ArrayList<>(values); + } + + // ==================== Prefix Successor Tests ==================== + + @Test + public void makePrefixSuccessor_emptyInput_returnsEmpty() { + assertEquals(ByteString.EMPTY, SsFormat.makePrefixSuccessor(ByteString.EMPTY)); + assertEquals(ByteString.EMPTY, SsFormat.makePrefixSuccessor(null)); + } + + @Test + public void makePrefixSuccessor_singleByte_setsLsb() { + ByteString input = ByteString.copyFrom(new byte[] {0x00}); + ByteString result = SsFormat.makePrefixSuccessor(input); + + assertEquals(1, result.size()); + assertEquals(0x01, result.byteAt(0) & 0xFF); + } + + @Test + public void makePrefixSuccessor_multipleBytes_onlyModifiesLastByte() { + ByteString input = ByteString.copyFrom(new byte[] {0x12, 0x34, 0x00}); + ByteString result = SsFormat.makePrefixSuccessor(input); + + assertEquals(3, result.size()); + assertEquals(0x12, result.byteAt(0) & 0xFF); + assertEquals(0x34, result.byteAt(1) & 0xFF); + assertEquals(0x01, result.byteAt(2) & 0xFF); + } + + @Test + public void makePrefixSuccessor_resultIsGreaterThanOriginal() { + byte[] original = new byte[] {0x10, 0x20, 0x30}; + ByteString successor = SsFormat.makePrefixSuccessor(ByteString.copyFrom(original)); + + assertTrue( + ByteString.unsignedLexicographicalComparator() + .compare(ByteString.copyFrom(original), successor) + < 0); + } + + // ==================== Composite Tag Tests ==================== + + @Test + public void appendCompositeTag_shortTag_encodesInOneByte() { + // Tags 1-15 should fit in 1 byte + for (int tag = 1; tag <= 15; tag++) { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendCompositeTag(out, tag); + byte[] result = out.toByteArray(); + + assertEquals("Tag " + tag + " should encode to 1 byte", 1, result.length); + assertEquals("Tag " + tag + " should encode as tag << 1", tag << 1, result[0] & 0xFF); + } + } + + @Test + public void appendCompositeTag_mediumTag_encodesInTwoBytes() { + // Tags 16-4095 should fit in 2 bytes + int[] testTags = {16, 100, 1000, 4095}; + for (int tag : testTags) { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendCompositeTag(out, tag); + byte[] result = out.toByteArray(); + + assertEquals("Tag " + tag + " should encode to 2 bytes", 2, result.length); + } + } + + @Test + public void appendCompositeTag_largeTag_encodesInThreeBytes() { + // Tags 4096-65535 should fit in 3 bytes + int[] testTags = {4096, 10000, 65535}; + for (int tag : testTags) { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendCompositeTag(out, tag); + byte[] result = out.toByteArray(); + + assertEquals("Tag " + tag + " should encode to 3 bytes", 3, result.length); + } + } + + @Test + public void appendCompositeTag_invalidTag_throws() { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + assertThrows(IllegalArgumentException.class, () -> SsFormat.appendCompositeTag(out, 0)); + assertThrows(IllegalArgumentException.class, () -> SsFormat.appendCompositeTag(out, -1)); + assertThrows(IllegalArgumentException.class, () -> SsFormat.appendCompositeTag(out, 65536)); + } + + @Test + public void appendCompositeTag_preservesOrdering() { + // Verify smaller tags encode to lexicographically smaller byte sequences + for (int tag1 = 1; tag1 <= 100; tag1++) { + for (int tag2 = tag1 + 1; tag2 <= 101 && tag2 <= tag1 + 10; tag2++) { + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendCompositeTag(out1, tag1); + SsFormat.appendCompositeTag(out2, tag2); + + assertTrue( + "Tag " + tag1 + " should encode smaller than tag " + tag2, + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) < 0); + } + } + } + + // ==================== Signed Integer Tests ==================== + + @Test + public void appendInt64Increasing_preservesOrdering() { + // Verify that encoded integers maintain their natural ordering + for (int i = 0; i < signedIntTestValues.size() - 1; i++) { + long v1 = signedIntTestValues.get(i); + long v2 = signedIntTestValues.get(i + 1); + + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendInt64Increasing(out1, v1); + SsFormat.appendInt64Increasing(out2, v2); + + assertTrue( + "Encoded " + v1 + " should be less than encoded " + v2, + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) < 0); + } + } + + @Test + public void appendInt64Decreasing_reversesOrdering() { + // Verify that decreasing encoding reverses the ordering + for (int i = 0; i < signedIntTestValues.size() - 1; i++) { + long v1 = signedIntTestValues.get(i); + long v2 = signedIntTestValues.get(i + 1); + + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendInt64Decreasing(out1, v1); + SsFormat.appendInt64Decreasing(out2, v2); + + assertTrue( + "Decreasing encoded " + v1 + " should be greater than encoded " + v2, + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) > 0); + } + } + + @Test + public void appendInt64Increasing_hasIsKeyBitSet() { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendInt64Increasing(out, 42); + byte[] result = out.toByteArray(); + + assertTrue("IS_KEY bit (0x80) should be set", (result[0] & 0x80) != 0); + } + + @Test + public void appendInt64Increasing_edgeCases() { + long[] edgeCases = {Long.MIN_VALUE, -1, 0, 1, Long.MAX_VALUE}; + + for (long value : edgeCases) { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendInt64Increasing(out, value); + byte[] result = out.toByteArray(); + + assertTrue("Result should have at least 2 bytes for value " + value, result.length >= 2); + assertTrue("IS_KEY bit should be set for value " + value, (result[0] & 0x80) != 0); + } + } + + // ==================== Boolean Tests ==================== + + @Test + public void appendBoolIncreasing_preservesOrdering() { + UnsynchronizedByteArrayOutputStream outFalse = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream outTrue = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendBoolIncreasing(outFalse, false); + SsFormat.appendBoolIncreasing(outTrue, true); + + assertTrue( + "Encoded false should be less than encoded true", + UNSIGNED_BYTE_COMPARATOR.compare(outFalse.toByteArray(), outTrue.toByteArray()) < 0); + } + + @Test + public void appendBoolIncreasing_encodesCorrectly() { + UnsynchronizedByteArrayOutputStream outFalse = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream outTrue = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendBoolIncreasing(outFalse, false); + SsFormat.appendBoolIncreasing(outTrue, true); + + // false=0: header 0x80 (IS_KEY | TYPE_UINT_1), payload 0x00 + assertArrayEquals(new byte[] {(byte) 0x80, 0x00}, outFalse.toByteArray()); + // true=1: header 0x80, payload 0x02 (1 << 1) + assertArrayEquals(new byte[] {(byte) 0x80, 0x02}, outTrue.toByteArray()); + } + + @Test + public void appendBoolDecreasing_reversesOrdering() { + UnsynchronizedByteArrayOutputStream outFalse = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream outTrue = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendBoolDecreasing(outFalse, false); + SsFormat.appendBoolDecreasing(outTrue, true); + + assertTrue( + "Decreasing encoded false should be greater than encoded true", + UNSIGNED_BYTE_COMPARATOR.compare(outFalse.toByteArray(), outTrue.toByteArray()) > 0); + } + + @Test + public void appendBoolDecreasing_encodesCorrectly() { + UnsynchronizedByteArrayOutputStream outFalse = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream outTrue = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendBoolDecreasing(outFalse, false); + SsFormat.appendBoolDecreasing(outTrue, true); + + // false=0 inverted: header 0xA8 (IS_KEY | TYPE_DECREASING_UINT_1), payload 0xFE (~0 & 0x7F) << + // 1 + assertArrayEquals(new byte[] {(byte) 0xA8, (byte) 0xFE}, outFalse.toByteArray()); + // true=1 inverted: header 0xA8, payload 0xFC (~1 & 0x7F) << 1 + assertArrayEquals(new byte[] {(byte) 0xA8, (byte) 0xFC}, outTrue.toByteArray()); + } + + // ==================== String Tests ==================== + + @Test + public void appendStringIncreasing_preservesOrdering() { + String[] strings = {"", "a", "aa", "ab", "b", "hello", "world", "\u00ff"}; + Arrays.sort(strings); + + for (int i = 0; i < strings.length - 1; i++) { + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendStringIncreasing(out1, strings[i]); + SsFormat.appendStringIncreasing(out2, strings[i + 1]); + + assertTrue( + "Encoded '" + strings[i] + "' should be less than '" + strings[i + 1] + "'", + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) < 0); + } + } + + @Test + public void appendStringDecreasing_reversesOrdering() { + String[] strings = {"", "a", "b", "hello"}; + + for (int i = 0; i < strings.length - 1; i++) { + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendStringDecreasing(out1, strings[i]); + SsFormat.appendStringDecreasing(out2, strings[i + 1]); + + assertTrue( + "Decreasing encoded '" + strings[i] + "' should be greater than '" + strings[i + 1] + "'", + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) > 0); + } + } + + @Test + public void appendStringIncreasing_escapesSpecialBytes() { + // Test that 0x00 and 0xFF bytes are properly escaped + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendBytesIncreasing(out, new byte[] {0x00, (byte) 0xFF, 0x42}); + byte[] result = out.toByteArray(); + + // Result should be longer due to escaping: + // header (1) + escaped 0x00 (2) + escaped 0xFF (2) + 0x42 (1) + terminator (2) = 8 + assertTrue("Result should include escape sequences", result.length > 5); + } + + @Test + public void appendStringIncreasing_emptyString() { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendStringIncreasing(out, ""); + byte[] result = out.toByteArray(); + + // Empty string should still have header + terminator + assertTrue("Empty string encoding should have at least 3 bytes", result.length >= 3); + assertTrue("IS_KEY bit should be set", (result[0] & 0x80) != 0); + } + + // ==================== Bytes Tests ==================== + + @Test + public void appendBytesIncreasing_preservesOrdering() { + byte[][] testBytes = { + new byte[] {}, + new byte[] {0x00}, + new byte[] {0x01}, + new byte[] {0x01, 0x02}, + new byte[] {(byte) 0xFF} + }; + + for (int i = 0; i < testBytes.length - 1; i++) { + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendBytesIncreasing(out1, testBytes[i]); + SsFormat.appendBytesIncreasing(out2, testBytes[i + 1]); + + assertTrue( + "Encoded bytes should maintain lexicographic order", + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) < 0); + } + } + + @Test + public void appendBytesDecreasing_reversesOrdering() { + byte[][] testBytes = { + new byte[] {}, + new byte[] {0x00}, + new byte[] {0x01}, + new byte[] {0x01, 0x02}, + new byte[] {(byte) 0xFF} + }; + + for (int i = 0; i < testBytes.length - 1; i++) { + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendBytesDecreasing(out1, testBytes[i]); + SsFormat.appendBytesDecreasing(out2, testBytes[i + 1]); + + assertTrue( + "Decreasing encoded bytes should reverse lexicographic order", + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) > 0); + } + } + + @Test + public void appendBytesDecreasing_escapesSpecialBytes() { + // Test that 0x00 and 0xFF bytes are properly escaped in decreasing mode + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendBytesDecreasing(out, new byte[] {0x00, (byte) 0xFF, 0x42}); + byte[] result = out.toByteArray(); + + // Result should be longer due to escaping + // In decreasing mode: bytes are inverted, then escaped + // Original 0x00 -> inverted to 0xFF -> needs escape (0xFF, 0x10) + // Original 0xFF -> inverted to 0x00 -> needs escape (0x00, 0xF0) + // Original 0x42 -> inverted to 0xBD -> no escape needed + assertTrue("Result should include escape sequences", result.length > 5); + } + + @Test + public void appendBytesDecreasing_emptyArray() { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendBytesDecreasing(out, new byte[] {}); + byte[] result = out.toByteArray(); + + // Empty bytes should still have header + terminator + assertTrue("Empty bytes encoding should have at least 3 bytes", result.length >= 3); + assertTrue("IS_KEY bit should be set", (result[0] & 0x80) != 0); + } + + @Test + public void appendBytesIncreasing_vs_Decreasing_sameInput_differentOutput() { + byte[] input = new byte[] {0x01, 0x02, 0x03}; + + UnsynchronizedByteArrayOutputStream outInc = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream outDec = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendBytesIncreasing(outInc, input); + SsFormat.appendBytesDecreasing(outDec, input); + + // The outputs should be different (different header type and inverted bytes) + assertFalse( + "Increasing and decreasing encodings should differ", + Arrays.equals(outInc.toByteArray(), outDec.toByteArray())); + } + + // ==================== Double Tests ==================== + + @Test + public void appendDoubleIncreasing_preservesOrdering() { + // Filter out NaN as it has special comparison semantics + List sortedDoubles = new ArrayList<>(); + for (double d : doubleTestValues) { + if (!Double.isNaN(d)) { + sortedDoubles.add(d); + } + } + sortedDoubles.sort(Double::compare); + + for (int i = 0; i < sortedDoubles.size() - 1; i++) { + double v1 = sortedDoubles.get(i); + double v2 = sortedDoubles.get(i + 1); + + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendDoubleIncreasing(out1, v1); + SsFormat.appendDoubleIncreasing(out2, v2); + + int cmp = UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()); + + // Note: -0.0 and 0.0 encode identically (both map to 0 internally), so allow equality + assertTrue("Encoded " + v1 + " should be <= encoded " + v2, cmp <= 0); + } + } + + @Test + public void appendDoubleDecreasing_reversesOrdering() { + double[] values = {-Double.MAX_VALUE, -1.0, 0.0, 1.0, Double.MAX_VALUE}; + + for (int i = 0; i < values.length - 1; i++) { + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendDoubleDecreasing(out1, values[i]); + SsFormat.appendDoubleDecreasing(out2, values[i + 1]); + + assertTrue( + "Decreasing encoded " + values[i] + " should be greater than " + values[i + 1], + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) > 0); + } + } + + @Test + public void appendDoubleIncreasing_specialValues() { + // Test special double values + // Note: -0.0 is excluded because it encodes identically to 0.0 + // (both have internal representation mapping to 0) + double[] specialValues = { + Double.NEGATIVE_INFINITY, + -Double.MAX_VALUE, + -1.0, + -Double.MIN_VALUE, + 0.0, // -0.0 encodes the same as 0.0 + Double.MIN_VALUE, + 1.0, + Double.MAX_VALUE, + Double.POSITIVE_INFINITY + }; + + // Verify ordering is preserved + for (int i = 0; i < specialValues.length - 1; i++) { + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendDoubleIncreasing(out1, specialValues[i]); + SsFormat.appendDoubleIncreasing(out2, specialValues[i + 1]); + + assertTrue( + "Special value " + specialValues[i] + " should encode less than " + specialValues[i + 1], + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) < 0); + } + } + + @Test + public void appendDoubleIncreasing_negativeZeroEqualsPositiveZero() { + // Verify that -0.0 and 0.0 encode identically + // This is correct behavior: both map to internal representation 0 + UnsynchronizedByteArrayOutputStream outNegZero = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream outPosZero = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendDoubleIncreasing(outNegZero, -0.0); + SsFormat.appendDoubleIncreasing(outPosZero, 0.0); + + assertArrayEquals( + "-0.0 and 0.0 should encode identically", + outNegZero.toByteArray(), + outPosZero.toByteArray()); + } + + @Test + public void appendDoubleIncreasing_nan() { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendDoubleIncreasing(out, Double.NaN); + byte[] result = out.toByteArray(); + + assertTrue("NaN encoding should have at least 2 bytes", result.length >= 2); + assertTrue("IS_KEY bit should be set for NaN", (result[0] & 0x80) != 0); + } + + // ==================== Null Marker Tests ==================== + + @Test + public void appendNullOrderedFirst_encoding() { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendNullOrderedFirst(out); + byte[] result = out.toByteArray(); + + assertEquals("Null ordered first should encode to 2 bytes", 2, result.length); + assertTrue("IS_KEY bit should be set", (result[0] & 0x80) != 0); + } + + @Test + public void appendNullOrderedLast_encoding() { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendNullOrderedLast(out); + byte[] result = out.toByteArray(); + + assertEquals("Null ordered last should encode to 2 bytes", 2, result.length); + assertTrue("IS_KEY bit should be set", (result[0] & 0x80) != 0); + } + + @Test + public void appendNotNullMarkerNullOrderedFirst_encoding() { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendNotNullMarkerNullOrderedFirst(out); + byte[] result = out.toByteArray(); + + assertEquals("Not-null marker (nulls first) should encode to 1 byte", 1, result.length); + } + + @Test + public void appendNotNullMarkerNullOrderedLast_encoding() { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendNotNullMarkerNullOrderedLast(out); + byte[] result = out.toByteArray(); + + assertEquals("Not-null marker (nulls last) should encode to 1 byte", 1, result.length); + } + + @Test + public void nullOrderedFirst_sortsBeforeValues() { + UnsynchronizedByteArrayOutputStream nullOut = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream valueOut = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendNullOrderedFirst(nullOut); + SsFormat.appendNotNullMarkerNullOrderedFirst(valueOut); + SsFormat.appendInt64Increasing(valueOut, Long.MIN_VALUE); + + assertTrue( + "Null (ordered first) should sort before any value", + UNSIGNED_BYTE_COMPARATOR.compare(nullOut.toByteArray(), valueOut.toByteArray()) < 0); + } + + @Test + public void nullOrderedLast_sortsAfterValues() { + UnsynchronizedByteArrayOutputStream nullOut = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream valueOut = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendNullOrderedLast(nullOut); + SsFormat.appendNotNullMarkerNullOrderedLast(valueOut); + SsFormat.appendInt64Increasing(valueOut, Long.MAX_VALUE); + + assertTrue( + "Null (ordered last) should sort after any value", + UNSIGNED_BYTE_COMPARATOR.compare(nullOut.toByteArray(), valueOut.toByteArray()) > 0); + } + + // ==================== Timestamp Tests ==================== + + @Test + public void encodeTimestamp_length() { + byte[] result = SsFormat.encodeTimestamp(0, 0); + assertEquals("Timestamp should encode to 12 bytes", 12, result.length); + } + + @Test + public void encodeTimestamp_preservesOrdering() { + long[][] timestamps = { + {0, 0}, + {0, 1}, + {0, 999999999}, + {1, 0}, + {100, 500000000}, + {Long.MAX_VALUE / 2, 0} + }; + + for (int i = 0; i < timestamps.length - 1; i++) { + byte[] t1 = SsFormat.encodeTimestamp(timestamps[i][0], (int) timestamps[i][1]); + byte[] t2 = SsFormat.encodeTimestamp(timestamps[i + 1][0], (int) timestamps[i + 1][1]); + + assertTrue( + "Earlier timestamp should encode smaller", UNSIGNED_BYTE_COMPARATOR.compare(t1, t2) < 0); + } + } + + // ==================== UUID Tests ==================== + + @Test + public void encodeUuid_length() { + byte[] result = SsFormat.encodeUuid(0, 0); + assertEquals("UUID should encode to 16 bytes", 16, result.length); + } + + @Test + public void encodeUuid_bigEndianEncoding() { + byte[] result = SsFormat.encodeUuid(0x0102030405060708L, 0x090A0B0C0D0E0F10L); + + // Verify big-endian encoding of high bits + assertEquals(0x01, result[0] & 0xFF); + assertEquals(0x02, result[1] & 0xFF); + assertEquals(0x03, result[2] & 0xFF); + assertEquals(0x04, result[3] & 0xFF); + assertEquals(0x05, result[4] & 0xFF); + assertEquals(0x06, result[5] & 0xFF); + assertEquals(0x07, result[6] & 0xFF); + assertEquals(0x08, result[7] & 0xFF); + + // Verify big-endian encoding of low bits + assertEquals(0x09, result[8] & 0xFF); + assertEquals(0x0A, result[9] & 0xFF); + assertEquals(0x0B, result[10] & 0xFF); + assertEquals(0x0C, result[11] & 0xFF); + assertEquals(0x0D, result[12] & 0xFF); + assertEquals(0x0E, result[13] & 0xFF); + assertEquals(0x0F, result[14] & 0xFF); + assertEquals(0x10, result[15] & 0xFF); + } + + @Test + public void encodeUuid_preservesOrdering() { + // UUIDs compared as unsigned 128-bit integers should preserve order + long[][] uuids = { + {0, 0}, + {0, 1}, + {0, Long.MAX_VALUE}, + {1, 0}, + {Long.MAX_VALUE, Long.MAX_VALUE} + }; + + for (int i = 0; i < uuids.length - 1; i++) { + byte[] u1 = SsFormat.encodeUuid(uuids[i][0], uuids[i][1]); + byte[] u2 = SsFormat.encodeUuid(uuids[i + 1][0], uuids[i + 1][1]); + + assertTrue("UUID ordering should be preserved", UNSIGNED_BYTE_COMPARATOR.compare(u1, u2) < 0); + } + } + + // ==================== Composite Key Tests ==================== + + @Test + public void compositeKey_tagPlusIntPreservesOrdering() { + int tag = 5; + long[] values = {Long.MIN_VALUE, -1, 0, 1, Long.MAX_VALUE}; + + for (int i = 0; i < values.length - 1; i++) { + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendCompositeTag(out1, tag); + SsFormat.appendInt64Increasing(out1, values[i]); + + SsFormat.appendCompositeTag(out2, tag); + SsFormat.appendInt64Increasing(out2, values[i + 1]); + + assertTrue( + "Composite key with " + values[i] + " should be less than with " + values[i + 1], + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) < 0); + } + } + + @Test + public void compositeKey_differentTagsSortByTag() { + long value = 100; + + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendCompositeTag(out1, 5); + SsFormat.appendInt64Increasing(out1, value); + + SsFormat.appendCompositeTag(out2, 10); + SsFormat.appendInt64Increasing(out2, value); + + assertTrue( + "Key with smaller tag should sort first", + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) < 0); + } + + @Test + public void compositeKey_multipleKeyParts() { + // Simulate encoding a composite key with multiple parts: tag + int + string + UnsynchronizedByteArrayOutputStream out1 = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out2 = new UnsynchronizedByteArrayOutputStream(); + + SsFormat.appendCompositeTag(out1, 1); + SsFormat.appendInt64Increasing(out1, 100); + SsFormat.appendStringIncreasing(out1, "alice"); + + SsFormat.appendCompositeTag(out2, 1); + SsFormat.appendInt64Increasing(out2, 100); + SsFormat.appendStringIncreasing(out2, "bob"); + + assertTrue( + "Keys with same prefix but different strings should order by string", + UNSIGNED_BYTE_COMPARATOR.compare(out1.toByteArray(), out2.toByteArray()) < 0); + } + + // ==================== Order Preservation Summary Test ==================== + + @Test + public void orderPreservation_comprehensiveIntTest() { + // Take a sample of values to avoid O(n^2) test time + int step = Math.max(1, signedIntTestValues.size() / 100); + List sample = new ArrayList<>(); + for (int i = 0; i < signedIntTestValues.size(); i += step) { + sample.add(signedIntTestValues.get(i)); + } + + // Encode all values + List encoded = new ArrayList<>(); + for (long v : sample) { + UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + SsFormat.appendInt64Increasing(out, v); + encoded.add(out.toByteArray()); + } + + // Verify the encoded values are in the same order as the original values + for (int i = 0; i < sample.size() - 1; i++) { + int comparison = UNSIGNED_BYTE_COMPARATOR.compare(encoded.get(i), encoded.get(i + 1)); + assertTrue( + "Order should be preserved: " + sample.get(i) + " < " + sample.get(i + 1), + comparison < 0); + } + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/TargetRangeTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/TargetRangeTest.java new file mode 100644 index 00000000000..ac43da07f31 --- /dev/null +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/TargetRangeTest.java @@ -0,0 +1,286 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.spanner.spi.v1; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import com.google.protobuf.ByteString; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Unit tests for {@link TargetRange}. */ +@RunWith(JUnit4.class) +public class TargetRangeTest { + + private static ByteString bs(String s) { + return ByteString.copyFromUtf8(s); + } + + // ==================== isPoint Tests ==================== + + @Test + public void isPoint_emptyLimit_returnsTrue() { + TargetRange range = new TargetRange(bs("a"), ByteString.EMPTY, false); + assertTrue(range.isPoint()); + } + + @Test + public void isPoint_nonEmptyLimit_returnsFalse() { + TargetRange range = new TargetRange(bs("a"), bs("b"), false); + assertFalse(range.isPoint()); + } + + // ==================== mergeFrom Start Key Tests ==================== + + @Test + public void mergeFrom_otherStartSmaller_updatesStart() { + TargetRange target = new TargetRange(bs("c"), bs("f"), false); + TargetRange other = new TargetRange(bs("a"), bs("d"), false); + + target.mergeFrom(other); + + assertEquals(bs("a"), target.start); + } + + @Test + public void mergeFrom_otherStartEqual_keepsOriginalStart() { + TargetRange target = new TargetRange(bs("c"), bs("f"), false); + TargetRange other = new TargetRange(bs("c"), bs("e"), false); + + target.mergeFrom(other); + + assertEquals(bs("c"), target.start); + } + + @Test + public void mergeFrom_otherStartLarger_keepsOriginalStart() { + TargetRange target = new TargetRange(bs("a"), bs("f"), false); + TargetRange other = new TargetRange(bs("c"), bs("e"), false); + + target.mergeFrom(other); + + assertEquals(bs("a"), target.start); + } + + // ==================== mergeFrom Limit Key Tests (Range into Range) ==================== + + @Test + public void mergeFrom_otherLimitLarger_updatesLimit() { + TargetRange target = new TargetRange(bs("a"), bs("c"), false); + TargetRange other = new TargetRange(bs("b"), bs("e"), false); + + target.mergeFrom(other); + + assertEquals(bs("e"), target.limit); + } + + @Test + public void mergeFrom_otherLimitEqual_keepsOriginalLimit() { + TargetRange target = new TargetRange(bs("a"), bs("e"), false); + TargetRange other = new TargetRange(bs("b"), bs("e"), false); + + target.mergeFrom(other); + + assertEquals(bs("e"), target.limit); + } + + @Test + public void mergeFrom_otherLimitSmaller_keepsOriginalLimit() { + TargetRange target = new TargetRange(bs("a"), bs("f"), false); + TargetRange other = new TargetRange(bs("b"), bs("d"), false); + + target.mergeFrom(other); + + assertEquals(bs("f"), target.limit); + } + + // ==================== mergeFrom Point into Range Tests ==================== + + @Test + public void mergeFrom_pointBeyondLimit_extendsLimitWithPrefixSuccessor() { + TargetRange target = new TargetRange(bs("a"), bs("c"), false); + // Point at "d" which is beyond the limit "c" + TargetRange point = new TargetRange(bs("d"), ByteString.EMPTY, false); + + target.mergeFrom(point); + + // Limit should be makePrefixSuccessor("d") + assertEquals(SsFormat.makePrefixSuccessor(bs("d")), target.limit); + } + + @Test + public void mergeFrom_pointAtLimit_extendsLimitWithPrefixSuccessor() { + TargetRange target = new TargetRange(bs("a"), bs("c"), false); + // Point at "c" which equals the limit + TargetRange point = new TargetRange(bs("c"), ByteString.EMPTY, false); + + target.mergeFrom(point); + + // Limit should be makePrefixSuccessor("c") + assertEquals(SsFormat.makePrefixSuccessor(bs("c")), target.limit); + } + + @Test + public void mergeFrom_pointWithinRange_keepsOriginalLimit() { + TargetRange target = new TargetRange(bs("a"), bs("e"), false); + // Point at "c" which is within the range [a, e) + TargetRange point = new TargetRange(bs("c"), ByteString.EMPTY, false); + + target.mergeFrom(point); + + // Limit should remain unchanged since point is within range + assertEquals(bs("e"), target.limit); + } + + @Test + public void mergeFrom_pointBeforeStart_updatesStartKeepsLimit() { + TargetRange target = new TargetRange(bs("c"), bs("e"), false); + // Point at "a" which is before the start + TargetRange point = new TargetRange(bs("a"), ByteString.EMPTY, false); + + target.mergeFrom(point); + + assertEquals(bs("a"), target.start); + // Limit unchanged since point is before the range + assertEquals(bs("e"), target.limit); + } + + // ==================== mergeFrom Point into Point Tests ==================== + + @Test + public void mergeFrom_pointIntoPoint_smallerStart_extendsToIncludeBoth() { + TargetRange target = new TargetRange(bs("c"), ByteString.EMPTY, false); + TargetRange other = new TargetRange(bs("a"), ByteString.EMPTY, false); + + target.mergeFrom(other); + + assertEquals(bs("a"), target.start); + // Since target was a point (limit empty), and other.start < target.limit (empty), + // limit stays empty? Let's verify the logic... + // Actually: other.isPoint() && other.start >= this.limit + // If this.limit is empty, then other.start >= empty is always true (lexicographically) + // So limit becomes makePrefixSuccessor(other.start) + assertEquals(SsFormat.makePrefixSuccessor(bs("a")), target.limit); + } + + @Test + public void mergeFrom_pointIntoPoint_largerStart() { + TargetRange target = new TargetRange(bs("a"), ByteString.EMPTY, false); + TargetRange other = new TargetRange(bs("c"), ByteString.EMPTY, false); + + target.mergeFrom(other); + + assertEquals(bs("a"), target.start); + // other.isPoint() && other.start("c") >= target.limit(empty) is true + assertEquals(SsFormat.makePrefixSuccessor(bs("c")), target.limit); + } + + // ==================== mergeFrom Approximate Flag Tests ==================== + + @Test + public void mergeFrom_bothNotApproximate_resultNotApproximate() { + TargetRange target = new TargetRange(bs("a"), bs("c"), false); + TargetRange other = new TargetRange(bs("b"), bs("d"), false); + + target.mergeFrom(other); + + assertFalse(target.approximate); + } + + @Test + public void mergeFrom_targetApproximate_resultApproximate() { + TargetRange target = new TargetRange(bs("a"), bs("c"), true); + TargetRange other = new TargetRange(bs("b"), bs("d"), false); + + target.mergeFrom(other); + + assertTrue(target.approximate); + } + + @Test + public void mergeFrom_otherApproximate_resultApproximate() { + TargetRange target = new TargetRange(bs("a"), bs("c"), false); + TargetRange other = new TargetRange(bs("b"), bs("d"), true); + + target.mergeFrom(other); + + assertTrue(target.approximate); + } + + @Test + public void mergeFrom_bothApproximate_resultApproximate() { + TargetRange target = new TargetRange(bs("a"), bs("c"), true); + TargetRange other = new TargetRange(bs("b"), bs("d"), true); + + target.mergeFrom(other); + + assertTrue(target.approximate); + } + + // ==================== mergeFrom Combined Scenarios ==================== + + @Test + public void mergeFrom_disjointRanges_createsUnion() { + // [a, c) merged with [e, g) should give [a, g) + TargetRange target = new TargetRange(bs("a"), bs("c"), false); + TargetRange other = new TargetRange(bs("e"), bs("g"), false); + + target.mergeFrom(other); + + assertEquals(bs("a"), target.start); + assertEquals(bs("g"), target.limit); + } + + @Test + public void mergeFrom_overlappingRanges_createsUnion() { + // [a, d) merged with [c, f) should give [a, f) + TargetRange target = new TargetRange(bs("a"), bs("d"), false); + TargetRange other = new TargetRange(bs("c"), bs("f"), false); + + target.mergeFrom(other); + + assertEquals(bs("a"), target.start); + assertEquals(bs("f"), target.limit); + } + + @Test + public void mergeFrom_containedRange_keepsOuter() { + // [a, f) merged with [b, d) should give [a, f) + TargetRange target = new TargetRange(bs("a"), bs("f"), false); + TargetRange other = new TargetRange(bs("b"), bs("d"), false); + + target.mergeFrom(other); + + assertEquals(bs("a"), target.start); + assertEquals(bs("f"), target.limit); + } + + @Test + public void mergeFrom_multiplePoints_createsSpanningRange() { + // Start with point at "c", merge point at "a", then point at "e" + TargetRange target = new TargetRange(bs("c"), ByteString.EMPTY, false); + + target.mergeFrom(new TargetRange(bs("a"), ByteString.EMPTY, false)); + target.mergeFrom(new TargetRange(bs("e"), ByteString.EMPTY, false)); + + assertEquals(bs("a"), target.start); + assertEquals(SsFormat.makePrefixSuccessor(bs("e")), target.limit); + } +} diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpanner.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpanner.java index 8bff0851e13..e4c2ad5cd2d 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpanner.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpanner.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java index 1041bad9725..52926e09b5f 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/MockSpannerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientHttpJsonTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientHttpJsonTest.java index 236d7f9649a..0d7107aa5d1 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientHttpJsonTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientHttpJsonTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,7 @@ import com.google.protobuf.Timestamp; import com.google.rpc.Status; import com.google.spanner.v1.BatchCreateSessionsResponse; +import com.google.spanner.v1.CacheUpdate; import com.google.spanner.v1.CommitResponse; import com.google.spanner.v1.DatabaseName; import com.google.spanner.v1.DirectedReadOptions; @@ -56,6 +57,7 @@ import com.google.spanner.v1.ResultSet; import com.google.spanner.v1.ResultSetMetadata; import com.google.spanner.v1.ResultSetStats; +import com.google.spanner.v1.RoutingHint; import com.google.spanner.v1.Session; import com.google.spanner.v1.SessionName; import com.google.spanner.v1.Transaction; @@ -589,6 +591,7 @@ public void executeSqlTest() throws Exception { .addAllRows(new ArrayList()) .setStats(ResultSetStats.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -608,6 +611,7 @@ public void executeSqlTest() throws Exception { .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) .setLastStatement(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); ResultSet actualResponse = client.executeSql(request); @@ -652,6 +656,7 @@ public void executeSqlExceptionTest() throws Exception { .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) .setLastStatement(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); client.executeSql(request); Assert.fail("No exception raised"); @@ -743,6 +748,7 @@ public void readTest() throws Exception { .addAllRows(new ArrayList()) .setStats(ResultSetStats.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -761,6 +767,7 @@ public void readTest() throws Exception { .setRequestOptions(RequestOptions.newBuilder().build()) .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); ResultSet actualResponse = client.read(request); @@ -804,6 +811,7 @@ public void readExceptionTest() throws Exception { .setRequestOptions(RequestOptions.newBuilder().build()) .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); client.read(request); Assert.fail("No exception raised"); @@ -830,6 +838,7 @@ public void beginTransactionTest() throws Exception { .setId(ByteString.EMPTY) .setReadTimestamp(Timestamp.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -878,6 +887,7 @@ public void beginTransactionTest2() throws Exception { .setId(ByteString.EMPTY) .setReadTimestamp(Timestamp.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -928,6 +938,7 @@ public void commitTest() throws Exception { .setCommitTimestamp(Timestamp.newBuilder().build()) .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) .setSnapshotTimestamp(Timestamp.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -978,6 +989,7 @@ public void commitTest2() throws Exception { .setCommitTimestamp(Timestamp.newBuilder().build()) .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) .setSnapshotTimestamp(Timestamp.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1028,6 +1040,7 @@ public void commitTest3() throws Exception { .setCommitTimestamp(Timestamp.newBuilder().build()) .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) .setSnapshotTimestamp(Timestamp.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1080,6 +1093,7 @@ public void commitTest4() throws Exception { .setCommitTimestamp(Timestamp.newBuilder().build()) .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) .setSnapshotTimestamp(Timestamp.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java index 35ed41c0d86..9e3b86c91cd 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/v1/SpannerClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,6 +42,7 @@ import com.google.spanner.v1.BatchWriteRequest; import com.google.spanner.v1.BatchWriteResponse; import com.google.spanner.v1.BeginTransactionRequest; +import com.google.spanner.v1.CacheUpdate; import com.google.spanner.v1.CommitRequest; import com.google.spanner.v1.CommitResponse; import com.google.spanner.v1.CreateSessionRequest; @@ -69,6 +70,7 @@ import com.google.spanner.v1.ResultSetMetadata; import com.google.spanner.v1.ResultSetStats; import com.google.spanner.v1.RollbackRequest; +import com.google.spanner.v1.RoutingHint; import com.google.spanner.v1.Session; import com.google.spanner.v1.SessionName; import com.google.spanner.v1.Transaction; @@ -547,6 +549,7 @@ public void executeSqlTest() throws Exception { .addAllRows(new ArrayList()) .setStats(ResultSetStats.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); @@ -566,6 +569,7 @@ public void executeSqlTest() throws Exception { .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) .setLastStatement(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); ResultSet actualResponse = client.executeSql(request); @@ -589,6 +593,7 @@ public void executeSqlTest() throws Exception { Assert.assertEquals(request.getDirectedReadOptions(), actualRequest.getDirectedReadOptions()); Assert.assertEquals(request.getDataBoostEnabled(), actualRequest.getDataBoostEnabled()); Assert.assertEquals(request.getLastStatement(), actualRequest.getLastStatement()); + Assert.assertEquals(request.getRoutingHint(), actualRequest.getRoutingHint()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -617,6 +622,7 @@ public void executeSqlExceptionTest() throws Exception { .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) .setLastStatement(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); client.executeSql(request); Assert.fail("No exception raised"); @@ -636,6 +642,7 @@ public void executeStreamingSqlTest() throws Exception { .setStats(ResultSetStats.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) .setLast(true) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); ExecuteSqlRequest request = @@ -654,6 +661,7 @@ public void executeStreamingSqlTest() throws Exception { .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) .setLastStatement(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); @@ -687,6 +695,7 @@ public void executeStreamingSqlExceptionTest() throws Exception { .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) .setLastStatement(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); @@ -776,6 +785,7 @@ public void readTest() throws Exception { .addAllRows(new ArrayList()) .setStats(ResultSetStats.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); @@ -794,6 +804,7 @@ public void readTest() throws Exception { .setRequestOptions(RequestOptions.newBuilder().build()) .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); ResultSet actualResponse = client.read(request); @@ -817,6 +828,7 @@ public void readTest() throws Exception { Assert.assertEquals(request.getDataBoostEnabled(), actualRequest.getDataBoostEnabled()); Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); Assert.assertEquals(request.getLockHint(), actualRequest.getLockHint()); + Assert.assertEquals(request.getRoutingHint(), actualRequest.getRoutingHint()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -844,6 +856,7 @@ public void readExceptionTest() throws Exception { .setRequestOptions(RequestOptions.newBuilder().build()) .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); client.read(request); Assert.fail("No exception raised"); @@ -863,6 +876,7 @@ public void streamingReadTest() throws Exception { .setStats(ResultSetStats.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) .setLast(true) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); ReadRequest request = @@ -880,6 +894,7 @@ public void streamingReadTest() throws Exception { .setRequestOptions(RequestOptions.newBuilder().build()) .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); @@ -912,6 +927,7 @@ public void streamingReadExceptionTest() throws Exception { .setRequestOptions(RequestOptions.newBuilder().build()) .setDirectedReadOptions(DirectedReadOptions.newBuilder().build()) .setDataBoostEnabled(true) + .setRoutingHint(RoutingHint.newBuilder().build()) .build(); MockStreamObserver responseObserver = new MockStreamObserver<>(); @@ -937,6 +953,7 @@ public void beginTransactionTest() throws Exception { .setId(ByteString.EMPTY) .setReadTimestamp(Timestamp.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); @@ -980,6 +997,7 @@ public void beginTransactionTest2() throws Exception { .setId(ByteString.EMPTY) .setReadTimestamp(Timestamp.newBuilder().build()) .setPrecommitToken(MultiplexedSessionPrecommitToken.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); @@ -1023,6 +1041,7 @@ public void commitTest() throws Exception { .setCommitTimestamp(Timestamp.newBuilder().build()) .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) .setSnapshotTimestamp(Timestamp.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); @@ -1069,6 +1088,7 @@ public void commitTest2() throws Exception { .setCommitTimestamp(Timestamp.newBuilder().build()) .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) .setSnapshotTimestamp(Timestamp.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); @@ -1115,6 +1135,7 @@ public void commitTest3() throws Exception { .setCommitTimestamp(Timestamp.newBuilder().build()) .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) .setSnapshotTimestamp(Timestamp.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); @@ -1161,6 +1182,7 @@ public void commitTest4() throws Exception { .setCommitTimestamp(Timestamp.newBuilder().build()) .setCommitStats(CommitResponse.CommitStats.newBuilder().build()) .setSnapshotTimestamp(Timestamp.newBuilder().build()) + .setCacheUpdate(CacheUpdate.newBuilder().build()) .build(); mockSpanner.addResponse(expectedResponse); diff --git a/google-cloud-spanner/src/test/proto/finder_test.proto b/google-cloud-spanner/src/test/proto/finder_test.proto new file mode 100644 index 00000000000..3c3f1d8d299 --- /dev/null +++ b/google-cloud-spanner/src/test/proto/finder_test.proto @@ -0,0 +1,56 @@ +// Copyright 2026 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 spanner.cloud.location; + +import "google/spanner/v1/location.proto"; +import "google/spanner/v1/spanner.proto"; + +option java_multiple_files = true; + +message FinderTestCase { + string name = 1; + message Event { + // Name for the event, for diagnostic purposes. + string name = 1; + + // A cache update that should be applied to the `Finder` before calling + // `FindServer`. + google.spanner.v1.CacheUpdate cache_update = 2; + + // During `FindServer`, servers in the `unhealthy_servers` list should + // report false to `Server::IsHealthy`. + repeated string unhealthy_servers = 3; + + // The argument to pass to `FindServer` + oneof request { + google.spanner.v1.ReadRequest read = 4; + google.spanner.v1.ExecuteSqlRequest sql = 5; + } + + // The server that `FindServer` should return. If empty, `FindServer` + // should return null. + string server = 6; + + // The routing hint that should be filled in by `FindServer`. + google.spanner.v1.RoutingHint hint = 7; + } + repeated Event event = 2; +} + +message FinderTestCases { + repeated FinderTestCase test_case = 2; +} diff --git a/google-cloud-spanner/src/test/proto/range_cache_test.proto b/google-cloud-spanner/src/test/proto/range_cache_test.proto new file mode 100644 index 00000000000..a5accaf557f --- /dev/null +++ b/google-cloud-spanner/src/test/proto/range_cache_test.proto @@ -0,0 +1,75 @@ +// Copyright 2026 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 spanner.cloud.location; + +import "google/spanner/v1/location.proto"; +import "google/spanner/v1/spanner.proto"; + +option java_multiple_files = true; + +message RangeCacheTestCases { + repeated RangeCacheTestCase test_case = 1; +} + +message RangeCacheTestCase { + // Name of the test case, for diagnostic purposes. + string name = 1; + + // A single step in the test case. Each test starts with a newly constructed + // empty RangeCache, and runs one step at a time. + message Step { + // If present, the cache is updated with this CacheUpdate before running + // the tests below. + google.spanner.v1.CacheUpdate update = 1; + + // The tests then run one at a time. + message Test { + // If true, the test will be run with prefer_leader=true. Otherwise, + // prefer_leader will be false. + bool leader = 1; + + // If non-empty, the test will be run with this directed read options. + google.spanner.v1.DirectedReadOptions directed_read_options = 2; + + // key and limit_key are both optional, and if present, are copied into + // the routing hint passed to FillRoutingHint. + bytes key = 3; + bytes limit_key = 4; + + // The mode for RangeCache::RangeMode. + enum RangeMode { + COVERING_SPLIT = 0; + PICK_RANDOM = 1; + } + RangeMode range_mode = 5; + + // If set, overrides the default value of the + // --spanner_cloud_location_range_cache_min_entries_for_random_pick flag. + int32 min_cache_entries_for_random_pick = 6; + + // `result` should exactly match the routing hint after FillRoutingHint + // is called. + + google.spanner.v1.RoutingHint result = 7; + // If non-empty, then FillRoutingHint should return a server with this + // address. If empty, then FillRoutingHint should return nullptr. + string server = 8; + } + repeated Test test = 2; + } + repeated Step step = 2; +} diff --git a/google-cloud-spanner/src/test/proto/recipe_test.proto b/google-cloud-spanner/src/test/proto/recipe_test.proto new file mode 100644 index 00000000000..cb6f055eeb4 --- /dev/null +++ b/google-cloud-spanner/src/test/proto/recipe_test.proto @@ -0,0 +1,54 @@ +// Copyright 2026 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 spanner.cloud.location; + +import "google/protobuf/struct.proto"; +import "google/spanner/v1/keys.proto"; +import "google/spanner/v1/location.proto"; +import "google/spanner/v1/mutation.proto"; + +option java_multiple_files = true; + +// Proto definition for the textproto of tests. +message RecipeTestCases { + repeated RecipeTestCase test_case = 1; +} + +message RecipeTestCase { + // Name of the test case, for diagnostic purposes. + string name = 1; + + // A list of recipes to be used to evaluate the tests below. + google.spanner.v1.RecipeList recipes = 2; + + message Test { + // Each test encodes a single operation. + oneof operation { + google.protobuf.ListValue key = 1; + google.spanner.v1.KeyRange key_range = 2; + google.spanner.v1.KeySet key_set = 3; + google.spanner.v1.Mutation mutation = 4; + google.protobuf.Struct query_params = 5; + } + + // `start`, `limit`, and `approximate` are the expected results of encoding. + bytes start = 6; + bytes limit = 7; + bool approximate = 8; + } + repeated Test test = 3; +} diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql index 8125849bb2f..68c9297298f 100644 --- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql +++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql @@ -160,15 +160,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.530000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.530000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:17.951000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:17.951000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.530000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:17.951000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -506,15 +506,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; SET READ_ONLY_STALENESS='EXACT_STALENESS 10s'; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.651000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.651000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.067000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.067000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; SET READ_ONLY_STALENESS='EXACT_STALENESS 10s'; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.651000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.067000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -942,8 +942,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; ROLLBACK; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.738000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.738000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.165000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.165000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -953,7 +953,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; ROLLBACK; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.738000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.165000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -1450,8 +1450,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.854000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.854000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.265000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.265000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -1461,7 +1461,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.854000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.265000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -1860,15 +1860,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.959000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.959000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.347000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.347000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.959000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.347000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2223,14 +2223,14 @@ SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.029000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.418000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.029000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.418000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2576,13 +2576,13 @@ SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.116000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.495000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.116000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.495000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2882,14 +2882,14 @@ SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.239000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.239000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.566000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.566000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.239000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.566000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -3213,15 +3213,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.326000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.326000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.639000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.639000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.326000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.639000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -3626,8 +3626,8 @@ SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); RUN BATCH; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.393000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.393000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.697000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.697000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -3636,7 +3636,7 @@ START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); RUN BATCH; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.393000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.697000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4041,14 +4041,14 @@ SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.457000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.757000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.457000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.757000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4394,13 +4394,13 @@ SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.512000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.811000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.512000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.811000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4829,8 +4829,8 @@ SET TRANSACTION READ ONLY; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.570000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.570000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.864000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.864000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -4840,7 +4840,7 @@ SET TRANSACTION READ ONLY; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.570000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.864000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -5236,15 +5236,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET TRANSACTION READ ONLY; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.647000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.647000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.923000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.923000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET TRANSACTION READ ONLY; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.647000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.923000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -5585,15 +5585,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET READ_ONLY_STALENESS='EXACT_STALENESS 10s'; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.722000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.722000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.973000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.973000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET READ_ONLY_STALENESS='EXACT_STALENESS 10s'; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.722000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.973000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6028,8 +6028,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; ROLLBACK; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.809000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.809000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.027000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.027000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -6039,7 +6039,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; ROLLBACK; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.809000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.027000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6543,8 +6543,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.935000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.935000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.098000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.098000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -6554,7 +6554,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.935000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.098000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6955,15 +6955,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.013000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.013000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.162000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.162000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.013000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.162000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7322,14 +7322,14 @@ SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.080000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.214000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.080000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.214000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7680,13 +7680,13 @@ SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.147000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.277000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.147000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.277000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7995,14 +7995,14 @@ SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.215000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.215000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.335000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.335000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.215000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.335000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -8308,13 +8308,13 @@ SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.271000000Z'; +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.384000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.271000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.384000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -8665,8 +8665,8 @@ SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SET TRANSACTION READ ONLY; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.321000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.321000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.434000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.434000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -8674,7 +8674,7 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SET TRANSACTION READ ONLY; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.321000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.434000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -9108,8 +9108,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; UPDATE foo SET bar=1; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.378000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.378000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.490000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.490000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -9117,8 +9117,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; UPDATE foo SET bar=1; COMMIT; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.378000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.378000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.490000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.490000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -9500,15 +9500,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.441000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.441000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.550000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.550000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.441000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.550000000Z'; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -9858,15 +9858,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.495000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.495000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.600000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.600000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.495000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.495000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.600000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.600000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -10225,15 +10225,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; UPDATE foo SET bar=1; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.556000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.556000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.656000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.656000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; UPDATE foo SET bar=1; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.556000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.556000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.656000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.656000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -10622,16 +10622,16 @@ SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.613000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.613000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.715000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.715000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.613000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.613000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.715000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.715000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -11013,15 +11013,15 @@ NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.668000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.668000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.770000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.770000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.668000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.668000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.770000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.770000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -11350,14 +11350,14 @@ SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.722000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.722000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.824000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.824000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; SET AUTOCOMMIT=TRUE; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.722000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.722000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.824000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.824000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=FALSE; @@ -11676,15 +11676,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SET READ_ONLY_STALENESS='MAX_STALENESS 10s'; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.771000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.771000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.873000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.873000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SET READ_ONLY_STALENESS='MAX_STALENESS 10s'; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.771000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.771000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.873000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.873000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -12087,8 +12087,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.821000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.821000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.925000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.925000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -12096,8 +12096,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.821000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.821000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.925000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.925000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -12476,15 +12476,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.876000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.876000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.981000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.981000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.876000000Z'; +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.981000000Z'; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; @@ -12818,15 +12818,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.924000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.924000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:20.031000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:20.031000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.924000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.924000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:20.031000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:20.031000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -13169,15 +13169,15 @@ NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:01.002000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:01.002000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:20.085000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:20.085000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:01.002000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:01.002000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:20.085000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:20.085000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; @@ -13490,14 +13490,14 @@ SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; -SET READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:01.059000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:01.059000000Z' +SET READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:20.136000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:20.136000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; SET AUTOCOMMIT=TRUE; -SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:01.059000000Z'; -@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:01.059000000Z' +SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:20.136000000Z'; +@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:20.136000000Z' SHOW VARIABLE READ_ONLY_STALENESS; NEW_CONNECTION; SET READONLY=TRUE; diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql index 3c5c0a6b825..a5a6a01ada9 100644 --- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql +++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql @@ -11538,6 +11538,403 @@ NEW_CONNECTION; @EXPECT EXCEPTION UNIMPLEMENTED show variable transaction isolation/-level; NEW_CONNECTION; +show default_transaction_isolation; +NEW_CONNECTION; +SHOW DEFAULT_TRANSACTION_ISOLATION; +NEW_CONNECTION; +show default_transaction_isolation; +NEW_CONNECTION; + show default_transaction_isolation; +NEW_CONNECTION; + show default_transaction_isolation; +NEW_CONNECTION; + + + +show default_transaction_isolation; +NEW_CONNECTION; +show default_transaction_isolation ; +NEW_CONNECTION; +show default_transaction_isolation ; +NEW_CONNECTION; +show default_transaction_isolation + +; +NEW_CONNECTION; +show default_transaction_isolation; +NEW_CONNECTION; +show default_transaction_isolation; +NEW_CONNECTION; +show +default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation bar; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +%show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation%; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show%default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +_show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation_; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show_default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +&show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation&; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show&default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +$show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation$; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show$default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +@show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation@; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show@default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +!show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation!; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show!default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +*show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation*; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show*default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +(show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation(; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show(default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +)show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation); +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show)default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +-show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation-; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show-default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT ++show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation+; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show+default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation-#; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show-#default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +/show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation/; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show/default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +\show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation\; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show\default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +?show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation?; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show?default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation-/; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show-/default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation/#; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show/#default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-show default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show default_transaction_isolation/-; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show/-default_transaction_isolation; +NEW_CONNECTION; +show variable default_transaction_isolation; +NEW_CONNECTION; +SHOW VARIABLE DEFAULT_TRANSACTION_ISOLATION; +NEW_CONNECTION; +show variable default_transaction_isolation; +NEW_CONNECTION; + show variable default_transaction_isolation; +NEW_CONNECTION; + show variable default_transaction_isolation; +NEW_CONNECTION; + + + +show variable default_transaction_isolation; +NEW_CONNECTION; +show variable default_transaction_isolation ; +NEW_CONNECTION; +show variable default_transaction_isolation ; +NEW_CONNECTION; +show variable default_transaction_isolation + +; +NEW_CONNECTION; +show variable default_transaction_isolation; +NEW_CONNECTION; +show variable default_transaction_isolation; +NEW_CONNECTION; +show +variable +default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +foo show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation bar; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +%show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation%; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable%default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +_show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation_; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable_default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +&show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation&; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable&default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +$show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation$; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable$default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +@show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation@; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable@default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +!show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation!; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable!default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +*show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation*; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable*default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +(show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation(; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable(default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +)show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation); +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable)default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +-show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation-; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable-default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT ++show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation+; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable+default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +-#show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation-#; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable-#default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +/show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation/; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable/default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +\show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation\; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable\default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +?show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation?; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable?default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +-/show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation-/; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable-/default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +/#show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation/#; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable/#default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION INVALID_ARGUMENT +/-show variable default_transaction_isolation; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable default_transaction_isolation/-; +NEW_CONNECTION; +@EXPECT EXCEPTION UNIMPLEMENTED +show variable/-default_transaction_isolation; +NEW_CONNECTION; begin; NEW_CONNECTION; BEGIN; diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql index c6994c3b2d2..72f50037384 100644 --- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql +++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql @@ -160,15 +160,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.599000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.599000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.019000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.019000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.599000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.019000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -506,15 +506,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s'; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.692000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.692000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.115000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.115000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s'; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.692000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.115000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -942,8 +942,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; ROLLBACK; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.791000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.791000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.217000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.217000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -953,7 +953,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; ROLLBACK; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.791000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.217000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -1450,8 +1450,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.919000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.919000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.309000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.309000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -1461,7 +1461,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.919000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.309000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -1860,15 +1860,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:58.993000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:58.993000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.382000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.382000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:58.993000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.382000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2223,14 +2223,14 @@ SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.073000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.457000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.073000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.457000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2576,13 +2576,13 @@ SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.189000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.532000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.189000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.532000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -2882,14 +2882,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.278000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.278000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.593000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.593000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.278000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.593000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=FALSE; @@ -3213,15 +3213,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.359000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.359000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.668000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.668000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.359000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.668000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -3626,8 +3626,8 @@ SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); RUN BATCH; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.426000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.426000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.729000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.729000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -3636,7 +3636,7 @@ START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); RUN BATCH; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.426000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.729000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4041,14 +4041,14 @@ SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.484000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.785000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.484000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.785000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4394,13 +4394,13 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.538000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.837000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.538000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.837000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -4829,8 +4829,8 @@ SET TRANSACTION READ ONLY; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.614000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.614000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.895000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.895000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -4840,7 +4840,7 @@ SET TRANSACTION READ ONLY; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.614000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.895000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -5236,15 +5236,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET TRANSACTION READ ONLY; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.677000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.677000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.947000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.947000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET TRANSACTION READ ONLY; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.677000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.947000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -5585,15 +5585,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s'; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.766000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.766000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:18.998000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:18.998000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s'; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.766000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:18.998000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6028,8 +6028,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; ROLLBACK; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.864000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.864000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.059000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.059000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -6039,7 +6039,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; ROLLBACK; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.864000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.059000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6543,8 +6543,8 @@ BEGIN TRANSACTION; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:27:59.982000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:27:59.982000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.130000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.130000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -6554,7 +6554,7 @@ BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:27:59.982000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.130000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -6955,15 +6955,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.049000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.049000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.186000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.186000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.049000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.186000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7322,14 +7322,14 @@ SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.112000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.247000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.112000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.247000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7680,13 +7680,13 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.183000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.307000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; SELECT 1 AS TEST; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.183000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.307000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -7995,14 +7995,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.243000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.243000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.360000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.360000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.243000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.360000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=FALSE; @@ -8308,13 +8308,13 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.296000000Z'; +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.409000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; START BATCH DDL; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.296000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.409000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -8665,8 +8665,8 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SET TRANSACTION READ ONLY; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.346000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.346000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.459000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.459000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -8674,7 +8674,7 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SET TRANSACTION READ ONLY; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.346000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.459000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -9108,8 +9108,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; UPDATE foo SET bar=1; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.412000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.412000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.522000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.522000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -9117,8 +9117,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; UPDATE foo SET bar=1; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.412000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.412000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.522000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.522000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -9500,15 +9500,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.467000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.467000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.575000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.575000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.467000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.575000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @@ -9858,15 +9858,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.526000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.526000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.627000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.627000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id); -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.526000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.526000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.627000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.627000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -10225,15 +10225,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; UPDATE foo SET bar=1; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.585000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.585000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.683000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.683000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; UPDATE foo SET bar=1; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.585000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.585000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.683000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.683000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -10622,16 +10622,16 @@ SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.641000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.641000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.742000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.742000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; @EXPECT RESULT_SET 'TEST',1 SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.641000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.641000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.742000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.742000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -11013,15 +11013,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.695000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.695000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.797000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.797000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.695000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.695000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.797000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.797000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -11350,14 +11350,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.747000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.747000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.849000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.849000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; SET AUTOCOMMIT=TRUE; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.747000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.747000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.849000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.849000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=FALSE; @@ -11676,15 +11676,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SET SPANNER.READ_ONLY_STALENESS='MAX_STALENESS 10s'; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.795000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.795000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.898000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.898000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SET SPANNER.READ_ONLY_STALENESS='MAX_STALENESS 10s'; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.795000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.795000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.898000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.898000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -12087,8 +12087,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.849000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.849000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:19.954000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:19.954000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -12096,8 +12096,8 @@ SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; SELECT 1 AS TEST; COMMIT; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.849000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.849000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:19.954000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:19.954000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -12476,15 +12476,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.899000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.899000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:20.005000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:20.005000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; BEGIN TRANSACTION; @EXPECT EXCEPTION FAILED_PRECONDITION -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.899000000Z'; +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:20.005000000Z'; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; @@ -12818,15 +12818,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:00.950000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:00.950000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:20.057000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:20.057000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:00.950000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:00.950000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:20.057000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:20.057000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -13169,15 +13169,15 @@ NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:01.032000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:01.032000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:20.111000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:20.111000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; SELECT 1 AS TEST; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:01.032000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:01.032000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:20.111000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:20.111000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; @@ -13490,14 +13490,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; -SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2025-10-10T07:28:01.086000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2025-10-10T07:28:01.086000000Z' +SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2026-01-05T11:33:20.160000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2026-01-05T11:33:20.160000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; SET AUTOCOMMIT=TRUE; -SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2025-10-10T07:28:01.086000000Z'; -@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2025-10-10T07:28:01.086000000Z' +SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2026-01-05T11:33:20.160000000Z'; +@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2026-01-05T11:33:20.160000000Z' SHOW VARIABLE SPANNER.READ_ONLY_STALENESS; NEW_CONNECTION; SET SPANNER.READONLY=TRUE; diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/jmh/jmh-baseline.json b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/jmh/jmh-baseline.json index 7753f173ee0..fc05eb0016a 100644 --- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/jmh/jmh-baseline.json +++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/jmh/jmh-baseline.json @@ -5,7 +5,7 @@ { "percentile": "50.0", "baseline": "450", - "difference": "15" + "difference": "20" } ] }, @@ -14,7 +14,7 @@ { "percentile": "50.0", "baseline": "450", - "difference": "15" + "difference": "20" } ] } diff --git a/google-cloud-spanner/src/test/resources/finder_test.textproto b/google-cloud-spanner/src/test/resources/finder_test.textproto new file mode 100644 index 00000000000..5747c2aee0e --- /dev/null +++ b/google-cloud-spanner/src/test/resources/finder_test.textproto @@ -0,0 +1,10078 @@ +test_case { + name: "AllRows" + event { + name: "AllRows/0" + read { + session: "instances/default/databases/db15/sessions/Cj3BBOeD1dP3S66wHZkO00_A5Jv6pRbjR4ox3cktXTOs5bpIgRwIx6bn_QihOEOGGUqEAKU3o9rP5qcqhem-EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + all: true + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099527356417 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "AllRows/2" + read { + session: "instances/default/databases/db15/sessions/Cj3BBOeD1dP3S66wHZkO00_A5Jv6pRbjR4ox3cktXTOs5bpIgRwIx6bn_QihOEOGGUqEAKU3o9rP5qcqhem-EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + all: true + } + } + hint { + operation_uid: 1 + database_id: 1099527356417 + schema_generation: "\001\001" + key: "A\206\310\002" + limit_key: "A\206\310\003" + } + } + event { + cache_update { + database_id: 1099527356417 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 155189249 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317\364\207l" + } + group { + group_uid: 155189249 + tablets { + tablet_uid: 155189249 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\265" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t@\000\001" + } + key_recipes { + } + } + } + event { + name: "AllRows/4" + read { + session: "instances/default/databases/db15/sessions/Cj3BBOeD1dP3S66wHZkO00_A5Jv6pRbjR4ox3cktXTOs5bpIgRwIx6bn_QihOEOGGUqEAKU3o9rP5qcqhem-EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + all: true + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099527356417 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 155189249 + split_id: 14079378335067013120 + tablet_uid: 155189249 + } + } + event { + cache_update { + database_id: 1099527356417 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 155189249 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317\366E\014" + } + group { + group_uid: 155189249 + tablets { + tablet_uid: 155189249 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\265" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t@\000\001" + } + key_recipes { + } + } + } + event { + name: "AllRows/6" + read { + session: "instances/default/databases/db15/sessions/Cj3BBOeD1dP3S66wHZkO00_A5Jv6pRbjR4ox3cktXTOs5bpIgRwIx6bn_QihOEOGGUqEAKU3o9rP5qcqhem-EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + all: true + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099527356417 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 155189249 + split_id: 14079378335067013120 + tablet_uid: 155189249 + } + } + event { + cache_update { + database_id: 1099527356417 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 155189249 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317\366E\014" + } + group { + group_uid: 155189249 + tablets { + tablet_uid: 155189249 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\265" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t@\000\001" + } + key_recipes { + } + } + } +} +test_case { + name: "AllRows_Query" + event { + name: "AllRows_Query/0" + sql { + session: "instances/default/databases/db32/sessions/Cj0GojmEGR2hztX-uM5PHIWlsxPJCNXlqv0WGEwJaEEpQqxxDMvCPcsOzBlvYwUvgBO4B612WcYmbOzYYH8WEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T" + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099546230785 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 2 + } + } + } + } + } + event { + name: "AllRows_Query/2" + sql { + session: "instances/default/databases/db32/sessions/Cj0GojmEGR2hztX-uM5PHIWlsxPJCNXlqv0WGEwJaEEpQqxxDMvCPcsOzBlvYwUvgBO4B612WcYmbOzYYH8WEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T" + } + hint { + operation_uid: 1 + database_id: 1099546230785 + schema_generation: "\001\001" + key: "A\206\310\004" + } + } + event { + cache_update { + database_id: 1099546230785 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 277872641 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326\250#\026" + } + group { + group_uid: 277872641 + tablets { + tablet_uid: 277872641 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001\177" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\020\220\000\001" + } + key_recipes { + } + } + } + event { + name: "AllRows_Query/4" + sql { + session: "instances/default/databases/db32/sessions/Cj0GojmEGR2hztX-uM5PHIWlsxPJCNXlqv0WGEwJaEEpQqxxDMvCPcsOzBlvYwUvgBO4B612WcYmbOzYYH8WEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T" + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099546230785 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 277872641 + split_id: 14079378335067013120 + tablet_uid: 277872641 + } + } + event { + cache_update { + database_id: 1099546230785 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 277872641 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326\257X\261" + } + group { + group_uid: 277872641 + tablets { + tablet_uid: 277872641 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001\177" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\020\220\000\001" + } + key_recipes { + } + } + } + event { + name: "AllRows_Query/6" + sql { + session: "instances/default/databases/db32/sessions/Cj0GojmEGR2hztX-uM5PHIWlsxPJCNXlqv0WGEwJaEEpQqxxDMvCPcsOzBlvYwUvgBO4B612WcYmbOzYYH8WEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T" + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099546230785 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 277872641 + split_id: 14079378335067013120 + tablet_uid: 277872641 + } + } +} +test_case { + name: "DropDatabase" + event { + name: "DropDatabase/0" + read { + session: "instances/default/databases/db7/sessions/Cj0YdZkOhi1oPNIoTSIFvWggN4HPXnkgZ4pK1NcGXTEeUw8Fr-dTnvFKAeldTUxyzt1zTToerCe3T6XkSgAJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099517919233 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "DropDatabase/2" + read { + session: "instances/default/databases/db7/sessions/Cj0YdZkOhi1oPNIoTSIFvWggN4HPXnkgZ4pK1NcGXTEeUw8Fr-dTnvFKAeldTUxyzt1zTToerCe3T6XkSgAJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099517919233 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099517919233 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 95420417 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\314\260\211\000" + } + group { + group_uid: 95420417 + tablets { + tablet_uid: 95420417 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001r" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\005\260\000\001" + } + key_recipes { + } + } + } + event { + name: "DropDatabase/4" + read { + session: "instances/default/databases/db7/sessions/Cj0YdZkOhi1oPNIoTSIFvWggN4HPXnkgZ4pK1NcGXTEeUw8Fr-dTnvFKAeldTUxyzt1zTToerCe3T6XkSgAJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099517919233 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 95420417 + split_id: 14079378335067013120 + tablet_uid: 95420417 + } + } + event { + cache_update { + database_id: 1099517919233 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 95420417 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\314\267\020%" + } + group { + group_uid: 95420417 + tablets { + tablet_uid: 95420417 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001r" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\005\260\000\001" + } + key_recipes { + } + } + } + event { + name: "DropDatabase/6" + read { + session: "instances/default/databases/db7/sessions/Cj0YdZkOhi1oPNIoTSIFvWggN4HPXnkgZ4pK1NcGXTEeUw8Fr-dTnvFKAeldTUxyzt1zTToerCe3T6XkSgAJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099517919233 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 95420417 + split_id: 14079378335067013120 + tablet_uid: 95420417 + } + } + event { + name: "DropDatabase/7" + read { + session: "instances/default/databases/db7/sessions/Cj0YdZkOhi1oPNIoTSIFvWggN4HPXnkgZ4pK1NcGXTEeUw8Fr-dTnvFKAeldTUxyzt1zTToerCe3T6XkSgAJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099517919233 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 95420417 + split_id: 14079378335067013120 + tablet_uid: 95420417 + } + } + event { + name: "DropDatabase/8" + read { + session: "instances/default/databases/db7/sessions/Cj3TKzdKJxZRjiCmu4-t34VAf6hJX0jtVFwD_4r02LGDLemFeajxEvbL5uJRGI6n2tkzh90z28eBtGG4VMcoEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099517919233 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 95420417 + split_id: 14079378335067013120 + tablet_uid: 95420417 + } + } + event { + cache_update { + database_id: 1099518967809 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 101711873 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\316\230\264\322" + } + group { + group_uid: 101711873 + tablets { + tablet_uid: 101711873 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\201" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\006\020\000\001" + } + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "DropDatabase/10" + read { + session: "instances/default/databases/db7/sessions/Cj3TKzdKJxZRjiCmu4-t34VAf6hJX0jtVFwD_4r02LGDLemFeajxEvbL5uJRGI6n2tkzh90z28eBtGG4VMcoEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 2 + database_id: 1099518967809 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 101711873 + split_id: 14079378335067013120 + tablet_uid: 101711873 + } + } +} +test_case { + name: "DropDatabase_Query" + event { + name: "DropDatabase_Query/0" + sql { + session: "instances/default/databases/db24/sessions/CjzqkvN0XqNJI9149yzUSwfsCokOLsnhmDF8xt_O6U8cnWNvs1yXG4IZ_F3eDa-dooydAR1kFmsJuKR2MSQQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099536793601 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "DropDatabase_Query/2" + sql { + session: "instances/default/databases/db24/sessions/CjzqkvN0XqNJI9149yzUSwfsCokOLsnhmDF8xt_O6U8cnWNvs1yXG4IZ_F3eDa-dooydAR1kFmsJuKR2MSQQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099536793601 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099536793601 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 218103809 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\323T\204\035" + } + group { + group_uid: 218103809 + tablets { + tablet_uid: 218103809 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001<" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\r\000\000\001" + } + key_recipes { + } + } + } + event { + name: "DropDatabase_Query/4" + sql { + session: "instances/default/databases/db24/sessions/CjzqkvN0XqNJI9149yzUSwfsCokOLsnhmDF8xt_O6U8cnWNvs1yXG4IZ_F3eDa-dooydAR1kFmsJuKR2MSQQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099536793601 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 218103809 + split_id: 14079378335067013120 + tablet_uid: 218103809 + } + } + event { + cache_update { + database_id: 1099536793601 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 218103809 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\323T\204\035" + } + group { + group_uid: 218103809 + tablets { + tablet_uid: 218103809 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001<" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\r\000\000\001" + } + key_recipes { + } + } + } + event { + name: "DropDatabase_Query/6" + sql { + session: "instances/default/databases/db24/sessions/CjzqkvN0XqNJI9149yzUSwfsCokOLsnhmDF8xt_O6U8cnWNvs1yXG4IZ_F3eDa-dooydAR1kFmsJuKR2MSQQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099536793601 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 218103809 + split_id: 14079378335067013120 + tablet_uid: 218103809 + } + } + event { + name: "DropDatabase_Query/7" + sql { + session: "instances/default/databases/db24/sessions/CjzqkvN0XqNJI9149yzUSwfsCokOLsnhmDF8xt_O6U8cnWNvs1yXG4IZ_F3eDa-dooydAR1kFmsJuKR2MSQQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099536793601 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 218103809 + split_id: 14079378335067013120 + tablet_uid: 218103809 + } + } + event { + name: "DropDatabase_Query/8" + sql { + session: "instances/default/databases/db24/sessions/Cj1CH8Frp6VtAXaqx0Y5Fzu4KF_6PgC0lDACO5O72-XqeiRXqDXIKo2L7jDSwWFe-x0k3b7v-OtJeJ2t-j5CEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099536793601 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 218103809 + split_id: 14079378335067013120 + tablet_uid: 218103809 + } + } + event { + cache_update { + database_id: 1099537842177 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 224395265 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\3258X\350" + } + group { + group_uid: 224395265 + tablets { + tablet_uid: 224395265 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001K" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\r`\000\001" + } + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "DropDatabase_Query/10" + sql { + session: "instances/default/databases/db24/sessions/Cj1CH8Frp6VtAXaqx0Y5Fzu4KF_6PgC0lDACO5O72-XqeiRXqDXIKo2L7jDSwWFe-x0k3b7v-OtJeJ2t-j5CEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 2 + database_id: 1099537842177 + schema_generation: "\001\001" + } + } + event { + cache_update { + database_id: 1099537842177 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 2 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "DropDatabase_Query/12" + sql { + session: "instances/default/databases/db24/sessions/Cj1CH8Frp6VtAXaqx0Y5Fzu4KF_6PgC0lDACO5O72-XqeiRXqDXIKo2L7jDSwWFe-x0k3b7v-OtJeJ2t-j5CEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 2 + database_id: 1099537842177 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 224395265 + split_id: 14079378335067013120 + tablet_uid: 224395265 + } + } +} +test_case { + name: "DropTable" + event { + name: "DropTable/0" + read { + session: "instances/default/databases/db6/sessions/Cjzdj2emR5Db0EijIRbqxYXobPqHRRjWoXCeGyYAUU45Q8eaxOgVRwqLfrWMjgE7RsVjd1MExsPuARm0k1QQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099516870657 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "DropTable/2" + read { + session: "instances/default/databases/db6/sessions/Cjzdj2emR5Db0EijIRbqxYXobPqHRRjWoXCeGyYAUU45Q8eaxOgVRwqLfrWMjgE7RsVjd1MExsPuARm0k1QQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099516870657 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099516870657 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 94371841 + split_id: 14079378335067013121 + generation: "\007\006C\314\314-\203[\007\006C\314\314-\217F" + } + group { + group_uid: 94371841 + tablets { + tablet_uid: 94371841 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\001p" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\005\240\000\001" + } + key_recipes { + } + } + } + event { + name: "DropTable/4" + read { + session: "instances/default/databases/db6/sessions/Cjzdj2emR5Db0EijIRbqxYXobPqHRRjWoXCeGyYAUU45Q8eaxOgVRwqLfrWMjgE7RsVjd1MExsPuARm0k1QQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099516870657 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 94371841 + split_id: 14079378335067013121 + tablet_uid: 94371841 + } + } + event { + name: "DropTable/5" + read { + session: "instances/default/databases/db6/sessions/Cjzdj2emR5Db0EijIRbqxYXobPqHRRjWoXCeGyYAUU45Q8eaxOgVRwqLfrWMjgE7RsVjd1MExsPuARm0k1QQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099516870657 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 94371841 + split_id: 14079378335067013121 + tablet_uid: 94371841 + } + } + event { + name: "DropTable/6" + read { + session: "instances/default/databases/db6/sessions/Cjzdj2emR5Db0EijIRbqxYXobPqHRRjWoXCeGyYAUU45Q8eaxOgVRwqLfrWMjgE7RsVjd1MExsPuARm0k1QQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099516870657 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 94371841 + split_id: 14079378335067013121 + tablet_uid: 94371841 + } + } +} +test_case { + name: "DropTable_Query" + event { + name: "DropTable_Query/0" + sql { + session: "instances/default/databases/db23/sessions/CjwOqvrExRJDRJJdVo2gAssby75h0g7V10Y5ZxDHqv0YeWUWDGwTfharjGH6t73iqG5m4GXUfjpkqQRVPxsQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099535745025 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "DropTable_Query/2" + sql { + session: "instances/default/databases/db23/sessions/CjwOqvrExRJDRJJdVo2gAssby75h0g7V10Y5ZxDHqv0YeWUWDGwTfharjGH6t73iqG5m4GXUfjpkqQRVPxsQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099535745025 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099535745025 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 216006657 + split_id: 14079378335067013121 + generation: "\007\006C\314\322\316\342\373\007\006C\314\322\317\n\241" + } + group { + group_uid: 216006657 + tablets { + tablet_uid: 216006657 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001:" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\014\340\000\001" + } + key_recipes { + } + } + } + event { + name: "DropTable_Query/4" + sql { + session: "instances/default/databases/db23/sessions/CjwOqvrExRJDRJJdVo2gAssby75h0g7V10Y5ZxDHqv0YeWUWDGwTfharjGH6t73iqG5m4GXUfjpkqQRVPxsQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099535745025 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 216006657 + split_id: 14079378335067013121 + tablet_uid: 216006657 + } + } + event { + cache_update { + database_id: 1099535745025 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 216006657 + split_id: 14079378335067013121 + generation: "\007\006C\314\322\316\342\373\007\006C\314\322\323Z\315" + } + group { + group_uid: 216006657 + tablets { + tablet_uid: 216006657 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001:" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\014\340\000\001" + } + key_recipes { + } + } + } + event { + name: "DropTable_Query/6" + sql { + session: "instances/default/databases/db23/sessions/CjwOqvrExRJDRJJdVo2gAssby75h0g7V10Y5ZxDHqv0YeWUWDGwTfharjGH6t73iqG5m4GXUfjpkqQRVPxsQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099535745025 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 216006657 + split_id: 14079378335067013121 + tablet_uid: 216006657 + } + } + event { + name: "DropTable_Query/7" + sql { + session: "instances/default/databases/db23/sessions/CjwOqvrExRJDRJJdVo2gAssby75h0g7V10Y5ZxDHqv0YeWUWDGwTfharjGH6t73iqG5m4GXUfjpkqQRVPxsQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099535745025 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 216006657 + split_id: 14079378335067013121 + tablet_uid: 216006657 + } + } + event { + name: "DropTable_Query/8" + sql { + session: "instances/default/databases/db23/sessions/CjwOqvrExRJDRJJdVo2gAssby75h0g7V10Y5ZxDHqv0YeWUWDGwTfharjGH6t73iqG5m4GXUfjpkqQRVPxsQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099535745025 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 216006657 + split_id: 14079378335067013121 + tablet_uid: 216006657 + } + } + event { + cache_update { + database_id: 1099535745025 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 216006657 + split_id: 14079378335067013121 + generation: "\007\006C\314\322\316\342\373\007\006C\314\322\323Z\315" + } + group { + group_uid: 216006657 + tablets { + tablet_uid: 216006657 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001:" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\014\340\000\001" + } + key_recipes { + schema_generation: "\001\003" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 3 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "key" + } + } + } + } + } + event { + name: "DropTable_Query/10" + sql { + session: "instances/default/databases/db23/sessions/CjwOqvrExRJDRJJdVo2gAssby75h0g7V10Y5ZxDHqv0YeWUWDGwTfharjGH6t73iqG5m4GXUfjpkqQRVPxsQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099535745025 + schema_generation: "\001\003" + key: "A\206\310\006\234\221\000" + } + } + event { + cache_update { + database_id: 1099535745025 + range { + start_key: "A\206\310\002\234\2315\000x" + limit_key: "A\206\311" + group_uid: 217055233 + split_id: 14079378335067013121 + generation: "\007\006C\314\322\316\342\373\007\006C\314\322\317\n\241" + } + group { + group_uid: 217055233 + tablets { + tablet_uid: 217055233 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001;" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\014\360\000\001" + } + key_recipes { + } + } + } + event { + name: "DropTable_Query/12" + sql { + session: "instances/default/databases/db23/sessions/CjwOqvrExRJDRJJdVo2gAssby75h0g7V10Y5ZxDHqv0YeWUWDGwTfharjGH6t73iqG5m4GXUfjpkqQRVPxsQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099535745025 + schema_generation: "\001\003" + key: "A\206\310\002\234\2315\000x" + limit_key: "A\206\311" + group_uid: 217055233 + split_id: 14079378335067013121 + tablet_uid: 217055233 + } + } +} +test_case { + name: "GlobalIndex" + event { + name: "GlobalIndex/0" + read { + session: "instances/default/databases/db10/sessions/Cj2SfZKLzB4nnXuwwI1VKvjUXXTrygu1niE6w4W-OXraTsmoOUubuN4wizbc455aTUR5zoNDXT1KipdeF64TEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + index: "GlobalIndex" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0_0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099522113537 + key_recipes { + schema_generation: "\001\001" + recipe { + index_name: "GlobalIndex" + part { + tag: 50020 + } + part { + tag: 2 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "V0" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "GlobalIndex/2" + read { + session: "instances/default/databases/db10/sessions/Cj2SfZKLzB4nnXuwwI1VKvjUXXTrygu1niE6w4W-OXraTsmoOUubuN4wizbc455aTUR5zoNDXT1KipdeF64TEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + index: "GlobalIndex" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0_0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099522113537 + schema_generation: "\001\001" + key: "A\206\310\004\234\2310_0\000x" + limit_key: "A\206\310\004\234\2310_0\000y" + } + } + event { + cache_update { + database_id: 1099522113537 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 121634817 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317<\276\306" + } + group { + group_uid: 121634817 + tablets { + tablet_uid: 121634817 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\223" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\007@\000\001" + } + key_recipes { + } + } + } + event { + name: "GlobalIndex/4" + read { + session: "instances/default/databases/db10/sessions/Cj2SfZKLzB4nnXuwwI1VKvjUXXTrygu1niE6w4W-OXraTsmoOUubuN4wizbc455aTUR5zoNDXT1KipdeF64TEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + index: "GlobalIndex" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0_0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099522113537 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 121634817 + split_id: 14079378335067013120 + tablet_uid: 121634817 + } + } + event { + cache_update { + database_id: 1099522113537 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 121634817 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317>\330]" + } + group { + group_uid: 121634817 + tablets { + tablet_uid: 121634817 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\223" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\007@\000\001" + } + key_recipes { + } + } + } + event { + name: "GlobalIndex/6" + read { + session: "instances/default/databases/db10/sessions/Cj2SfZKLzB4nnXuwwI1VKvjUXXTrygu1niE6w4W-OXraTsmoOUubuN4wizbc455aTUR5zoNDXT1KipdeF64TEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + index: "GlobalIndex" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0_0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099522113537 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 121634817 + split_id: 14079378335067013120 + tablet_uid: 121634817 + } + } +} +test_case { + name: "GlobalIndex_Query" + event { + name: "GlobalIndex_Query/0" + sql { + session: "instances/default/databases/db27/sessions/Cj2j_zqkXN2mCtkbuUA7him868HfGm0ISHxO8OVhF7BawzQduQQE91KOAhYjolCxMK25z5Pkkss_6mBFsl6EEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T@{FORCE_INDEX=GlobalIndex} WHERE V0 = @v0" + params { + fields { + key: "v0" + value { + string_value: "0_0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099540987905 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 2 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "v0" + } + } + } + } + } + event { + name: "GlobalIndex_Query/2" + sql { + session: "instances/default/databases/db27/sessions/Cj2j_zqkXN2mCtkbuUA7him868HfGm0ISHxO8OVhF7BawzQduQQE91KOAhYjolCxMK25z5Pkkss_6mBFsl6EEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T@{FORCE_INDEX=GlobalIndex} WHERE V0 = @v0" + params { + fields { + key: "v0" + value { + string_value: "0_0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099540987905 + schema_generation: "\001\001" + key: "A\206\310\004\234\2310_0\000x" + } + } + event { + cache_update { + database_id: 1099540987905 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 244318209 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\325\373\036\334" + } + group { + group_uid: 244318209 + tablets { + tablet_uid: 244318209 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001_" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\016\220\000\001" + } + key_recipes { + } + } + } + event { + name: "GlobalIndex_Query/4" + sql { + session: "instances/default/databases/db27/sessions/Cj2j_zqkXN2mCtkbuUA7him868HfGm0ISHxO8OVhF7BawzQduQQE91KOAhYjolCxMK25z5Pkkss_6mBFsl6EEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T@{FORCE_INDEX=GlobalIndex} WHERE V0 = @v0" + params { + fields { + key: "v0" + value { + string_value: "0_0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099540987905 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 244318209 + split_id: 14079378335067013120 + tablet_uid: 244318209 + } + } + event { + cache_update { + database_id: 1099540987905 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 244318209 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\325\375\"\r" + } + group { + group_uid: 244318209 + tablets { + tablet_uid: 244318209 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001_" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\016\220\000\001" + } + key_recipes { + } + } + } + event { + name: "GlobalIndex_Query/6" + sql { + session: "instances/default/databases/db27/sessions/Cj2j_zqkXN2mCtkbuUA7him868HfGm0ISHxO8OVhF7BawzQduQQE91KOAhYjolCxMK25z5Pkkss_6mBFsl6EEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T@{FORCE_INDEX=GlobalIndex} WHERE V0 = @v0" + params { + fields { + key: "v0" + value { + string_value: "0_0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099540987905 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 244318209 + split_id: 14079378335067013120 + tablet_uid: 244318209 + } + } +} +test_case { + name: "GroupDeletion" + event { + name: "GroupDeletion/0" + read { + session: "instances/default/databases/db8/sessions/Cj2YTJ4-liCil_CTp2ldntWNe-Q1moGC2WmQds4wCmJl2G_XJKUi8wMd616zuX9h7ru-dDid2i4ez_62VO_FEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099520016385 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "GroupDeletion/2" + read { + session: "instances/default/databases/db8/sessions/Cj2YTJ4-liCil_CTp2ldntWNe-Q1moGC2WmQds4wCmJl2G_XJKUi8wMd616zuX9h7ru-dDid2i4ez_62VO_FEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099520016385 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099520016385 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 108003329 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\316\247-E" + } + group { + group_uid: 108003329 + tablets { + tablet_uid: 108003329 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\204" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\006p\000\001" + } + key_recipes { + } + } + } + event { + name: "GroupDeletion/4" + read { + session: "instances/default/databases/db8/sessions/Cj2YTJ4-liCil_CTp2ldntWNe-Q1moGC2WmQds4wCmJl2G_XJKUi8wMd616zuX9h7ru-dDid2i4ez_62VO_FEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099520016385 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 108003329 + split_id: 14079378335067013120 + tablet_uid: 108003329 + } + } + event { + cache_update { + database_id: 1099520016385 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 108003329 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\316\250\241\234" + } + group { + group_uid: 108003329 + tablets { + tablet_uid: 108003329 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\204" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\006p\000\001" + } + key_recipes { + } + } + } + event { + name: "GroupDeletion/6" + read { + session: "instances/default/databases/db8/sessions/Cj2YTJ4-liCil_CTp2ldntWNe-Q1moGC2WmQds4wCmJl2G_XJKUi8wMd616zuX9h7ru-dDid2i4ez_62VO_FEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099520016385 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 108003329 + split_id: 14079378335067013120 + tablet_uid: 108003329 + } + } + event { + name: "GroupDeletion/7" + read { + session: "instances/default/databases/db8/sessions/Cj2YTJ4-liCil_CTp2ldntWNe-Q1moGC2WmQds4wCmJl2G_XJKUi8wMd616zuX9h7ru-dDid2i4ez_62VO_FEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099520016385 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 108003329 + split_id: 14079378335067013120 + tablet_uid: 108003329 + } + } + event { + cache_update { + database_id: 1099520016385 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 114294785 + split_id: 14079378335067013124 + generation: "\007\006C\314\316\271~\231\007\006C\314\317\017\371\343" + } + group { + group_uid: 114294785 + tablets { + tablet_uid: 114294785 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\212" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\006\320\000\001" + } + key_recipes { + } + } + } + event { + name: "GroupDeletion/9" + read { + session: "instances/default/databases/db8/sessions/Cj2YTJ4-liCil_CTp2ldntWNe-Q1moGC2WmQds4wCmJl2G_XJKUi8wMd616zuX9h7ru-dDid2i4ez_62VO_FEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099520016385 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 114294785 + split_id: 14079378335067013124 + tablet_uid: 114294785 + } + } +} +test_case { + name: "GroupDeletion_Query" + event { + name: "GroupDeletion_Query/0" + sql { + session: "instances/default/databases/db25/sessions/CjzwZvNAsqeeS_4WyWSRcOTXyaGjdp8zV4mkj3qDu34yD2oxUb_znww6xxRwktfRVvNjgx_H0XP2um8W4WUQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099538890753 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "GroupDeletion_Query/2" + sql { + session: "instances/default/databases/db25/sessions/CjzwZvNAsqeeS_4WyWSRcOTXyaGjdp8zV4mkj3qDu34yD2oxUb_znww6xxRwktfRVvNjgx_H0XP2um8W4WUQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099538890753 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099538890753 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 230686721 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\325I\301\354" + } + group { + group_uid: 230686721 + tablets { + tablet_uid: 230686721 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001S" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\r\300\000\001" + } + key_recipes { + } + } + } + event { + name: "GroupDeletion_Query/4" + sql { + session: "instances/default/databases/db25/sessions/CjzwZvNAsqeeS_4WyWSRcOTXyaGjdp8zV4mkj3qDu34yD2oxUb_znww6xxRwktfRVvNjgx_H0XP2um8W4WUQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099538890753 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 230686721 + split_id: 14079378335067013120 + tablet_uid: 230686721 + } + } + event { + cache_update { + database_id: 1099538890753 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 230686721 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\325L\365\363" + } + group { + group_uid: 230686721 + tablets { + tablet_uid: 230686721 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001S" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\r\300\000\001" + } + key_recipes { + } + } + } + event { + name: "GroupDeletion_Query/6" + sql { + session: "instances/default/databases/db25/sessions/CjzwZvNAsqeeS_4WyWSRcOTXyaGjdp8zV4mkj3qDu34yD2oxUb_znww6xxRwktfRVvNjgx_H0XP2um8W4WUQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099538890753 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 230686721 + split_id: 14079378335067013120 + tablet_uid: 230686721 + } + } + event { + name: "GroupDeletion_Query/7" + sql { + session: "instances/default/databases/db25/sessions/CjzwZvNAsqeeS_4WyWSRcOTXyaGjdp8zV4mkj3qDu34yD2oxUb_znww6xxRwktfRVvNjgx_H0XP2um8W4WUQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099538890753 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 230686721 + split_id: 14079378335067013120 + tablet_uid: 230686721 + } + } + event { + cache_update { + database_id: 1099538890753 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 236978177 + split_id: 14079378335067013124 + generation: "\007\006C\314\325]\371r\007\006C\314\325\264y\234" + } + group { + group_uid: 236978177 + tablets { + tablet_uid: 236978177 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001V" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\016 \000\001" + } + key_recipes { + } + } + } + event { + name: "GroupDeletion_Query/9" + sql { + session: "instances/default/databases/db25/sessions/CjzwZvNAsqeeS_4WyWSRcOTXyaGjdp8zV4mkj3qDu34yD2oxUb_znww6xxRwktfRVvNjgx_H0XP2um8W4WUQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099538890753 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 236978177 + split_id: 14079378335067013124 + tablet_uid: 236978177 + } + } +} +test_case { + name: "Interleaved" + event { + name: "Interleaved/0" + read { + session: "instances/default/databases/db9/sessions/Cj159oUqLBjvyJBqNYV0pPwVz-a8ZuI6RNL-8C27MFNJ3faQKqSyzmgAttt98quBLgzWI-Z7RZAVzB2-RLz1EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "1" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099521064961 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "Interleaved" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + part { + tag: 5 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "Key2" + } + } + } + } + } + event { + name: "Interleaved/2" + read { + session: "instances/default/databases/db9/sessions/Cj159oUqLBjvyJBqNYV0pPwVz-a8ZuI6RNL-8C27MFNJ3faQKqSyzmgAttt98quBLgzWI-Z7RZAVzB2-RLz1EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "1" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099521064961 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x\n\234\221\002" + } + } + event { + cache_update { + database_id: 1099521064961 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 115343361 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317\"1\357" + } + group { + group_uid: 115343361 + tablets { + tablet_uid: 115343361 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\213" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\006\340\000\001" + } + key_recipes { + } + } + } + event { + name: "Interleaved/4" + read { + session: "instances/default/databases/db9/sessions/Cj159oUqLBjvyJBqNYV0pPwVz-a8ZuI6RNL-8C27MFNJ3faQKqSyzmgAttt98quBLgzWI-Z7RZAVzB2-RLz1EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "1" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099521064961 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 115343361 + split_id: 14079378335067013120 + tablet_uid: 115343361 + } + } + event { + cache_update { + database_id: 1099521064961 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 115343361 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317$\325\264" + } + group { + group_uid: 115343361 + tablets { + tablet_uid: 115343361 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\213" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\006\340\000\001" + } + key_recipes { + } + } + } + event { + name: "Interleaved/6" + read { + session: "instances/default/databases/db9/sessions/Cj159oUqLBjvyJBqNYV0pPwVz-a8ZuI6RNL-8C27MFNJ3faQKqSyzmgAttt98quBLgzWI-Z7RZAVzB2-RLz1EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "1" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099521064961 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 115343361 + split_id: 14079378335067013120 + tablet_uid: 115343361 + } + } +} +test_case { + name: "Interleaved_Query" + event { + name: "Interleaved_Query/0" + sql { + session: "instances/default/databases/db26/sessions/CjwmKo7LqIFOF3-EZMw7pN1t5FHbWltIzxNurAxOo4YsPhpFVXTxgna7VKVy7lRt0OLwuunlyBtMuQwEtrkQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved WHERE Key = @k AND Key2 = @k2" + params { + fields { + key: "k" + value { + string_value: "0" + } + } + fields { + key: "k2" + value { + string_value: "1" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099539939329 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + } + } + event { + name: "Interleaved_Query/2" + sql { + session: "instances/default/databases/db26/sessions/CjwmKo7LqIFOF3-EZMw7pN1t5FHbWltIzxNurAxOo4YsPhpFVXTxgna7VKVy7lRt0OLwuunlyBtMuQwEtrkQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved WHERE Key = @k AND Key2 = @k2" + params { + fields { + key: "k" + value { + string_value: "0" + } + } + fields { + key: "k2" + value { + string_value: "1" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099539939329 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099539939329 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 238026753 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\325\326%\352" + } + group { + group_uid: 238026753 + tablets { + tablet_uid: 238026753 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001X" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\0160\000\001" + } + key_recipes { + } + } + } + event { + name: "Interleaved_Query/4" + sql { + session: "instances/default/databases/db26/sessions/CjwmKo7LqIFOF3-EZMw7pN1t5FHbWltIzxNurAxOo4YsPhpFVXTxgna7VKVy7lRt0OLwuunlyBtMuQwEtrkQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved WHERE Key = @k AND Key2 = @k2" + params { + fields { + key: "k" + value { + string_value: "0" + } + } + fields { + key: "k2" + value { + string_value: "1" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099539939329 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 238026753 + split_id: 14079378335067013120 + tablet_uid: 238026753 + } + } + event { + cache_update { + database_id: 1099539939329 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 238026753 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\325\335\2640" + } + group { + group_uid: 238026753 + tablets { + tablet_uid: 238026753 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001X" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\0160\000\001" + } + key_recipes { + } + } + } + event { + name: "Interleaved_Query/6" + sql { + session: "instances/default/databases/db26/sessions/CjwmKo7LqIFOF3-EZMw7pN1t5FHbWltIzxNurAxOo4YsPhpFVXTxgna7VKVy7lRt0OLwuunlyBtMuQwEtrkQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved WHERE Key = @k AND Key2 = @k2" + params { + fields { + key: "k" + value { + string_value: "0" + } + } + fields { + key: "k2" + value { + string_value: "1" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099539939329 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 238026753 + split_id: 14079378335067013120 + tablet_uid: 238026753 + } + } +} +test_case { + name: "LocalIndex" + event { + name: "LocalIndex/0" + read { + session: "instances/default/databases/db11/sessions/Cj3NnaSUOiCKsnC8U3zeivYI8gzlBVS8qGYPTllITW3XwUhaR_wRK0U54FmFFaV3e3_aq2SgWEvGuKldsQaUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + index: "LocalIndex" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "0_1_4" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099523162113 + key_recipes { + schema_generation: "\001\001" + recipe { + index_name: "LocalIndex" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + part { + tag: 6 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "V4" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "Key2" + } + } + } + } + } + event { + name: "LocalIndex/2" + read { + session: "instances/default/databases/db11/sessions/Cj3NnaSUOiCKsnC8U3zeivYI8gzlBVS8qGYPTllITW3XwUhaR_wRK0U54FmFFaV3e3_aq2SgWEvGuKldsQaUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + index: "LocalIndex" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "0_1_4" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099523162113 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x\014\234\2310_1_4\000x" + limit_key: "A\206\310\002\234\2310\000x\014\234\2310_1_4\000y" + } + } + event { + cache_update { + database_id: 1099523162113 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 127926273 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317Q\246\337" + } + group { + group_uid: 127926273 + tablets { + tablet_uid: 127926273 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\230" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\007\240\000\001" + } + key_recipes { + } + } + } + event { + name: "LocalIndex/4" + read { + session: "instances/default/databases/db11/sessions/Cj3NnaSUOiCKsnC8U3zeivYI8gzlBVS8qGYPTllITW3XwUhaR_wRK0U54FmFFaV3e3_aq2SgWEvGuKldsQaUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + index: "LocalIndex" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "0_1_4" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099523162113 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 127926273 + split_id: 14079378335067013120 + tablet_uid: 127926273 + } + } + event { + cache_update { + database_id: 1099523162113 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 127926273 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317W\220p" + } + group { + group_uid: 127926273 + tablets { + tablet_uid: 127926273 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\230" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\007\240\000\001" + } + key_recipes { + } + } + } + event { + name: "LocalIndex/6" + read { + session: "instances/default/databases/db11/sessions/Cj3NnaSUOiCKsnC8U3zeivYI8gzlBVS8qGYPTllITW3XwUhaR_wRK0U54FmFFaV3e3_aq2SgWEvGuKldsQaUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + index: "LocalIndex" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "0_1_4" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099523162113 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 127926273 + split_id: 14079378335067013120 + tablet_uid: 127926273 + } + } +} +test_case { + name: "LocalIndex_Query" + event { + name: "LocalIndex_Query/0" + sql { + session: "instances/default/databases/db28/sessions/CjzP21cJKRNtIN_GWjr6wiMTSt8dYLIfFJy3h4u1li9PDKDHfIZN3YU1zJMe5FZ7DlnXumM88ezT_abQ4cIQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved@{FORCE_INDEX=LocalIndex} WHERE Key = @k AND V4 = @k2" + params { + fields { + key: "k" + value { + string_value: "0" + } + } + fields { + key: "k2" + value { + string_value: "0_1_4" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099542036481 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + } + } + event { + name: "LocalIndex_Query/2" + sql { + session: "instances/default/databases/db28/sessions/CjzP21cJKRNtIN_GWjr6wiMTSt8dYLIfFJy3h4u1li9PDKDHfIZN3YU1zJMe5FZ7DlnXumM88ezT_abQ4cIQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved@{FORCE_INDEX=LocalIndex} WHERE Key = @k AND V4 = @k2" + params { + fields { + key: "k" + value { + string_value: "0" + } + } + fields { + key: "k2" + value { + string_value: "0_1_4" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099542036481 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099542036481 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 250609665 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326\020^\316" + } + group { + group_uid: 250609665 + tablets { + tablet_uid: 250609665 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001d" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\016\360\000\001" + } + key_recipes { + } + } + } + event { + name: "LocalIndex_Query/4" + sql { + session: "instances/default/databases/db28/sessions/CjzP21cJKRNtIN_GWjr6wiMTSt8dYLIfFJy3h4u1li9PDKDHfIZN3YU1zJMe5FZ7DlnXumM88ezT_abQ4cIQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved@{FORCE_INDEX=LocalIndex} WHERE Key = @k AND V4 = @k2" + params { + fields { + key: "k" + value { + string_value: "0" + } + } + fields { + key: "k2" + value { + string_value: "0_1_4" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099542036481 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 250609665 + split_id: 14079378335067013120 + tablet_uid: 250609665 + } + } + event { + cache_update { + database_id: 1099542036481 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 250609665 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326\022\344\366" + } + group { + group_uid: 250609665 + tablets { + tablet_uid: 250609665 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001d" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\016\360\000\001" + } + key_recipes { + } + } + } + event { + name: "LocalIndex_Query/6" + sql { + session: "instances/default/databases/db28/sessions/CjzP21cJKRNtIN_GWjr6wiMTSt8dYLIfFJy3h4u1li9PDKDHfIZN3YU1zJMe5FZ7DlnXumM88ezT_abQ4cIQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved@{FORCE_INDEX=LocalIndex} WHERE Key = @k AND V4 = @k2" + params { + fields { + key: "k" + value { + string_value: "0" + } + } + fields { + key: "k2" + value { + string_value: "0_1_4" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099542036481 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 250609665 + split_id: 14079378335067013120 + tablet_uid: 250609665 + } + } +} +test_case { + name: "Merge" + event { + name: "Merge/0" + read { + session: "instances/default/databases/db5/sessions/Cjz7xOXhdnzM3xT1oBtjGhhBHXBGsxj63sYo7p6OcsysOczYU7KkRu_Uv63jH_R97AUzW8qTn9BgpgC5ncMQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099515822081 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "Merge/2" + read { + session: "instances/default/databases/db5/sessions/Cjz7xOXhdnzM3xT1oBtjGhhBHXBGsxj63sYo7p6OcsysOczYU7KkRu_Uv63jH_R97AUzW8qTn9BgpgC5ncMQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099515822081 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099515822081 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 78643201 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\313\356\324\233" + } + group { + group_uid: 78643201 + tablets { + tablet_uid: 78643201 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\001b" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\004\260\000\001" + } + key_recipes { + } + } + } + event { + name: "Merge/4" + read { + session: "instances/default/databases/db5/sessions/Cjz7xOXhdnzM3xT1oBtjGhhBHXBGsxj63sYo7p6OcsysOczYU7KkRu_Uv63jH_R97AUzW8qTn9BgpgC5ncMQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099515822081 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 78643201 + split_id: 14079378335067013120 + tablet_uid: 78643201 + } + } + event { + name: "Merge/5" + read { + session: "instances/default/databases/db5/sessions/Cjz7xOXhdnzM3xT1oBtjGhhBHXBGsxj63sYo7p6OcsysOczYU7KkRu_Uv63jH_R97AUzW8qTn9BgpgC5ncMQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099515822081 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 78643201 + split_id: 14079378335067013120 + tablet_uid: 78643201 + } + } + event { + cache_update { + database_id: 1099515822081 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 85983233 + split_id: 14079378335067013121 + generation: "\007\006C\314\313\377\336@\007\006C\314\313\377\360\270" + } + range { + start_key: "A\206\310\002\234\2315\000x" + limit_key: "A\206\311" + group_uid: 84934657 + split_id: 14079378335067013121 + generation: "\007\006C\314\313\377\336@\007\006C\314\313\377\360\270" + } + group { + group_uid: 85983233 + tablets { + tablet_uid: 85983233 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\001i" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\005 \000\001" + } + group { + group_uid: 84934657 + tablets { + tablet_uid: 84934657 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\001h" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\005\020\000\001" + } + key_recipes { + } + } + } + event { + name: "Merge/7" + read { + session: "instances/default/databases/db5/sessions/Cjz7xOXhdnzM3xT1oBtjGhhBHXBGsxj63sYo7p6OcsysOczYU7KkRu_Uv63jH_R97AUzW8qTn9BgpgC5ncMQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099515822081 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 85983233 + split_id: 14079378335067013121 + tablet_uid: 85983233 + } + } + event { + name: "Merge/8" + read { + session: "instances/default/databases/db5/sessions/Cjz7xOXhdnzM3xT1oBtjGhhBHXBGsxj63sYo7p6OcsysOczYU7KkRu_Uv63jH_R97AUzW8qTn9BgpgC5ncMQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "6" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099515822081 + schema_generation: "\001\001" + key: "A\206\310\002\234\2315\000x" + limit_key: "A\206\311" + group_uid: 84934657 + split_id: 14079378335067013121 + tablet_uid: 84934657 + } + } + event { + name: "Merge/9" + read { + session: "instances/default/databases/db5/sessions/Cjz7xOXhdnzM3xT1oBtjGhhBHXBGsxj63sYo7p6OcsysOczYU7KkRu_Uv63jH_R97AUzW8qTn9BgpgC5ncMQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099515822081 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 85983233 + split_id: 14079378335067013121 + tablet_uid: 85983233 + } + } + event { + cache_update { + database_id: 1099515822081 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 85983233 + split_id: 14079378335067013123 + generation: "\007\006C\314\314\003\324\213\007\006C\314\314\003\334\212" + } + group { + group_uid: 85983233 + tablets { + tablet_uid: 85983233 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\001i" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\005 \000\001" + } + key_recipes { + } + } + } + event { + name: "Merge/11" + read { + session: "instances/default/databases/db5/sessions/Cjz7xOXhdnzM3xT1oBtjGhhBHXBGsxj63sYo7p6OcsysOczYU7KkRu_Uv63jH_R97AUzW8qTn9BgpgC5ncMQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099515822081 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 85983233 + split_id: 14079378335067013123 + tablet_uid: 85983233 + } + } + event { + name: "Merge/12" + read { + session: "instances/default/databases/db5/sessions/Cjz7xOXhdnzM3xT1oBtjGhhBHXBGsxj63sYo7p6OcsysOczYU7KkRu_Uv63jH_R97AUzW8qTn9BgpgC5ncMQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "6" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099515822081 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 85983233 + split_id: 14079378335067013123 + tablet_uid: 85983233 + } + } +} +test_case { + name: "Merge_Query" + event { + name: "Merge_Query/0" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099534696449 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "Merge_Query/2" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099534696449 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099534696449 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 201326593 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\3229\235\n" + } + group { + group_uid: 201326593 + tablets { + tablet_uid: 201326593 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\002\001," + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\014\000\000\001" + } + key_recipes { + } + } + } + event { + name: "Merge_Query/4" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099534696449 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 201326593 + split_id: 14079378335067013120 + tablet_uid: 201326593 + } + } + event { + name: "Merge_Query/5" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099534696449 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 201326593 + split_id: 14079378335067013120 + tablet_uid: 201326593 + } + } + event { + cache_update { + database_id: 1099534696449 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 207618049 + split_id: 14079378335067013121 + generation: "\007\006C\314\322\234*\275\007\006C\314\322\2345\351" + } + range { + start_key: "A\206\310\002\234\2315\000x" + limit_key: "A\206\311" + group_uid: 208666625 + split_id: 14079378335067013121 + generation: "\007\006C\314\322\234*\275\007\006C\314\322\2345\351" + } + group { + group_uid: 207618049 + tablets { + tablet_uid: 207618049 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\002\0012" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\014`\000\001" + } + group { + group_uid: 208666625 + tablets { + tablet_uid: 208666625 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\0013" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\014p\000\001" + } + key_recipes { + } + } + } + event { + name: "Merge_Query/7" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099534696449 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 207618049 + split_id: 14079378335067013121 + tablet_uid: 207618049 + } + } + event { + name: "Merge_Query/8" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "6" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099534696449 + schema_generation: "\001\001" + key: "A\206\310\002\234\2315\000x" + limit_key: "A\206\311" + group_uid: 208666625 + split_id: 14079378335067013121 + tablet_uid: 208666625 + } + } + event { + cache_update { + database_id: 1099534696449 + range { + start_key: "A\206\310\002\234\2315\000x" + limit_key: "A\206\311" + group_uid: 208666625 + split_id: 14079378335067013121 + generation: "\007\006C\314\322\234*\275\007\006C\314\322\235\007\356" + } + group { + group_uid: 208666625 + tablets { + tablet_uid: 208666625 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\0013" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\014p\000\001" + } + key_recipes { + } + } + } + event { + name: "Merge_Query/10" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "6" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099534696449 + schema_generation: "\001\001" + key: "A\206\310\002\234\2315\000x" + limit_key: "A\206\311" + group_uid: 208666625 + split_id: 14079378335067013121 + tablet_uid: 208666625 + } + } + event { + name: "Merge_Query/11" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099534696449 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2315\000x" + group_uid: 207618049 + split_id: 14079378335067013121 + tablet_uid: 207618049 + } + } + event { + cache_update { + database_id: 1099534696449 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 207618049 + split_id: 14079378335067013123 + generation: "\007\006C\314\322\2435a\007\006C\314\322\243C\004" + } + group { + group_uid: 207618049 + tablets { + tablet_uid: 207618049 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\002\0012" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\014`\000\001" + } + key_recipes { + } + } + } + event { + name: "Merge_Query/13" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099534696449 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 207618049 + split_id: 14079378335067013123 + tablet_uid: 207618049 + } + } + event { + name: "Merge_Query/14" + sql { + session: "instances/default/databases/db22/sessions/Cj1iKobFlHIjFAAFmyl3O7-THtK7-TS4hiAm_v9p0ablflCYr9WEbYn0QSEVHUPKxTdHd7OxkQh5CPryVaIjEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "6" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099534696449 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 207618049 + split_id: 14079378335067013123 + tablet_uid: 207618049 + } + } +} +test_case { + name: "MixedQueryShapes" + event { + name: "MixedQueryShapes/0" + sql { + session: "instances/default/databases/db35/sessions/Cj1r5FdH5G6JlOfKUeNpQyDVAAIHtV3iukgB0FHLjQk9hiuK_K0e4iIsIE2ujs9fpktU9gs73sMb09dyQaxzEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key = \'0\'" + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099549376513 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + value { + string_value: "0" + } + } + } + } + } + } + event { + name: "MixedQueryShapes/2" + sql { + session: "instances/default/databases/db35/sessions/Cj1r5FdH5G6JlOfKUeNpQyDVAAIHtV3iukgB0FHLjQk9hiuK_K0e4iIsIE2ujs9fpktU9gs73sMb09dyQaxzEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key = \'0\'" + } + hint { + operation_uid: 1 + database_id: 1099549376513 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099549376513 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 298844161 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\327\014\177\223" + } + group { + group_uid: 298844161 + tablets { + tablet_uid: 298844161 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\002\001\222" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\021\320\000\001" + } + key_recipes { + } + } + } + event { + name: "MixedQueryShapes/4" + sql { + session: "instances/default/databases/db35/sessions/Cj1r5FdH5G6JlOfKUeNpQyDVAAIHtV3iukgB0FHLjQk9hiuK_K0e4iIsIE2ujs9fpktU9gs73sMb09dyQaxzEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key = \'0\'" + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099549376513 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 298844161 + split_id: 14079378335067013120 + tablet_uid: 298844161 + } + } + event { + name: "MixedQueryShapes/5" + sql { + session: "instances/default/databases/db35/sessions/Cj1r5FdH5G6JlOfKUeNpQyDVAAIHtV3iukgB0FHLjQk9hiuK_K0e4iIsIE2ujs9fpktU9gs73sMb09dyQaxzEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1 FROM T WHERE Key = \'0\'" + } + hint { + operation_uid: 2 + database_id: 1099549376513 + schema_generation: "\001\001" + } + } + event { + cache_update { + database_id: 1099549376513 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 2 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + value { + string_value: "0" + } + } + } + } + } + } + event { + name: "MixedQueryShapes/7" + sql { + session: "instances/default/databases/db35/sessions/Cj1r5FdH5G6JlOfKUeNpQyDVAAIHtV3iukgB0FHLjQk9hiuK_K0e4iIsIE2ujs9fpktU9gs73sMb09dyQaxzEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1 FROM T WHERE Key = \'0\'" + } + server: "localhost:15000" + hint { + operation_uid: 2 + database_id: 1099549376513 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 298844161 + split_id: 14079378335067013120 + tablet_uid: 298844161 + } + } + event { + name: "MixedQueryShapes/8" + sql { + session: "instances/default/databases/db35/sessions/Cj1r5FdH5G6JlOfKUeNpQyDVAAIHtV3iukgB0FHLjQk9hiuK_K0e4iIsIE2ujs9fpktU9gs73sMb09dyQaxzEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T@{FORCE_INDEX=GlobalIndex} WHERE V0 = \'0_0\'" + } + hint { + operation_uid: 3 + database_id: 1099549376513 + schema_generation: "\001\001" + } + } + event { + cache_update { + database_id: 1099549376513 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 3 + part { + tag: 50020 + } + part { + tag: 2 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + value { + string_value: "0_0" + } + } + } + } + } + } + event { + name: "MixedQueryShapes/10" + sql { + session: "instances/default/databases/db35/sessions/Cj1r5FdH5G6JlOfKUeNpQyDVAAIHtV3iukgB0FHLjQk9hiuK_K0e4iIsIE2ujs9fpktU9gs73sMb09dyQaxzEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T@{FORCE_INDEX=GlobalIndex} WHERE V0 = \'0_0\'" + } + server: "localhost:15000" + hint { + operation_uid: 3 + database_id: 1099549376513 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 298844161 + split_id: 14079378335067013120 + tablet_uid: 298844161 + } + } + event { + name: "MixedQueryShapes/11" + sql { + session: "instances/default/databases/db35/sessions/Cj1r5FdH5G6JlOfKUeNpQyDVAAIHtV3iukgB0FHLjQk9hiuK_K0e4iIsIE2ujs9fpktU9gs73sMb09dyQaxzEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved WHERE Key = \'0\' AND Key2 = 1" + } + hint { + operation_uid: 4 + database_id: 1099549376513 + schema_generation: "\001\001" + } + } + event { + cache_update { + database_id: 1099549376513 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 4 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + value { + string_value: "0" + } + } + } + } + } + } + event { + name: "MixedQueryShapes/13" + sql { + session: "instances/default/databases/db35/sessions/Cj1r5FdH5G6JlOfKUeNpQyDVAAIHtV3iukgB0FHLjQk9hiuK_K0e4iIsIE2ujs9fpktU9gs73sMb09dyQaxzEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, Key2, V4 FROM Interleaved WHERE Key = \'0\' AND Key2 = 1" + } + server: "localhost:15000" + hint { + operation_uid: 4 + database_id: 1099549376513 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 298844161 + split_id: 14079378335067013120 + tablet_uid: 298844161 + } + } +} +test_case { + name: "MixedReadShapes" + event { + name: "MixedReadShapes/0" + read { + session: "instances/default/databases/db17/sessions/Cj11_K9Nwx32LGYbrWvyBBlWBUSPqjqsdLosEGdpzdOE2DuNonsyrDc4SAlBK3h5RDil8VD_xWE-0dpVmdBwEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099529453569 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "MixedReadShapes/2" + read { + session: "instances/default/databases/db17/sessions/Cj11_K9Nwx32LGYbrWvyBBlWBUSPqjqsdLosEGdpzdOE2DuNonsyrDc4SAlBK3h5RDil8VD_xWE-0dpVmdBwEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099529453569 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099529453569 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 167772161 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320\030\004\243" + } + group { + group_uid: 167772161 + tablets { + tablet_uid: 167772161 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\277" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\n\000\000\001" + } + key_recipes { + } + } + } + event { + name: "MixedReadShapes/4" + read { + session: "instances/default/databases/db17/sessions/Cj11_K9Nwx32LGYbrWvyBBlWBUSPqjqsdLosEGdpzdOE2DuNonsyrDc4SAlBK3h5RDil8VD_xWE-0dpVmdBwEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099529453569 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 167772161 + split_id: 14079378335067013120 + tablet_uid: 167772161 + } + } + event { + cache_update { + database_id: 1099529453569 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 167772161 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320\032\370j" + } + group { + group_uid: 167772161 + tablets { + tablet_uid: 167772161 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\277" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\n\000\000\001" + } + key_recipes { + } + } + } + event { + name: "MixedReadShapes/6" + read { + session: "instances/default/databases/db17/sessions/Cj11_K9Nwx32LGYbrWvyBBlWBUSPqjqsdLosEGdpzdOE2DuNonsyrDc4SAlBK3h5RDil8VD_xWE-0dpVmdBwEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099529453569 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 167772161 + split_id: 14079378335067013120 + tablet_uid: 167772161 + } + } + event { + name: "MixedReadShapes/7" + read { + session: "instances/default/databases/db17/sessions/Cj11_K9Nwx32LGYbrWvyBBlWBUSPqjqsdLosEGdpzdOE2DuNonsyrDc4SAlBK3h5RDil8VD_xWE-0dpVmdBwEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 2 + database_id: 1099529453569 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 167772161 + split_id: 14079378335067013120 + tablet_uid: 167772161 + } + } + event { + name: "MixedReadShapes/8" + read { + session: "instances/default/databases/db17/sessions/Cj11_K9Nwx32LGYbrWvyBBlWBUSPqjqsdLosEGdpzdOE2DuNonsyrDc4SAlBK3h5RDil8VD_xWE-0dpVmdBwEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + index: "GlobalIndex" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0_0" + } + } + } + } + hint { + operation_uid: 3 + database_id: 1099529453569 + schema_generation: "\001\001" + } + } + event { + cache_update { + database_id: 1099529453569 + key_recipes { + schema_generation: "\001\001" + recipe { + index_name: "GlobalIndex" + part { + tag: 50020 + } + part { + tag: 2 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "V0" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "MixedReadShapes/10" + read { + session: "instances/default/databases/db17/sessions/Cj11_K9Nwx32LGYbrWvyBBlWBUSPqjqsdLosEGdpzdOE2DuNonsyrDc4SAlBK3h5RDil8VD_xWE-0dpVmdBwEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + index: "GlobalIndex" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0_0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 3 + database_id: 1099529453569 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 167772161 + split_id: 14079378335067013120 + tablet_uid: 167772161 + } + } + event { + name: "MixedReadShapes/11" + read { + session: "instances/default/databases/db17/sessions/Cj11_K9Nwx32LGYbrWvyBBlWBUSPqjqsdLosEGdpzdOE2DuNonsyrDc4SAlBK3h5RDil8VD_xWE-0dpVmdBwEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "1" + } + } + } + } + hint { + operation_uid: 4 + database_id: 1099529453569 + schema_generation: "\001\001" + } + } + event { + cache_update { + database_id: 1099529453569 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "Interleaved" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + part { + tag: 5 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "Key2" + } + } + } + } + } + event { + name: "MixedReadShapes/13" + read { + session: "instances/default/databases/db17/sessions/Cj11_K9Nwx32LGYbrWvyBBlWBUSPqjqsdLosEGdpzdOE2DuNonsyrDc4SAlBK3h5RDil8VD_xWE-0dpVmdBwEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "Interleaved" + columns: "Key" + columns: "Key2" + columns: "V4" + key_set { + keys { + values { + string_value: "0" + } + values { + string_value: "1" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 4 + database_id: 1099529453569 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 167772161 + split_id: 14079378335067013120 + tablet_uid: 167772161 + } + } +} +test_case { + name: "MultiPointQuery" + event { + name: "MultiPointQuery/0" + sql { + session: "instances/default/databases/db34/sessions/Cj1JEf_BWyeFh30JH_mbDYbGaUpAOVs2cu9NlDhT_gSLxCxvtNLzu5lDhZHUfV_f_IFjIiWfJp0YIuz9Rgk-EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key IN (\'0\', \'1\', \'2\')" + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099548327937 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + value { + string_value: "0" + } + } + } + } + } + } + event { + name: "MultiPointQuery/2" + sql { + session: "instances/default/databases/db34/sessions/Cj1JEf_BWyeFh30JH_mbDYbGaUpAOVs2cu9NlDhT_gSLxCxvtNLzu5lDhZHUfV_f_IFjIiWfJp0YIuz9Rgk-EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key IN (\'0\', \'1\', \'2\')" + } + hint { + operation_uid: 1 + database_id: 1099548327937 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099548327937 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 292552705 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326\362\241\323" + } + group { + group_uid: 292552705 + tablets { + tablet_uid: 292552705 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\002\001\214" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\021p\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiPointQuery/4" + sql { + session: "instances/default/databases/db34/sessions/Cj1JEf_BWyeFh30JH_mbDYbGaUpAOVs2cu9NlDhT_gSLxCxvtNLzu5lDhZHUfV_f_IFjIiWfJp0YIuz9Rgk-EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key IN (\'0\', \'1\', \'2\')" + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099548327937 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 292552705 + split_id: 14079378335067013120 + tablet_uid: 292552705 + } + } +} +test_case { + name: "MultiPointRead" + event { + name: "MultiPointRead/0" + read { + session: "instances/default/databases/db16/sessions/Cj1lBesOACZy5M0-XNPQK3sZKjFljpivNOp5UkVksA4i-P5_UszGIn1x3kLVQTGhWk3mC-vv0bTwS-RhC6JqEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0" + } + } + keys { + values { + string_value: "1" + } + } + keys { + values { + string_value: "2" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099528404993 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "MultiPointRead/2" + read { + session: "instances/default/databases/db16/sessions/Cj1lBesOACZy5M0-XNPQK3sZKjFljpivNOp5UkVksA4i-P5_UszGIn1x3kLVQTGhWk3mC-vv0bTwS-RhC6JqEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0" + } + } + keys { + values { + string_value: "1" + } + } + keys { + values { + string_value: "2" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099528404993 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + limit_key: "A\206\310\002\234\2312\000y" + } + } + event { + cache_update { + database_id: 1099528404993 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 161480705 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320\0077\344" + } + group { + group_uid: 161480705 + tablets { + tablet_uid: 161480705 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\272" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t\240\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiPointRead/4" + read { + session: "instances/default/databases/db16/sessions/Cj1lBesOACZy5M0-XNPQK3sZKjFljpivNOp5UkVksA4i-P5_UszGIn1x3kLVQTGhWk3mC-vv0bTwS-RhC6JqEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0" + } + } + keys { + values { + string_value: "1" + } + } + keys { + values { + string_value: "2" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099528404993 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 161480705 + split_id: 14079378335067013120 + tablet_uid: 161480705 + } + } + event { + cache_update { + database_id: 1099528404993 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 161480705 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320\010?\"" + } + group { + group_uid: 161480705 + tablets { + tablet_uid: 161480705 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\272" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t\240\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiPointRead/6" + read { + session: "instances/default/databases/db16/sessions/Cj1lBesOACZy5M0-XNPQK3sZKjFljpivNOp5UkVksA4i-P5_UszGIn1x3kLVQTGhWk3mC-vv0bTwS-RhC6JqEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + keys { + values { + string_value: "0" + } + } + keys { + values { + string_value: "1" + } + } + keys { + values { + string_value: "2" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099528404993 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 161480705 + split_id: 14079378335067013120 + tablet_uid: 161480705 + } + } + event { + cache_update { + database_id: 1099528404993 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 161480705 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320\010?\"" + } + group { + group_uid: 161480705 + tablets { + tablet_uid: 161480705 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\272" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t\240\000\001" + } + key_recipes { + } + } + } +} +test_case { + name: "MultiSplitRangeQuery" + event { + name: "MultiSplitRangeQuery/0" + sql { + session: "instances/default/databases/db31/sessions/Cj26cAs4RD17PnwartOnEP5weRuWeJiGsWyw0p_woAWpI-qkh_vsgPdD99_nQRZyD9Ysr_UQGP1_b5NtZb-OEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099545182209 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "start" + } + } + } + } + } + event { + name: "MultiSplitRangeQuery/2" + sql { + session: "instances/default/databases/db31/sessions/Cj26cAs4RD17PnwartOnEP5weRuWeJiGsWyw0p_woAWpI-qkh_vsgPdD99_nQRZyD9Ysr_UQGP1_b5NtZb-OEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099545182209 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099545182209 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 269484033 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326\207\216s" + } + group { + group_uid: 269484033 + tablets { + tablet_uid: 269484033 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001w" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\020\020\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiSplitRangeQuery/4" + sql { + session: "instances/default/databases/db31/sessions/Cj26cAs4RD17PnwartOnEP5weRuWeJiGsWyw0p_woAWpI-qkh_vsgPdD99_nQRZyD9Ysr_UQGP1_b5NtZb-OEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099545182209 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 269484033 + split_id: 14079378335067013120 + tablet_uid: 269484033 + } + } + event { + cache_update { + database_id: 1099545182209 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 269484033 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326\207\216s" + } + group { + group_uid: 269484033 + tablets { + tablet_uid: 269484033 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001w" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\020\020\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiSplitRangeQuery/6" + sql { + session: "instances/default/databases/db31/sessions/Cj26cAs4RD17PnwartOnEP5weRuWeJiGsWyw0p_woAWpI-qkh_vsgPdD99_nQRZyD9Ysr_UQGP1_b5NtZb-OEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099545182209 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 269484033 + split_id: 14079378335067013120 + tablet_uid: 269484033 + } + } + event { + name: "MultiSplitRangeQuery/7" + sql { + session: "instances/default/databases/db31/sessions/Cj26cAs4RD17PnwartOnEP5weRuWeJiGsWyw0p_woAWpI-qkh_vsgPdD99_nQRZyD9Ysr_UQGP1_b5NtZb-OEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099545182209 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 269484033 + split_id: 14079378335067013120 + tablet_uid: 269484033 + } + } + event { + cache_update { + database_id: 1099545182209 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 275775489 + split_id: 14079378335067013121 + generation: "\007\006C\314\326\232H-\007\006C\314\326\232O\315" + } + range { + start_key: "A\206\310\002\234\2311\000x" + limit_key: "A\206\311" + group_uid: 276824065 + split_id: 14079378335067013121 + generation: "\007\006C\314\326\232H-\007\006C\314\326\232O\315" + } + group { + group_uid: 275775489 + tablets { + tablet_uid: 275775489 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001}" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\020p\000\001" + } + group { + group_uid: 276824065 + tablets { + tablet_uid: 276824065 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001|" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\020\200\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiSplitRangeQuery/9" + sql { + session: "instances/default/databases/db31/sessions/Cj26cAs4RD17PnwartOnEP5weRuWeJiGsWyw0p_woAWpI-qkh_vsgPdD99_nQRZyD9Ysr_UQGP1_b5NtZb-OEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099545182209 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 275775489 + split_id: 14079378335067013121 + tablet_uid: 275775489 + } + } +} +test_case { + name: "MultiSplitRangeRead" + event { + name: "MultiSplitRangeRead/0" + read { + session: "instances/default/databases/db14/sessions/Cj0o3nR5UFrOZg2SHTIXxry6YlztuIUCKChW73CDnur1iUntENeOIUCLJi1ON9ym2fIzfYOB0G4apCR5I4YQEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099526307841 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "MultiSplitRangeRead/2" + read { + session: "instances/default/databases/db14/sessions/Cj0o3nR5UFrOZg2SHTIXxry6YlztuIUCKChW73CDnur1iUntENeOIUCLJi1ON9ym2fIzfYOB0G4apCR5I4YQEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099526307841 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + limit_key: "A\206\310\002\234\2315\000x" + } + } + event { + cache_update { + database_id: 1099526307841 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 146800641 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317\324\266i" + } + group { + group_uid: 146800641 + tablets { + tablet_uid: 146800641 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\252" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\010\300\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiSplitRangeRead/4" + read { + session: "instances/default/databases/db14/sessions/Cj0o3nR5UFrOZg2SHTIXxry6YlztuIUCKChW73CDnur1iUntENeOIUCLJi1ON9ym2fIzfYOB0G4apCR5I4YQEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099526307841 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 146800641 + split_id: 14079378335067013120 + tablet_uid: 146800641 + } + } + event { + cache_update { + database_id: 1099526307841 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 146800641 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317\327j\374" + } + group { + group_uid: 146800641 + tablets { + tablet_uid: 146800641 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\252" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\010\300\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiSplitRangeRead/6" + read { + session: "instances/default/databases/db14/sessions/Cj0o3nR5UFrOZg2SHTIXxry6YlztuIUCKChW73CDnur1iUntENeOIUCLJi1ON9ym2fIzfYOB0G4apCR5I4YQEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099526307841 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 146800641 + split_id: 14079378335067013120 + tablet_uid: 146800641 + } + } + event { + name: "MultiSplitRangeRead/7" + read { + session: "instances/default/databases/db14/sessions/Cj0o3nR5UFrOZg2SHTIXxry6YlztuIUCKChW73CDnur1iUntENeOIUCLJi1ON9ym2fIzfYOB0G4apCR5I4YQEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099526307841 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 146800641 + split_id: 14079378335067013120 + tablet_uid: 146800641 + } + } + event { + cache_update { + database_id: 1099526307841 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 153092097 + split_id: 14079378335067013121 + generation: "\007\006C\314\317\345k\007\007\006C\314\317\345|{" + } + range { + start_key: "A\206\310\002\234\2311\000x" + limit_key: "A\206\311" + group_uid: 154140673 + split_id: 14079378335067013121 + generation: "\007\006C\314\317\345k\007\007\006C\314\317\345|{" + } + group { + group_uid: 153092097 + tablets { + tablet_uid: 153092097 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\260" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t \000\001" + } + group { + group_uid: 154140673 + tablets { + tablet_uid: 154140673 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\261" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t0\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiSplitRangeRead/9" + read { + session: "instances/default/databases/db14/sessions/Cj0o3nR5UFrOZg2SHTIXxry6YlztuIUCKChW73CDnur1iUntENeOIUCLJi1ON9ym2fIzfYOB0G4apCR5I4YQEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099526307841 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + limit_key: "A\206\310\002\234\2315\000x" + } + } + event { + cache_update { + database_id: 1099526307841 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 153092097 + split_id: 14079378335067013121 + generation: "\007\006C\314\317\345k\007\007\006C\314\317\345|{" + } + range { + start_key: "A\206\310\002\234\2311\000x" + limit_key: "A\206\311" + group_uid: 154140673 + split_id: 14079378335067013121 + generation: "\007\006C\314\317\345k\007\007\006C\314\317\345|{" + } + group { + group_uid: 153092097 + tablets { + tablet_uid: 153092097 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\260" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t \000\001" + } + group { + group_uid: 154140673 + tablets { + tablet_uid: 154140673 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\261" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t0\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiSplitRangeRead/11" + read { + session: "instances/default/databases/db14/sessions/Cj0o3nR5UFrOZg2SHTIXxry6YlztuIUCKChW73CDnur1iUntENeOIUCLJi1ON9ym2fIzfYOB0G4apCR5I4YQEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099526307841 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + limit_key: "A\206\310\002\234\2315\000x" + } + } + event { + cache_update { + database_id: 1099526307841 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 153092097 + split_id: 14079378335067013121 + generation: "\007\006C\314\317\345k\007\007\006C\314\317\345|{" + } + range { + start_key: "A\206\310\002\234\2311\000x" + limit_key: "A\206\311" + group_uid: 154140673 + split_id: 14079378335067013121 + generation: "\007\006C\314\317\345k\007\007\006C\314\317\345|{" + } + group { + group_uid: 153092097 + tablets { + tablet_uid: 153092097 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\260" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t \000\001" + } + group { + group_uid: 154140673 + tablets { + tablet_uid: 154140673 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\261" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t0\000\001" + } + key_recipes { + } + } + } + event { + name: "MultiSplitRangeRead/13" + read { + session: "instances/default/databases/db14/sessions/Cj0o3nR5UFrOZg2SHTIXxry6YlztuIUCKChW73CDnur1iUntENeOIUCLJi1ON9ym2fIzfYOB0G4apCR5I4YQEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099526307841 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + limit_key: "A\206\310\002\234\2315\000x" + } + } + event { + cache_update { + database_id: 1099526307841 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 153092097 + split_id: 14079378335067013121 + generation: "\007\006C\314\317\345k\007\007\006C\314\317\345|{" + } + range { + start_key: "A\206\310\002\234\2311\000x" + limit_key: "A\206\311" + group_uid: 154140673 + split_id: 14079378335067013121 + generation: "\007\006C\314\317\345k\007\007\006C\314\317\345|{" + } + group { + group_uid: 153092097 + tablets { + tablet_uid: 153092097 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\260" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t \000\001" + } + group { + group_uid: 154140673 + tablets { + tablet_uid: 154140673 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\261" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\t0\000\001" + } + key_recipes { + } + } + } +} +test_case { + name: "PointQuery_MoveTablet" + event { + name: "PointQuery_MoveTablet/0" + sql { + session: "instances/default/databases/db20/sessions/Cj1N8sQ1mMXNR1g4jxOmUpJctw82dg0KcXzxZYKPIRwWsXqu0bhbi4E-_sLxODFwo_lYyhRy9bB8xBjMbn6MEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099532599297 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "PointQuery_MoveTablet/2" + sql { + session: "instances/default/databases/db20/sessions/Cj1N8sQ1mMXNR1g4jxOmUpJctw82dg0KcXzxZYKPIRwWsXqu0bhbi4E-_sLxODFwo_lYyhRy9bB8xBjMbn6MEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099532599297 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099532599297 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 188743681 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320r\274\204" + } + group { + group_uid: 188743681 + tablets { + tablet_uid: 188743681 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\323" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\013@\000\001" + } + key_recipes { + } + } + } + event { + name: "PointQuery_MoveTablet/4" + sql { + session: "instances/default/databases/db20/sessions/Cj1N8sQ1mMXNR1g4jxOmUpJctw82dg0KcXzxZYKPIRwWsXqu0bhbi4E-_sLxODFwo_lYyhRy9bB8xBjMbn6MEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099532599297 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 188743681 + split_id: 14079378335067013120 + tablet_uid: 188743681 + } + } + event { + cache_update { + database_id: 1099532599297 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 188743681 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320x\255_" + } + group { + group_uid: 188743681 + tablets { + tablet_uid: 188743681 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\323" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\013@\000\001" + } + key_recipes { + } + } + } + event { + name: "PointQuery_MoveTablet/6" + sql { + session: "instances/default/databases/db20/sessions/Cj1N8sQ1mMXNR1g4jxOmUpJctw82dg0KcXzxZYKPIRwWsXqu0bhbi4E-_sLxODFwo_lYyhRy9bB8xBjMbn6MEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099532599297 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 188743681 + split_id: 14079378335067013120 + tablet_uid: 188743681 + } + } + event { + name: "PointQuery_MoveTablet/7" + sql { + session: "instances/default/databases/db20/sessions/Cj1N8sQ1mMXNR1g4jxOmUpJctw82dg0KcXzxZYKPIRwWsXqu0bhbi4E-_sLxODFwo_lYyhRy9bB8xBjMbn6MEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099532599297 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 188743681 + split_id: 14079378335067013120 + tablet_uid: 188743681 + } + } +} +test_case { + name: "PointQuery_Split" + event { + name: "PointQuery_Split/0" + sql { + session: "instances/default/databases/db19/sessions/Cj2RvpMnHqQiSvRU_rl0CfvTHBYP-K9YWOZN0oPTqz_3o3UJkAV0kyMcVK_r3tClMWKYSJSK3tGn0llf-I56EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099531550721 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "PointQuery_Split/2" + sql { + session: "instances/default/databases/db19/sessions/Cj2RvpMnHqQiSvRU_rl0CfvTHBYP-K9YWOZN0oPTqz_3o3UJkAV0kyMcVK_r3tClMWKYSJSK3tGn0llf-I56EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099531550721 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099531550721 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 180355073 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320Op\220" + } + group { + group_uid: 180355073 + tablets { + tablet_uid: 180355073 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\315" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\n\300\000\001" + } + key_recipes { + } + } + } + event { + name: "PointQuery_Split/4" + sql { + session: "instances/default/databases/db19/sessions/Cj2RvpMnHqQiSvRU_rl0CfvTHBYP-K9YWOZN0oPTqz_3o3UJkAV0kyMcVK_r3tClMWKYSJSK3tGn0llf-I56EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099531550721 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 180355073 + split_id: 14079378335067013120 + tablet_uid: 180355073 + } + } + event { + cache_update { + database_id: 1099531550721 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 180355073 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320Q}h" + } + group { + group_uid: 180355073 + tablets { + tablet_uid: 180355073 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\315" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\n\300\000\001" + } + key_recipes { + } + } + } + event { + name: "PointQuery_Split/6" + sql { + session: "instances/default/databases/db19/sessions/Cj2RvpMnHqQiSvRU_rl0CfvTHBYP-K9YWOZN0oPTqz_3o3UJkAV0kyMcVK_r3tClMWKYSJSK3tGn0llf-I56EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099531550721 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 180355073 + split_id: 14079378335067013120 + tablet_uid: 180355073 + } + } + event { + name: "PointQuery_Split/7" + sql { + session: "instances/default/databases/db19/sessions/Cj2RvpMnHqQiSvRU_rl0CfvTHBYP-K9YWOZN0oPTqz_3o3UJkAV0kyMcVK_r3tClMWKYSJSK3tGn0llf-I56EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099531550721 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 180355073 + split_id: 14079378335067013120 + tablet_uid: 180355073 + } + } + event { + cache_update { + database_id: 1099531550721 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 186646529 + split_id: 14079378335067013121 + generation: "\007\006C\314\320c\021\014\007\006C\314\320c\026\345" + } + range { + start_key: "A\206\310\002\234\2311\000x" + limit_key: "A\206\311" + group_uid: 187695105 + split_id: 14079378335067013121 + generation: "\007\006C\314\320c\021\014\007\006C\314\320c\026\345" + } + group { + group_uid: 186646529 + tablets { + tablet_uid: 186646529 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\320" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\013 \000\001" + } + group { + group_uid: 187695105 + tablets { + tablet_uid: 187695105 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\321" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\0130\000\001" + } + key_recipes { + } + } + } + event { + name: "PointQuery_Split/9" + sql { + session: "instances/default/databases/db19/sessions/Cj2RvpMnHqQiSvRU_rl0CfvTHBYP-K9YWOZN0oPTqz_3o3UJkAV0kyMcVK_r3tClMWKYSJSK3tGn0llf-I56EO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099531550721 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 186646529 + split_id: 14079378335067013121 + tablet_uid: 186646529 + } + } +} +test_case { + name: "PointQuery_StopServer" + event { + name: "PointQuery_StopServer/0" + sql { + session: "instances/default/databases/db21/sessions/Cj2mLhhl2TEML6_S76tM9oTQnNZWOUYSYTbcM0g1a235ck_wOuvrssPXtj6kS89DUYK3B9sJwmp3MAtsd0rKEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099533647873 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "PointQuery_StopServer/2" + sql { + session: "instances/default/databases/db21/sessions/Cj2mLhhl2TEML6_S76tM9oTQnNZWOUYSYTbcM0g1a235ck_wOuvrssPXtj6kS89DUYK3B9sJwmp3MAtsd0rKEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099533647873 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099533647873 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 195035137 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320\223\232\214" + } + group { + group_uid: 195035137 + tablets { + tablet_uid: 195035137 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\331" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\013\240\000\001" + } + key_recipes { + } + } + } + event { + name: "PointQuery_StopServer/4" + sql { + session: "instances/default/databases/db21/sessions/Cj2mLhhl2TEML6_S76tM9oTQnNZWOUYSYTbcM0g1a235ck_wOuvrssPXtj6kS89DUYK3B9sJwmp3MAtsd0rKEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099533647873 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 195035137 + split_id: 14079378335067013120 + tablet_uid: 195035137 + } + } + event { + cache_update { + database_id: 1099533647873 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 195035137 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320\232\312r" + } + group { + group_uid: 195035137 + tablets { + tablet_uid: 195035137 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\331" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\013\240\000\001" + } + key_recipes { + } + } + } + event { + name: "PointQuery_StopServer/6" + sql { + session: "instances/default/databases/db21/sessions/Cj2mLhhl2TEML6_S76tM9oTQnNZWOUYSYTbcM0g1a235ck_wOuvrssPXtj6kS89DUYK3B9sJwmp3MAtsd0rKEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099533647873 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 195035137 + split_id: 14079378335067013120 + tablet_uid: 195035137 + } + } + event { + name: "PointQuery_StopServer/7" + unhealthy_servers: "localhost:15100" + sql { + session: "instances/default/databases/db21/sessions/Cj2mLhhl2TEML6_S76tM9oTQnNZWOUYSYTbcM0g1a235ck_wOuvrssPXtj6kS89DUYK3B9sJwmp3MAtsd0rKEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099533647873 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 195035137 + split_id: 14079378335067013120 + skipped_tablet_uid { + tablet_uid: 195035137 + incarnation: "\001\331" + } + skipped_tablet_uid { + tablet_uid: 195035137 + incarnation: "\001\331" + } + } + } + event { + cache_update { + database_id: 1099533647873 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 195035137 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\320\223\232\214" + } + group { + group_uid: 195035137 + tablets { + tablet_uid: 195035137 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\002\001)" + } + generation: "\010\377\377\377\377\377\377\377\377\001\002\004\013\240\000\001" + } + key_recipes { + } + } + } + event { + name: "PointQuery_StopServer/9" + sql { + session: "instances/default/databases/db21/sessions/Cj2mLhhl2TEML6_S76tM9oTQnNZWOUYSYTbcM0g1a235ck_wOuvrssPXtj6kS89DUYK3B9sJwmp3MAtsd0rKEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099533647873 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 195035137 + split_id: 14079378335067013120 + tablet_uid: 195035137 + } + } +} +test_case { + name: "PointRead_Basic" + event { + name: "PointRead_Basic/0" + read { + session: "instances/default/databases/db1/sessions/Cj2dgaSCS1TIcsY03_rLwNkT4bcSD0rl96ymOmEs6St0gocLKdJ13KOcTUAr0hZzE7UgcFAH_pgoeDLs-gevEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099511627777 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "PointRead_Basic/2" + read { + session: "instances/default/databases/db1/sessions/Cj2dgaSCS1TIcsY03_rLwNkT4bcSD0rl96ymOmEs6St0gocLKdJ13KOcTUAr0hZzE7UgcFAH_pgoeDLs-gevEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099511627777 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099511627777 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 51380225 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\312\266\333\267" + } + group { + group_uid: 51380225 + tablets { + tablet_uid: 51380225 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\0014" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\003\020\000\001" + } + key_recipes { + } + } + } + event { + name: "PointRead_Basic/4" + read { + session: "instances/default/databases/db1/sessions/Cj2dgaSCS1TIcsY03_rLwNkT4bcSD0rl96ymOmEs6St0gocLKdJ13KOcTUAr0hZzE7UgcFAH_pgoeDLs-gevEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099511627777 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 51380225 + split_id: 14079378335067013120 + tablet_uid: 51380225 + } + } + event { + name: "PointRead_Basic/5" + read { + session: "instances/default/databases/db1/sessions/Cj2dgaSCS1TIcsY03_rLwNkT4bcSD0rl96ymOmEs6St0gocLKdJ13KOcTUAr0hZzE7UgcFAH_pgoeDLs-gevEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "6" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099511627777 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 51380225 + split_id: 14079378335067013120 + tablet_uid: 51380225 + } + } + event { + name: "PointRead_Basic/6" + read { + session: "instances/default/databases/db1/sessions/Cj2dgaSCS1TIcsY03_rLwNkT4bcSD0rl96ymOmEs6St0gocLKdJ13KOcTUAr0hZzE7UgcFAH_pgoeDLs-gevEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "99" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099511627777 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 51380225 + split_id: 14079378335067013120 + tablet_uid: 51380225 + } + } +} +test_case { + name: "PointRead_MoveTablet" + event { + name: "PointRead_MoveTablet/0" + read { + session: "instances/default/databases/db3/sessions/Cj1AKsB4f6xVAxSo5B5BEa_WQta60iwvkBhF0_CO2ES-1CICxfRMDL5FaiFDCdlVa22_VEiq4S9xZWRU6fJuEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099513724929 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "PointRead_MoveTablet/2" + read { + session: "instances/default/databases/db3/sessions/Cj1AKsB4f6xVAxSo5B5BEa_WQta60iwvkBhF0_CO2ES-1CICxfRMDL5FaiFDCdlVa22_VEiq4S9xZWRU6fJuEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099513724929 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099513724929 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 66060289 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\312\371S\230" + } + group { + group_uid: 66060289 + tablets { + tablet_uid: 66060289 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001B" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\003\360\000\001" + } + key_recipes { + } + } + } + event { + name: "PointRead_MoveTablet/4" + read { + session: "instances/default/databases/db3/sessions/Cj1AKsB4f6xVAxSo5B5BEa_WQta60iwvkBhF0_CO2ES-1CICxfRMDL5FaiFDCdlVa22_VEiq4S9xZWRU6fJuEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099513724929 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 66060289 + split_id: 14079378335067013120 + tablet_uid: 66060289 + } + } + event { + cache_update { + database_id: 1099513724929 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 66060289 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\312\377\310\024" + } + group { + group_uid: 66060289 + tablets { + tablet_uid: 66060289 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001B" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\003\360\000\001" + } + key_recipes { + } + } + } + event { + name: "PointRead_MoveTablet/6" + read { + session: "instances/default/databases/db3/sessions/Cj1AKsB4f6xVAxSo5B5BEa_WQta60iwvkBhF0_CO2ES-1CICxfRMDL5FaiFDCdlVa22_VEiq4S9xZWRU6fJuEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099513724929 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 66060289 + split_id: 14079378335067013120 + tablet_uid: 66060289 + } + } + event { + name: "PointRead_MoveTablet/7" + read { + session: "instances/default/databases/db3/sessions/Cj1AKsB4f6xVAxSo5B5BEa_WQta60iwvkBhF0_CO2ES-1CICxfRMDL5FaiFDCdlVa22_VEiq4S9xZWRU6fJuEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099513724929 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 66060289 + split_id: 14079378335067013120 + tablet_uid: 66060289 + } + } +} +test_case { + name: "PointRead_Split" + event { + name: "PointRead_Split/0" + read { + session: "instances/default/databases/db2/sessions/Cj0P1CjTc1r75lf93ktX0nFIilgWPzLMlGnWTx-ZrjQo0Gf7-8YTsxgLsq7TFigkRjfOoY7s-KBDYRGUBOhtEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099512676353 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "PointRead_Split/2" + read { + session: "instances/default/databases/db2/sessions/Cj0P1CjTc1r75lf93ktX0nFIilgWPzLMlGnWTx-ZrjQo0Gf7-8YTsxgLsq7TFigkRjfOoY7s-KBDYRGUBOhtEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099512676353 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099512676353 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 57671681 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\312\320\311\201" + } + group { + group_uid: 57671681 + tablets { + tablet_uid: 57671681 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\0019" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\003p\000\001" + } + key_recipes { + } + } + } + event { + name: "PointRead_Split/4" + read { + session: "instances/default/databases/db2/sessions/Cj0P1CjTc1r75lf93ktX0nFIilgWPzLMlGnWTx-ZrjQo0Gf7-8YTsxgLsq7TFigkRjfOoY7s-KBDYRGUBOhtEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099512676353 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 57671681 + split_id: 14079378335067013120 + tablet_uid: 57671681 + } + } + event { + cache_update { + database_id: 1099512676353 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 57671681 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\312\325J\"" + } + group { + group_uid: 57671681 + tablets { + tablet_uid: 57671681 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\0019" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\003p\000\001" + } + key_recipes { + } + } + } + event { + name: "PointRead_Split/6" + read { + session: "instances/default/databases/db2/sessions/Cj0P1CjTc1r75lf93ktX0nFIilgWPzLMlGnWTx-ZrjQo0Gf7-8YTsxgLsq7TFigkRjfOoY7s-KBDYRGUBOhtEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099512676353 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 57671681 + split_id: 14079378335067013120 + tablet_uid: 57671681 + } + } + event { + name: "PointRead_Split/7" + read { + session: "instances/default/databases/db2/sessions/Cj0P1CjTc1r75lf93ktX0nFIilgWPzLMlGnWTx-ZrjQo0Gf7-8YTsxgLsq7TFigkRjfOoY7s-KBDYRGUBOhtEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099512676353 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 57671681 + split_id: 14079378335067013120 + tablet_uid: 57671681 + } + } + event { + cache_update { + database_id: 1099512676353 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 63963137 + split_id: 14079378335067013121 + generation: "\007\006C\314\312\346,\370\007\006C\314\312\346G\266" + } + range { + start_key: "A\206\310\002\234\2311\000x" + limit_key: "A\206\311" + group_uid: 65011713 + split_id: 14079378335067013121 + generation: "\007\006C\314\312\346,\370\007\006C\314\312\346G\266" + } + group { + group_uid: 63963137 + tablets { + tablet_uid: 63963137 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001@" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\003\320\000\001" + } + group { + group_uid: 65011713 + tablets { + tablet_uid: 65011713 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001?" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\003\340\000\001" + } + key_recipes { + } + } + } + event { + name: "PointRead_Split/9" + read { + session: "instances/default/databases/db2/sessions/Cj0P1CjTc1r75lf93ktX0nFIilgWPzLMlGnWTx-ZrjQo0Gf7-8YTsxgLsq7TFigkRjfOoY7s-KBDYRGUBOhtEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099512676353 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 63963137 + split_id: 14079378335067013121 + tablet_uid: 63963137 + } + } +} +test_case { + name: "PointRead_StopServer" + event { + name: "PointRead_StopServer/0" + read { + session: "instances/default/databases/db4/sessions/Cj06QaQcKhM5rNrSjoYJN6w9yW8QlrvlrAYbHThdJcgxiQOcxXv_urgbse66Ol2wnM36ddl7v6GMVjh0JXdJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099514773505 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "PointRead_StopServer/2" + read { + session: "instances/default/databases/db4/sessions/Cj06QaQcKhM5rNrSjoYJN6w9yW8QlrvlrAYbHThdJcgxiQOcxXv_urgbse66Ol2wnM36ddl7v6GMVjh0JXdJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099514773505 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099514773505 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 72351745 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\313\027\337?" + } + group { + group_uid: 72351745 + tablets { + tablet_uid: 72351745 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001H" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\004P\000\001" + } + key_recipes { + } + } + } + event { + name: "PointRead_StopServer/4" + read { + session: "instances/default/databases/db4/sessions/Cj06QaQcKhM5rNrSjoYJN6w9yW8QlrvlrAYbHThdJcgxiQOcxXv_urgbse66Ol2wnM36ddl7v6GMVjh0JXdJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099514773505 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 72351745 + split_id: 14079378335067013120 + tablet_uid: 72351745 + } + } + event { + cache_update { + database_id: 1099514773505 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 72351745 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\313\030\343J" + } + group { + group_uid: 72351745 + tablets { + tablet_uid: 72351745 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001H" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\004P\000\001" + } + key_recipes { + } + } + } + event { + name: "PointRead_StopServer/6" + read { + session: "instances/default/databases/db4/sessions/Cj06QaQcKhM5rNrSjoYJN6w9yW8QlrvlrAYbHThdJcgxiQOcxXv_urgbse66Ol2wnM36ddl7v6GMVjh0JXdJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099514773505 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 72351745 + split_id: 14079378335067013120 + tablet_uid: 72351745 + } + } + event { + name: "PointRead_StopServer/7" + unhealthy_servers: "localhost:15100" + read { + session: "instances/default/databases/db4/sessions/Cj06QaQcKhM5rNrSjoYJN6w9yW8QlrvlrAYbHThdJcgxiQOcxXv_urgbse66Ol2wnM36ddl7v6GMVjh0JXdJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099514773505 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 72351745 + split_id: 14079378335067013120 + skipped_tablet_uid { + tablet_uid: 72351745 + incarnation: "\001H" + } + skipped_tablet_uid { + tablet_uid: 72351745 + incarnation: "\001H" + } + } + } + event { + cache_update { + database_id: 1099514773505 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 72351745 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\313\027\337?" + } + group { + group_uid: 72351745 + tablets { + tablet_uid: 72351745 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\001_" + } + generation: "\010\377\377\377\377\377\377\377\377\001\001\004\004P\000\001" + } + key_recipes { + } + } + } + event { + name: "PointRead_StopServer/9" + read { + session: "instances/default/databases/db4/sessions/Cj06QaQcKhM5rNrSjoYJN6w9yW8QlrvlrAYbHThdJcgxiQOcxXv_urgbse66Ol2wnM36ddl7v6GMVjh0JXdJEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099514773505 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 72351745 + split_id: 14079378335067013120 + tablet_uid: 72351745 + } + } +} +test_case { + name: "Query_Basic" + event { + name: "Query_Basic/0" + sql { + session: "instances/default/databases/db18/sessions/Cj0AhIB1FQZ0mpfUyRe4RAdNeLsy8_3N0l6G0SYbTQH9L4Mo6SAJCEW0asR2_0Y2B_x-EQH5q3LXC8IqY_UUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099530502145 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "Query_Basic/2" + sql { + session: "instances/default/databases/db18/sessions/Cj0AhIB1FQZ0mpfUyRe4RAdNeLsy8_3N0l6G0SYbTQH9L4Mo6SAJCEW0asR2_0Y2B_x-EQH5q3LXC8IqY_UUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099530502145 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099530502145 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 174063617 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\3205D\321" + } + group { + group_uid: 174063617 + tablets { + tablet_uid: 174063617 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\304" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\n`\000\001" + } + key_recipes { + } + } + } + event { + name: "Query_Basic/4" + sql { + session: "instances/default/databases/db18/sessions/Cj0AhIB1FQZ0mpfUyRe4RAdNeLsy8_3N0l6G0SYbTQH9L4Mo6SAJCEW0asR2_0Y2B_x-EQH5q3LXC8IqY_UUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099530502145 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 174063617 + split_id: 14079378335067013120 + tablet_uid: 174063617 + } + } + event { + cache_update { + database_id: 1099530502145 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 174063617 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\3207\336\354" + } + group { + group_uid: 174063617 + tablets { + tablet_uid: 174063617 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\304" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\n`\000\001" + } + key_recipes { + } + } + } + event { + name: "Query_Basic/6" + sql { + session: "instances/default/databases/db18/sessions/Cj0AhIB1FQZ0mpfUyRe4RAdNeLsy8_3N0l6G0SYbTQH9L4Mo6SAJCEW0asR2_0Y2B_x-EQH5q3LXC8IqY_UUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099530502145 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 174063617 + split_id: 14079378335067013120 + tablet_uid: 174063617 + } + } + event { + name: "Query_Basic/7" + sql { + session: "instances/default/databases/db18/sessions/Cj0AhIB1FQZ0mpfUyRe4RAdNeLsy8_3N0l6G0SYbTQH9L4Mo6SAJCEW0asR2_0Y2B_x-EQH5q3LXC8IqY_UUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "6" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099530502145 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 174063617 + split_id: 14079378335067013120 + tablet_uid: 174063617 + } + } + event { + name: "Query_Basic/8" + sql { + session: "instances/default/databases/db18/sessions/Cj0AhIB1FQZ0mpfUyRe4RAdNeLsy8_3N0l6G0SYbTQH9L4Mo6SAJCEW0asR2_0Y2B_x-EQH5q3LXC8IqY_UUEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "99" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099530502145 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 174063617 + split_id: 14079378335067013120 + tablet_uid: 174063617 + } + } +} +test_case { + name: "Queryroot" + event { + name: "Queryroot/0" + sql { + session: "instances/default/databases/db36/sessions/Cj1-3deMwlMPSU3TUZjwEiTnCEx6ntNH_PgS62Q5Uq5SIJ7I3nvRImR3DuycWYdHyu_aL5pq9cpaUDBf3csWEO_3ts7M-ZAD" + sql: "SELECT TEXT_FINGERPRINT, TEXT, FROM SPANNER_SYS.OLDEST_ACTIVE_QUERIES" + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099550425089 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50016 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NOT_NULL + type { + code: INT64 + } + value { + string_value: "0" + } + } + } + } + } + } + event { + name: "Queryroot/2" + sql { + session: "instances/default/databases/db36/sessions/Cj1-3deMwlMPSU3TUZjwEiTnCEx6ntNH_PgS62Q5Uq5SIJ7I3nvRImR3DuycWYdHyu_aL5pq9cpaUDBf3csWEO_3ts7M-ZAD" + sql: "SELECT TEXT_FINGERPRINT, TEXT, FROM SPANNER_SYS.OLDEST_ACTIVE_QUERIES" + } + hint { + operation_uid: 1 + database_id: 1099550425089 + schema_generation: "\001\001" + key: "A\206\300\002\221\000" + } + } + event { + cache_update { + database_id: 1099550425089 + range { + start_key: "A\206\300" + limit_key: "A\206\301" + group_uid: 309329921 + split_id: 14078252435160170496 + generation: "\000\007\006C\314\3271\033z" + } + group { + group_uid: 309329921 + tablets { + tablet_uid: 309329921 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\002\001\232" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\022p\000\001" + } + key_recipes { + } + } + } + event { + name: "Queryroot/4" + sql { + session: "instances/default/databases/db36/sessions/Cj1-3deMwlMPSU3TUZjwEiTnCEx6ntNH_PgS62Q5Uq5SIJ7I3nvRImR3DuycWYdHyu_aL5pq9cpaUDBf3csWEO_3ts7M-ZAD" + sql: "SELECT TEXT_FINGERPRINT, TEXT, FROM SPANNER_SYS.OLDEST_ACTIVE_QUERIES" + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099550425089 + schema_generation: "\001\001" + key: "A\206\300" + limit_key: "A\206\301" + group_uid: 309329921 + split_id: 14078252435160170496 + tablet_uid: 309329921 + } + } +} +test_case { + name: "RandomSplitQuery" + event { + name: "RandomSplitQuery/0" + sql { + session: "instances/default/databases/db33/sessions/Cjx4AhBshfE8Wz_DweJPRclYklWrtNOgZU6SOL_5EY-RxIkB0O1k8mYR1tr1pYqNnVlVPFTrl1kJd9_Ho9sQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T@{FORCE_INDEX=_BASE_TABLE} WHERE Key IN UNNEST(@keys)" + params { + fields { + key: "keys" + value { + list_value { + values { + string_value: "0" + } + values { + string_value: "1" + } + values { + string_value: "2" + } + } + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099547279361 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "keys" + } + } + } + } + } + event { + name: "RandomSplitQuery/2" + sql { + session: "instances/default/databases/db33/sessions/Cjx4AhBshfE8Wz_DweJPRclYklWrtNOgZU6SOL_5EY-RxIkB0O1k8mYR1tr1pYqNnVlVPFTrl1kJd9_Ho9sQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T@{FORCE_INDEX=_BASE_TABLE} WHERE Key IN UNNEST(@keys)" + params { + fields { + key: "keys" + value { + list_value { + values { + string_value: "0" + } + values { + string_value: "1" + } + values { + string_value: "2" + } + } + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099547279361 + schema_generation: "\001\001" + key: "A\206\310\002" + limit_key: "A\206\310\003" + } + } + event { + cache_update { + database_id: 1099547279361 + range { + start_key: "A\206\310" + limit_key: "A\206\310\002\234\2311\000x" + group_uid: 290455553 + split_id: 14079378335067013121 + generation: "\007\006C\314\326\324z5\007\006C\314\326\325\300\240" + } + range { + start_key: "A\206\310\002\234\2311\000x" + limit_key: "A\206\311" + group_uid: 291504129 + split_id: 14079378335067013121 + generation: "\007\006C\314\326\324z5\007\006C\314\326\325\300\240" + } + group { + group_uid: 290455553 + tablets { + tablet_uid: 290455553 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001\212" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\021P\000\001" + } + group { + group_uid: 291504129 + tablets { + tablet_uid: 291504129 + server_address: "localhost:15000" + role: READ_WRITE + incarnation: "\002\001\213" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\021`\000\001" + } + key_recipes { + } + } + } + event { + name: "RandomSplitQuery/4" + sql { + session: "instances/default/databases/db33/sessions/Cjx4AhBshfE8Wz_DweJPRclYklWrtNOgZU6SOL_5EY-RxIkB0O1k8mYR1tr1pYqNnVlVPFTrl1kJd9_Ho9sQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T@{FORCE_INDEX=_BASE_TABLE} WHERE Key IN UNNEST(@keys)" + params { + fields { + key: "keys" + value { + list_value { + values { + string_value: "0" + } + values { + string_value: "1" + } + values { + string_value: "2" + } + } + } + } + } + } + server: "localhost:15000" + hint { + operation_uid: 1 + database_id: 1099547279361 + schema_generation: "\001\001" + key: "A\206\310\002\234\2311\000x" + limit_key: "A\206\311" + group_uid: 291504129 + split_id: 14079378335067013121 + tablet_uid: 291504129 + } + } +} +test_case { + name: "RangeQuery" + event { + name: "RangeQuery/0" + sql { + session: "instances/default/databases/db30/sessions/CjynQBcGQrjQeodWrxOhJQjQgAKxjCQ-leDzPdhgZW8QORrZibtwD7HWqz-U8RNelce3k2eYamxiIMIE2SQQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099544133633 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "start" + } + } + } + } + } + event { + name: "RangeQuery/2" + sql { + session: "instances/default/databases/db30/sessions/CjynQBcGQrjQeodWrxOhJQjQgAKxjCQ-leDzPdhgZW8QORrZibtwD7HWqz-U8RNelce3k2eYamxiIMIE2SQQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099544133633 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099544133633 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 263192577 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326o/\274" + } + group { + group_uid: 263192577 + tablets { + tablet_uid: 263192577 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001q" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\017\260\000\001" + } + key_recipes { + } + } + } + event { + name: "RangeQuery/4" + sql { + session: "instances/default/databases/db30/sessions/CjynQBcGQrjQeodWrxOhJQjQgAKxjCQ-leDzPdhgZW8QORrZibtwD7HWqz-U8RNelce3k2eYamxiIMIE2SQQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099544133633 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 263192577 + split_id: 14079378335067013120 + tablet_uid: 263192577 + } + } + event { + cache_update { + database_id: 1099544133633 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 263192577 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326s\202\243" + } + group { + group_uid: 263192577 + tablets { + tablet_uid: 263192577 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001q" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\017\260\000\001" + } + key_recipes { + } + } + } + event { + name: "RangeQuery/6" + sql { + session: "instances/default/databases/db30/sessions/CjynQBcGQrjQeodWrxOhJQjQgAKxjCQ-leDzPdhgZW8QORrZibtwD7HWqz-U8RNelce3k2eYamxiIMIE2SQQ7_e2zsz5kAM" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0 FROM T WHERE Key >= @start AND Key < @limit" + params { + fields { + key: "limit" + value { + string_value: "5" + } + } + fields { + key: "start" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099544133633 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 263192577 + split_id: 14079378335067013120 + tablet_uid: 263192577 + } + } +} +test_case { + name: "RangeRead" + event { + name: "RangeRead/0" + read { + session: "instances/default/databases/db13/sessions/Cj3u91rLO503wDtURxIEP9XFEOjXODpgPD-THdCp1MX-LrLsBFNM7_IhP8F8Q3XzmyG1OGNoiDoCA0--eIvGEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099525259265 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "RangeRead/2" + read { + session: "instances/default/databases/db13/sessions/Cj3u91rLO503wDtURxIEP9XFEOjXODpgPD-THdCp1MX-LrLsBFNM7_IhP8F8Q3XzmyG1OGNoiDoCA0--eIvGEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099525259265 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + limit_key: "A\206\310\002\234\2315\000x" + } + } + event { + cache_update { + database_id: 1099525259265 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 140509185 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317\270\342\357" + } + group { + group_uid: 140509185 + tablets { + tablet_uid: 140509185 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\244" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\010`\000\001" + } + key_recipes { + } + } + } + event { + name: "RangeRead/4" + read { + session: "instances/default/databases/db13/sessions/Cj3u91rLO503wDtURxIEP9XFEOjXODpgPD-THdCp1MX-LrLsBFNM7_IhP8F8Q3XzmyG1OGNoiDoCA0--eIvGEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099525259265 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 140509185 + split_id: 14079378335067013120 + tablet_uid: 140509185 + } + } + event { + cache_update { + database_id: 1099525259265 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 140509185 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317\270\342\357" + } + group { + group_uid: 140509185 + tablets { + tablet_uid: 140509185 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\244" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\010`\000\001" + } + key_recipes { + } + } + } + event { + name: "RangeRead/6" + read { + session: "instances/default/databases/db13/sessions/Cj3u91rLO503wDtURxIEP9XFEOjXODpgPD-THdCp1MX-LrLsBFNM7_IhP8F8Q3XzmyG1OGNoiDoCA0--eIvGEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + key_set { + ranges { + start_closed { + values { + string_value: "0" + } + } + end_open { + values { + string_value: "5" + } + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099525259265 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 140509185 + split_id: 14079378335067013120 + tablet_uid: 140509185 + } + } +} +test_case { + name: "SchemaChange" + event { + name: "SchemaChange/0" + read { + session: "instances/default/databases/db12/sessions/Cj3nfoJOAt2jL0sglk3NLsu54-3zpWp6CnodAvXgomtqQPO2naJaUHeFEOSVQCkj2_dfxCCOBf7YIL6QQT2eEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099524210689 + key_recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "Key" + } + } + } + } + } + event { + name: "SchemaChange/2" + read { + session: "instances/default/databases/db12/sessions/Cj3nfoJOAt2jL0sglk3NLsu54-3zpWp6CnodAvXgomtqQPO2naJaUHeFEOSVQCkj2_dfxCCOBf7YIL6QQT2eEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099524210689 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099524210689 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 134217729 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317k\222^" + } + group { + group_uid: 134217729 + tablets { + tablet_uid: 134217729 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\236" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\010\000\000\001" + } + key_recipes { + } + } + } + event { + name: "SchemaChange/4" + read { + session: "instances/default/databases/db12/sessions/Cj3nfoJOAt2jL0sglk3NLsu54-3zpWp6CnodAvXgomtqQPO2naJaUHeFEOSVQCkj2_dfxCCOBf7YIL6QQT2eEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099524210689 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 134217729 + split_id: 14079378335067013120 + tablet_uid: 134217729 + } + } + event { + cache_update { + database_id: 1099524210689 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 134217729 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\317m\306\322" + } + group { + group_uid: 134217729 + tablets { + tablet_uid: 134217729 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\001\236" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\010\000\000\001" + } + key_recipes { + } + } + } + event { + name: "SchemaChange/6" + read { + session: "instances/default/databases/db12/sessions/Cj3nfoJOAt2jL0sglk3NLsu54-3zpWp6CnodAvXgomtqQPO2naJaUHeFEOSVQCkj2_dfxCCOBf7YIL6QQT2eEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099524210689 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 134217729 + split_id: 14079378335067013120 + tablet_uid: 134217729 + } + } + event { + name: "SchemaChange/7" + read { + session: "instances/default/databases/db12/sessions/Cj3nfoJOAt2jL0sglk3NLsu54-3zpWp6CnodAvXgomtqQPO2naJaUHeFEOSVQCkj2_dfxCCOBf7YIL6QQT2eEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + columns: "V2" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099524210689 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 134217729 + split_id: 14079378335067013120 + tablet_uid: 134217729 + } + } + event { + name: "SchemaChange/8" + read { + session: "instances/default/databases/db12/sessions/Cj3nfoJOAt2jL0sglk3NLsu54-3zpWp6CnodAvXgomtqQPO2naJaUHeFEOSVQCkj2_dfxCCOBf7YIL6QQT2eEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + table: "T" + columns: "Key" + columns: "V0" + columns: "V1" + key_set { + keys { + values { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 2 + database_id: 1099524210689 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 134217729 + split_id: 14079378335067013120 + tablet_uid: 134217729 + } + } +} +test_case { + name: "SchemaChange_Query" + event { + name: "SchemaChange_Query/0" + sql { + session: "instances/default/databases/db29/sessions/Cj3q6mix4HEACSTV7qfn-anCj6i3qJoPhAU9-97hUwZ_mBPgNQF9vRPFpH5onCRy5ZxWf8FuDJlYvcD-53bMEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + } + } + event { + cache_update { + database_id: 1099543085057 + key_recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 1 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "SchemaChange_Query/2" + sql { + session: "instances/default/databases/db29/sessions/Cj3q6mix4HEACSTV7qfn-anCj6i3qJoPhAU9-97hUwZ_mBPgNQF9vRPFpH5onCRy5ZxWf8FuDJlYvcD-53bMEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 1 + database_id: 1099543085057 + schema_generation: "\001\001" + key: "A\206\310\002\234\2310\000x" + } + } + event { + cache_update { + database_id: 1099543085057 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 256901121 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326)\373>" + } + group { + group_uid: 256901121 + tablets { + tablet_uid: 256901121 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001k" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\017P\000\001" + } + key_recipes { + } + } + } + event { + name: "SchemaChange_Query/4" + sql { + session: "instances/default/databases/db29/sessions/Cj3q6mix4HEACSTV7qfn-anCj6i3qJoPhAU9-97hUwZ_mBPgNQF9vRPFpH5onCRy5ZxWf8FuDJlYvcD-53bMEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099543085057 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 256901121 + split_id: 14079378335067013120 + tablet_uid: 256901121 + } + } + event { + cache_update { + database_id: 1099543085057 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 256901121 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326+\204M" + } + group { + group_uid: 256901121 + tablets { + tablet_uid: 256901121 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001k" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\017P\000\001" + } + key_recipes { + } + } + } + event { + name: "SchemaChange_Query/6" + sql { + session: "instances/default/databases/db29/sessions/Cj3q6mix4HEACSTV7qfn-anCj6i3qJoPhAU9-97hUwZ_mBPgNQF9vRPFpH5onCRy5ZxWf8FuDJlYvcD-53bMEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099543085057 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 256901121 + split_id: 14079378335067013120 + tablet_uid: 256901121 + } + } + event { + name: "SchemaChange_Query/7" + sql { + session: "instances/default/databases/db29/sessions/Cj3q6mix4HEACSTV7qfn-anCj6i3qJoPhAU9-97hUwZ_mBPgNQF9vRPFpH5onCRy5ZxWf8FuDJlYvcD-53bMEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1, V2 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 1 + database_id: 1099543085057 + schema_generation: "\001\001" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 256901121 + split_id: 14079378335067013120 + tablet_uid: 256901121 + } + } + event { + name: "SchemaChange_Query/8" + sql { + session: "instances/default/databases/db29/sessions/Cj3q6mix4HEACSTV7qfn-anCj6i3qJoPhAU9-97hUwZ_mBPgNQF9vRPFpH5onCRy5ZxWf8FuDJlYvcD-53bMEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + hint { + operation_uid: 2 + database_id: 1099543085057 + schema_generation: "\001\001" + } + } + event { + cache_update { + database_id: 1099543085057 + key_recipes { + schema_generation: "\001\002" + recipe { + operation_uid: 2 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "key" + } + } + } + } + } + event { + name: "SchemaChange_Query/10" + sql { + session: "instances/default/databases/db29/sessions/Cj3q6mix4HEACSTV7qfn-anCj6i3qJoPhAU9-97hUwZ_mBPgNQF9vRPFpH5onCRy5ZxWf8FuDJlYvcD-53bMEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 2 + database_id: 1099543085057 + schema_generation: "\001\002" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 256901121 + split_id: 14079378335067013120 + tablet_uid: 256901121 + } + } + event { + cache_update { + database_id: 1099543085057 + range { + start_key: "A\206\310" + limit_key: "A\206\311" + group_uid: 256901121 + split_id: 14079378335067013120 + generation: "\000\007\006C\314\326+\204M" + } + group { + group_uid: 256901121 + tablets { + tablet_uid: 256901121 + server_address: "localhost:15100" + role: READ_WRITE + incarnation: "\002\001k" + } + generation: "\010\377\377\377\377\377\377\377\377\000\004\017P\000\001" + } + key_recipes { + } + } + } + event { + name: "SchemaChange_Query/12" + sql { + session: "instances/default/databases/db29/sessions/Cj3q6mix4HEACSTV7qfn-anCj6i3qJoPhAU9-97hUwZ_mBPgNQF9vRPFpH5onCRy5ZxWf8FuDJlYvcD-53bMEO_3ts7M-ZAD" + transaction { + single_use { + read_only { + strong: true + } + } + } + sql: "SELECT Key, V0, V1 FROM T WHERE Key = @key" + params { + fields { + key: "key" + value { + string_value: "0" + } + } + } + } + server: "localhost:15100" + hint { + operation_uid: 2 + database_id: 1099543085057 + schema_generation: "\001\002" + key: "A\206\310" + limit_key: "A\206\311" + group_uid: 256901121 + split_id: 14079378335067013120 + tablet_uid: 256901121 + } + } +} diff --git a/google-cloud-spanner/src/test/resources/range_cache_test.textproto b/google-cloud-spanner/src/test/resources/range_cache_test.textproto new file mode 100644 index 00000000000..70a5e1151d5 --- /dev/null +++ b/google-cloud-spanner/src/test/resources/range_cache_test.textproto @@ -0,0 +1,1204 @@ +test_case { + name: "no_key" + step { + test { + result { + } + } + } +} + +test_case { + name: "empty_key" + step { + test { + key: "" + result { + key: "" + } + } + } +} + +test_case { + name: "empty_cache" + step { + update { + } + test { + key: "a" + result { + key: "a" + } + } + } +} + +test_case { + name: "basic_cache_hit" + step { + update { + range { + start_key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + location: "us-central1" + role: READ_WRITE + incarnation: "44" + distance: 0 + skip: false + } + } + } + test { + key: "a" + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + test { + key: "z" + result { + key: "z" + } + } + } +} + +test_case { + name: "cache_math" + step { + # Start with [k..n)->split 3 + update { + range { + start_key: "k" + limit_key: "n" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + tablets { + tablet_uid: 4 + server_address: "server1" + } + } + } + test { + key: "k" + result { + key: "k" + limit_key: "n" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + } + # Insert [m..o)->4. Now: + # [k..m)->3 + # [m..o)->4 + step { + update { + range { + start_key: "m" + limit_key: "o" + group_uid: 2 + split_id: 4 + generation: "23" + } + } + test { + key: "k" + result { + key: "k" + limit_key: "m" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + test { + key: "m" + result { + key: "m" + limit_key: "o" + group_uid: 2 + split_id: 4 + tablet_uid: 4 + } + server: "server1" + } + } + # Insert [n..p)->5. Now: + # [k..m)->3 + # [m..o)->4 + # [o..p)->5 + step { + update { + range { + start_key: "n" + limit_key: "p" + group_uid: 2 + split_id: 5 + generation: "24" + } + } + test { + key: "k" + result { + key: "k" + limit_key: "m" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + test { + key: "m" + result { + key: "m" + limit_key: "n" + group_uid: 2 + split_id: 4 + tablet_uid: 4 + } + server: "server1" + } + test { + key: "n" + result { + key: "n" + limit_key: "p" + group_uid: 2 + split_id: 5 + tablet_uid: 4 + } + server: "server1" + } + } + # Exact range replacement: Insert [m..n)->6 + step { + update { + range { + start_key: "m" + limit_key: "n" + group_uid: 2 + split_id: 6 + generation: "25" + } + } + test { + key: "k" + result { + key: "k" + limit_key: "m" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + test { + key: "m" + result { + key: "m" + limit_key: "n" + group_uid: 2 + split_id: 6 + tablet_uid: 4 + } + server: "server1" + } + test { + key: "n" + result { + key: "n" + limit_key: "p" + group_uid: 2 + split_id: 5 + tablet_uid: 4 + } + server: "server1" + } + } + # Merge ranges, insert [k..o)->7. Now: + # [k..o)->7 + # [o..p)->5 + step { + update { + range { + start_key: "k" + limit_key: "o" + group_uid: 2 + split_id: 7 + generation: "26" + } + } + test { + key: "k" + result { + key: "k" + limit_key: "o" + group_uid: 2 + split_id: 7 + tablet_uid: 4 + } + server: "server1" + } + test { + key: "n" + result { + key: "k" + limit_key: "o" + group_uid: 2 + split_id: 7 + tablet_uid: 4 + } + server: "server1" + } + test { + key: "o" + result { + key: "o" + limit_key: "p" + group_uid: 2 + split_id: 5 + tablet_uid: 4 + } + server: "server1" + } + } + # Inserting an old range does nothing. + step { + update { + range { + start_key: "k" + limit_key: "o" + group_uid: 2 + split_id: 8 + generation: "25" + } + } + test { + key: "k" + result { + key: "k" + limit_key: "o" + group_uid: 2 + split_id: 7 + tablet_uid: 4 + } + server: "server1" + } + } + # Old ranges that are bigger than the existing old ranges are also discarded. + step { + update { + range { + start_key: "a" + limit_key: "z" + group_uid: 2 + split_id: 8 + generation: "25" + } + } + test { + key: "k" + result { + key: "k" + limit_key: "o" + group_uid: 2 + split_id: 7 + tablet_uid: 4 + } + server: "server1" + } + } +} + +test_case { + name: "leader_selection" + step { + update { + range { + start_key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + location: "us-central1" + role: READ_WRITE + incarnation: "44" + distance: 0 + skip: false + } + tablets { + tablet_uid: 5 + server_address: "server2" + location: "us-central1" + role: READ_WRITE + incarnation: "55" + distance: 1 + skip: false + } + tablets { + tablet_uid: 6 + server_address: "server3" + location: "us-central1" + role: READ_WRITE + incarnation: "66" + distance: 10 + skip: false + } + leader_index: 1 + } + } + test { + key: "a" + leader: true + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 5 + } + server: "server2" + } + } + # Update the leader to be tablet 4. + step { + update { + group { + group_uid: 2 + leader_index: 0 + generation: "23" + tablets { + tablet_uid: 4 + server_address: "server1" + location: "us-central1" + role: READ_WRITE + incarnation: "44" + distance: 0 + skip: false + } + tablets { + tablet_uid: 5 + server_address: "server2" + location: "us-central1" + role: READ_WRITE + incarnation: "55" + distance: 1 + skip: false + } + tablets { + tablet_uid: 6 + server_address: "server3" + location: "us-central1" + role: READ_WRITE + incarnation: "66" + distance: 10 + skip: false + } + } + } + test { + key: "a" + leader: true + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + } + # Old generation updates are ignored. + step { + update { + group { + group_uid: 2 + leader_index: 1 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + location: "us-central1" + role: READ_WRITE + incarnation: "44" + distance: 0 + skip: false + } + tablets { + tablet_uid: 5 + server_address: "server2" + location: "us-central1" + role: READ_WRITE + incarnation: "55" + distance: 1 + skip: false + } + tablets { + tablet_uid: 6 + server_address: "server3" + location: "us-central1" + role: READ_WRITE + incarnation: "66" + distance: 10 + skip: false + } + } + } + test { + key: "a" + leader: true + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + } +} + +# We should not use a leader that is too far away, and instead use a close +# non-leader replica. +test_case { + name: "far_away_leader" + step { + update { + range { + start_key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + location: "us-central1" + role: READ_WRITE + incarnation: "44" + distance: 5 + skip: false + } + tablets { + tablet_uid: 5 + server_address: "server2" + location: "us-central1" + role: READ_WRITE + incarnation: "55" + distance: 6 + skip: false + } + leader_index: 1 + } + } + test { + key: "a" + leader: true + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + } +} + +# No leader - make sure we handle leader_index: -1 +test_case { + name: "no_leader" + step { + update { + range { + start_key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + location: "us-central1" + role: READ_WRITE + incarnation: "44" + distance: 0 + skip: false + } + tablets { + tablet_uid: 5 + server_address: "server2" + location: "us-central1" + role: READ_WRITE + incarnation: "55" + distance: 1 + skip: false + } + leader_index: -1 + } + } + test { + key: "a" + leader: true + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + } +} + +test_case { + name: "tablet_location_updates" + step { + update { + range { + start_key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + incarnation: "33" + } + } + } + test { + key: "a" + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + } + step { + update { + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server2" + incarnation: "34" + } + } + } + test { + key: "a" + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server2" + } + } + # Distance updates are allowed with same incarnation. + step { + update { + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server2" + incarnation: "34" + distance: 6 + } + } + } + test { + key: "a" + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + } + } + } + step { + update { + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server2" + incarnation: "34" + distance: 2 + } + } + } + test { + key: "a" + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server2" + } + } +} + +test_case { + name: "replica_reshuffling" + step { + update { + range { + start_key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + location: "us-central1" + role: READ_WRITE + incarnation: "44" + distance: 0 + skip: false + } + tablets { + tablet_uid: 5 + server_address: "server2" + location: "us-central1" + role: READ_WRITE + incarnation: "55" + distance: 1 + skip: false + } + } + } + test { + key: "a" + leader: true + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + } + # Reorder the replicas. The updates should apply correctly, and the new + # first replica should be used. + step { + update { + range { + start_key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 5 + server_address: "server2" + location: "us-central1" + role: READ_WRITE + incarnation: "55" + distance: 0 + skip: false + } + tablets { + tablet_uid: 4 + server_address: "server1" + location: "us-central1" + role: READ_WRITE + incarnation: "44" + distance: 1 + skip: false + } + } + } + test { + key: "a" + leader: true + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 5 + } + server: "server2" + } + } +} + +# Directed read options: region picking +test_case { + name: "directed_read_options" + step { + update { + range { + start_key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + location: "us-central1" + role: READ_WRITE + incarnation: "44" + distance: 0 + skip: false + } + tablets { + tablet_uid: 5 + server_address: "server2" + location: "us-central2" + role: READ_WRITE + incarnation: "55" + distance: 1 + skip: false + } + tablets { + tablet_uid: 6 + server_address: "server3" + location: "us-central3" + role: READ_ONLY + incarnation: "66" + distance: 2 + skip: false + } + } + } + # Specific location + test { + key: "a" + directed_read_options { + include_replicas { + replica_selections { + location: "us-central2" + } + } + } + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 5 + } + server: "server2" + } + # Specific replica type + test { + key: "a" + directed_read_options { + include_replicas { + replica_selections { + type: READ_ONLY + } + } + } + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 6 + } + server: "server3" + } + # Specific location and replica type, match found. + test { + key: "a" + directed_read_options { + include_replicas { + replica_selections { + location: "us-central3" + type: READ_ONLY + } + } + } + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 6 + } + server: "server3" + } + # Specific location and replica type, no match found. + test { + key: "a" + directed_read_options { + include_replicas { + replica_selections { + location: "us-central2" + type: READ_ONLY + } + } + } + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + } + } + # Exclude a location + test { + key: "a" + directed_read_options { + exclude_replicas { + replica_selections { + location: "us-central1" + } + } + } + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 5 + } + server: "server2" + } + # Exclude a replica type + test { + key: "a" + directed_read_options { + exclude_replicas { + replica_selections { + type: READ_WRITE + } + } + } + result { + key: "a" + limit_key: "z" + group_uid: 2 + split_id: 3 + tablet_uid: 6 + } + server: "server3" + } + } +} + +test_case { + name: "range_calls" + step { + update { + range { + start_key: "b" + limit_key: "f" + group_uid: 2 + split_id: 3 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + incarnation: "44" + } + } + } + # Part of the range matching start. + test { + key: "b" + limit_key: "c" + result { + key: "b" + limit_key: "f" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + # Part of the range matching limit. + test { + key: "e" + limit_key: "f" + result { + key: "b" + limit_key: "f" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + # Exact range match. + test { + key: "b" + limit_key: "f" + result { + key: "b" + limit_key: "f" + group_uid: 2 + split_id: 3 + tablet_uid: 4 + } + server: "server1" + } + # Range does not overlap, start. + test { + key: "a" + limit_key: "f" + result { + key: "a" + limit_key: "f" + } + } + # Range does not overlap, limit. + test { + key: "b" + limit_key: "g" + result { + key: "b" + limit_key: "g" + } + } + # Range does not overlap, both sides. + test { + key: "a" + limit_key: "g" + result { + key: "a" + limit_key: "g" + } + } + } +} + +test_case { + name: "range_calls_random" + step { + update { + range { + start_key: "a" + limit_key: "c" + group_uid: 2 + split_id: 3 + generation: "22" + } + range { + start_key: "c" + limit_key: "e" + group_uid: 2 + split_id: 4 + generation: "22" + } + range { + start_key: "e" + limit_key: "g" + group_uid: 2 + split_id: 5 + generation: "22" + } + range { + start_key: "j" + limit_key: "l" + group_uid: 2 + split_id: 6 + generation: "22" + } + range { + start_key: "o" + limit_key: "q" + group_uid: 2 + split_id: 7 + generation: "22" + } + group { + group_uid: 2 + generation: "22" + tablets { + tablet_uid: 4 + server_address: "server1" + incarnation: "44" + } + } + } + # Requested range covers multiple splits with COVERING_SPLIT. + # Should pick nothing. + test { + key: "b" + limit_key: "f" + range_mode: COVERING_SPLIT + result { + key: "b" + limit_key: "f" + } + } + # With PICK_RANDOM, should get a random split that overlaps. + test { + key: "b" + limit_key: "f" + range_mode: PICK_RANDOM + result { + key: "c" + limit_key: "e" + group_uid: 2 + split_id: 4 + tablet_uid: 4 + } + server: "server1" + } + # There is a gap in the cache for the requested ranges, so we should pick + # nothing. Test gaps at the start, in the middle, at the end, and at + # the end of the entire cache. + test { + key: "g" # Matches the limit of prior split. + limit_key: "k" # Inside the next cached split after 'g'. + range_mode: PICK_RANDOM + result { + key: "g" + limit_key: "k" + } + } + test { + key: "h" # In a gap between cached splits. + limit_key: "k" # Inside the next cached split after 'h'. + range_mode: PICK_RANDOM + result { + key: "h" + limit_key: "k" + } + } + test { + key: "f" # Inside a cached split + limit_key: "k" # Inside another cached split, but a gap between f and k. + range_mode: PICK_RANDOM + result { + key: "f" + limit_key: "k" + } + } + test { + key: "k" # Inside a cached split. + limit_key: "m" # In a gap between the cached split and the next one. + range_mode: PICK_RANDOM + result { + key: "k" + limit_key: "m" + } + } + test { + key: "p" # In the last cached split in the cache. + limit_key: "z" # Should cause iteration to hit the end of the cache. + range_mode: PICK_RANDOM + result { + key: "p" + limit_key: "z" + } + } + # Gaps are okay if we have enough cached entries. + # Test the boundary condition first - we only have 5 entries in the cache. + test { + key: "a" + limit_key: "z" + range_mode: PICK_RANDOM + min_cache_entries_for_random_pick: 6 + result { + key: "a" + limit_key: "z" + } + } + test { + key: "a" + limit_key: "z" + range_mode: PICK_RANDOM + min_cache_entries_for_random_pick: 5 + result { + key: "e" + limit_key: "g" + group_uid: 2 + split_id: 5 + tablet_uid: 4 + } + server: "server1" + } + } +} + + diff --git a/google-cloud-spanner/src/test/resources/recipe_test.textproto b/google-cloud-spanner/src/test/resources/recipe_test.textproto new file mode 100644 index 00000000000..43fae04f5ec --- /dev/null +++ b/google-cloud-spanner/src/test/resources/recipe_test.textproto @@ -0,0 +1,3943 @@ +test_case { + name: "DataTypeTest_BOOL" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_BOOL" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: BOOL + } + identifier: "k" + } + } + } + test { + key { + values { + bool_value: false + } + } + start: "A\206\310\002\234\200\000" + } + test { + key { + values { + bool_value: true + } + } + start: "A\206\310\002\234\200\002" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000" + } + test { + key { + values { + string_value: "true" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + number_value: 0 + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key_range { + start_closed { + values { + bool_value: false + } + } + end_open { + values { + bool_value: true + } + } + } + start: "A\206\310\002\234\200\000" + limit: "A\206\310\002\234\200\002" + } + test { + key_range { + start_open { + values { + bool_value: false + } + } + end_closed { + values { + bool_value: true + } + } + } + start: "A\206\310\002\234\200\001" + limit: "A\206\310\002\234\200\003" + } + test { + key_range { + start_closed { + values { + bool_value: false + } + } + end_closed { + values { + bool_value: true + } + } + } + start: "A\206\310\002\234\200\000" + limit: "A\206\310\002\234\200\003" + } + test { + key_range { + start_open { + values { + bool_value: false + } + } + end_open { + values { + bool_value: true + } + } + } + start: "A\206\310\002\234\200\001" + limit: "A\206\310\002\234\200\002" + } +} + +test_case { + name: "DataTypeTest_BOOL_Desc" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_BOOL_Desc" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: DESCENDING + null_order: NULLS_LAST + type { + code: BOOL + } + identifier: "k" + } + } + } + test { + key { + values { + bool_value: true + } + } + start: "A\206\310\002\273\250\374" + } + test { + key { + values { + bool_value: false + } + } + start: "A\206\310\002\273\250\376" + } + test { + key_range { + start_closed { + values { + bool_value: true + } + } + end_open { + values { + bool_value: false + } + } + } + start: "A\206\310\002\273\250\374" + limit: "A\206\310\002\273\250\376" + } + test { + key_range { + start_open { + values { + bool_value: true + } + } + end_closed { + values { + bool_value: false + } + } + } + start: "A\206\310\002\273\250\375" + limit: "A\206\310\002\273\250\377" + } + test { + key_range { + start_closed { + values { + bool_value: true + } + } + end_closed { + values { + bool_value: false + } + } + } + start: "A\206\310\002\273\250\374" + limit: "A\206\310\002\273\250\377" + } + test { + key_range { + start_open { + values { + bool_value: true + } + } + end_open { + values { + bool_value: false + } + } + } + start: "A\206\310\002\273\250\375" + limit: "A\206\310\002\273\250\376" + } +} + +test_case { + name: "DataTypeTest_ENUM" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_ENUM" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: ENUM + proto_type_fqn: "spanner.test.TestEnum" + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "1" + } + } + start: "A\206\310\002\234\221\002" + } + test { + key { + values { + string_value: "2" + } + } + start: "A\206\310\002\234\221\004" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000" + } + test { + key { + values { + string_value: "NUMBER_ONE" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + number_value: 0 + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key_range { + start_closed { + values { + string_value: "1" + } + } + end_open { + values { + string_value: "2" + } + } + } + start: "A\206\310\002\234\221\002" + limit: "A\206\310\002\234\221\004" + } + test { + key_range { + start_open { + values { + string_value: "1" + } + } + end_closed { + values { + string_value: "2" + } + } + } + start: "A\206\310\002\234\221\003" + limit: "A\206\310\002\234\221\005" + } + test { + key_range { + start_closed { + values { + string_value: "1" + } + } + end_closed { + values { + string_value: "2" + } + } + } + start: "A\206\310\002\234\221\002" + limit: "A\206\310\002\234\221\005" + } + test { + key_range { + start_open { + values { + string_value: "1" + } + } + end_open { + values { + string_value: "2" + } + } + } + start: "A\206\310\002\234\221\003" + limit: "A\206\310\002\234\221\004" + } +} + +test_case { + name: "DataTypeTest_ENUM_Desc" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_ENUM_Desc" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: DESCENDING + null_order: NULLS_LAST + type { + code: ENUM + proto_type_fqn: "spanner.test.TestEnum" + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "2" + } + } + start: "A\206\310\002\273\260\372" + } + test { + key { + values { + string_value: "1" + } + } + start: "A\206\310\002\273\260\374" + } + test { + key_range { + start_closed { + values { + string_value: "2" + } + } + end_open { + values { + string_value: "1" + } + } + } + start: "A\206\310\002\273\260\372" + limit: "A\206\310\002\273\260\374" + } + test { + key_range { + start_open { + values { + string_value: "2" + } + } + end_closed { + values { + string_value: "1" + } + } + } + start: "A\206\310\002\273\260\373" + limit: "A\206\310\002\273\260\375" + } + test { + key_range { + start_closed { + values { + string_value: "2" + } + } + end_closed { + values { + string_value: "1" + } + } + } + start: "A\206\310\002\273\260\372" + limit: "A\206\310\002\273\260\375" + } + test { + key_range { + start_open { + values { + string_value: "2" + } + } + end_open { + values { + string_value: "1" + } + } + } + start: "A\206\310\002\273\260\373" + limit: "A\206\310\002\273\260\374" + } +} + +test_case { + name: "DataTypeTest_INT64" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_INT64" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "-9223372036854775808" + } + } + start: "A\206\310\002\234\211\000\000\000\000\000\000\000\000" + } + test { + key { + values { + string_value: "9223372036854775807" + } + } + start: "A\206\310\002\234\230\377\377\377\377\377\377\377\376" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000" + } + test { + key { + values { + string_value: "0" + } + } + start: "A\206\310\002\234\221\000" + } + test { + key { + values { + string_value: "-1" + } + } + start: "A\206\310\002\234\220\376" + } + test { + key { + values { + string_value: "1" + } + } + start: "A\206\310\002\234\221\002" + } + test { + key { + values { + number_value: 1 + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "Infinity" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key_range { + start_closed { + values { + string_value: "-9223372036854775808" + } + } + end_open { + values { + string_value: "9223372036854775807" + } + } + } + start: "A\206\310\002\234\211\000\000\000\000\000\000\000\000" + limit: "A\206\310\002\234\230\377\377\377\377\377\377\377\376" + } + test { + key_range { + start_open { + values { + string_value: "-9223372036854775808" + } + } + end_closed { + values { + string_value: "9223372036854775807" + } + } + } + start: "A\206\310\002\234\211\000\000\000\000\000\000\000\001" + limit: "A\206\310\002\234\230\377\377\377\377\377\377\377\377" + } + test { + key_range { + start_closed { + values { + string_value: "-9223372036854775808" + } + } + end_closed { + values { + string_value: "9223372036854775807" + } + } + } + start: "A\206\310\002\234\211\000\000\000\000\000\000\000\000" + limit: "A\206\310\002\234\230\377\377\377\377\377\377\377\377" + } + test { + key_range { + start_open { + values { + string_value: "-9223372036854775808" + } + } + end_open { + values { + string_value: "9223372036854775807" + } + } + } + start: "A\206\310\002\234\211\000\000\000\000\000\000\000\001" + limit: "A\206\310\002\234\230\377\377\377\377\377\377\377\376" + } +} + +test_case { + name: "DataTypeTest_INT64_Desc" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_INT64_Desc" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: DESCENDING + null_order: NULLS_LAST + type { + code: INT64 + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "9223372036854775807" + } + } + start: "A\206\310\002\273\251\000\000\000\000\000\000\000\000" + } + test { + key { + values { + string_value: "-9223372036854775808" + } + } + start: "A\206\310\002\273\270\377\377\377\377\377\377\377\376" + } + test { + key_range { + start_closed { + values { + string_value: "9223372036854775807" + } + } + end_open { + values { + string_value: "-9223372036854775808" + } + } + } + start: "A\206\310\002\273\251\000\000\000\000\000\000\000\000" + limit: "A\206\310\002\273\270\377\377\377\377\377\377\377\376" + } + test { + key_range { + start_open { + values { + string_value: "9223372036854775807" + } + } + end_closed { + values { + string_value: "-9223372036854775808" + } + } + } + start: "A\206\310\002\273\251\000\000\000\000\000\000\000\001" + limit: "A\206\310\002\273\270\377\377\377\377\377\377\377\377" + } + test { + key_range { + start_closed { + values { + string_value: "9223372036854775807" + } + } + end_closed { + values { + string_value: "-9223372036854775808" + } + } + } + start: "A\206\310\002\273\251\000\000\000\000\000\000\000\000" + limit: "A\206\310\002\273\270\377\377\377\377\377\377\377\377" + } + test { + key_range { + start_open { + values { + string_value: "9223372036854775807" + } + } + end_open { + values { + string_value: "-9223372036854775808" + } + } + } + start: "A\206\310\002\273\251\000\000\000\000\000\000\000\001" + limit: "A\206\310\002\273\270\377\377\377\377\377\377\377\376" + } +} + +test_case { + name: "DataTypeTest_FLOAT64" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_FLOAT64" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: FLOAT64 + } + identifier: "k" + } + } + } + test { + key { + values { + number_value: -1.7976931348623157e+308 + } + } + start: "A\206\310\002\234\302\000 \000\000\000\000\000\002" + } + test { + key { + values { + number_value: 1.7976931348623157e+308 + } + } + start: "A\206\310\002\234\321\377\337\377\377\377\377\377\376" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000" + } + test { + key { + values { + number_value: 0 + } + } + start: "A\206\310\002\234\312\000" + } + test { + key { + values { + number_value: -1 + } + } + start: "A\206\310\002\234\302\200 \000\000\000\000\000\000" + } + test { + key { + values { + number_value: 1 + } + } + start: "A\206\310\002\234\321\177\340\000\000\000\000\000\000" + } + test { + key { + values { + string_value: "Infinity" + } + } + start: "A\206\310\002\234\321\377\340\000\000\000\000\000\000" + } + test { + key { + values { + string_value: "-Infinity" + } + } + start: "A\206\310\002\234\302\000 \000\000\000\000\000\000" + } + test { + key { + values { + string_value: "NaN" + } + } + start: "A\206\310\002\234\321\377\360\000\000\000\000\000\000" + } + test { + key { + values { + string_value: "UnexpectedString" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + bool_value: true + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key_range { + start_closed { + values { + number_value: -1.7976931348623157e+308 + } + } + end_open { + values { + number_value: 1.7976931348623157e+308 + } + } + } + start: "A\206\310\002\234\302\000 \000\000\000\000\000\002" + limit: "A\206\310\002\234\321\377\337\377\377\377\377\377\376" + } + test { + key_range { + start_open { + values { + number_value: -1.7976931348623157e+308 + } + } + end_closed { + values { + number_value: 1.7976931348623157e+308 + } + } + } + start: "A\206\310\002\234\302\000 \000\000\000\000\000\003" + limit: "A\206\310\002\234\321\377\337\377\377\377\377\377\377" + } + test { + key_range { + start_closed { + values { + number_value: -1.7976931348623157e+308 + } + } + end_closed { + values { + number_value: 1.7976931348623157e+308 + } + } + } + start: "A\206\310\002\234\302\000 \000\000\000\000\000\002" + limit: "A\206\310\002\234\321\377\337\377\377\377\377\377\377" + } + test { + key_range { + start_open { + values { + number_value: -1.7976931348623157e+308 + } + } + end_open { + values { + number_value: 1.7976931348623157e+308 + } + } + } + start: "A\206\310\002\234\302\000 \000\000\000\000\000\003" + limit: "A\206\310\002\234\321\377\337\377\377\377\377\377\376" + } +} + +test_case { + name: "DataTypeTest_FLOAT64_Desc" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_FLOAT64_Desc" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: DESCENDING + null_order: NULLS_LAST + type { + code: FLOAT64 + } + identifier: "k" + } + } + } + test { + key { + values { + number_value: 1.7976931348623157e+308 + } + } + start: "A\206\310\002\273\322\000 \000\000\000\000\000\000" + } + test { + key { + values { + number_value: -1.7976931348623157e+308 + } + } + start: "A\206\310\002\273\341\377\337\377\377\377\377\377\374" + } + test { + key_range { + start_closed { + values { + number_value: 1.7976931348623157e+308 + } + } + end_open { + values { + number_value: -1.7976931348623157e+308 + } + } + } + start: "A\206\310\002\273\322\000 \000\000\000\000\000\000" + limit: "A\206\310\002\273\341\377\337\377\377\377\377\377\374" + } + test { + key_range { + start_open { + values { + number_value: 1.7976931348623157e+308 + } + } + end_closed { + values { + number_value: -1.7976931348623157e+308 + } + } + } + start: "A\206\310\002\273\322\000 \000\000\000\000\000\001" + limit: "A\206\310\002\273\341\377\337\377\377\377\377\377\375" + } + test { + key_range { + start_closed { + values { + number_value: 1.7976931348623157e+308 + } + } + end_closed { + values { + number_value: -1.7976931348623157e+308 + } + } + } + start: "A\206\310\002\273\322\000 \000\000\000\000\000\000" + limit: "A\206\310\002\273\341\377\337\377\377\377\377\377\375" + } + test { + key_range { + start_open { + values { + number_value: 1.7976931348623157e+308 + } + } + end_open { + values { + number_value: -1.7976931348623157e+308 + } + } + } + start: "A\206\310\002\273\322\000 \000\000\000\000\000\001" + limit: "A\206\310\002\273\341\377\337\377\377\377\377\377\374" + } +} + +test_case { + name: "DataTypeTest_TIMESTAMP" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_TIMESTAMP" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: TIMESTAMP + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + start: "A\206\310\002\234\231\177\377\020\377\020\361\210n\t\000\360\000\360\000\360\000\360\000\360\000x" + } + test { + key { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + start: "A\206\310\002\234\231\200\000\360\000\360:\377\020\364A\177;\232\311\377\020\000x" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000" + } + test { + key { + values { + string_value: "1970-01-01T00:00:00Z" + } + } + start: "A\206\310\002\234\231\200\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000x" + } + test { + key { + values { + string_value: "2023-10-26T10:00:00Z" + } + } + start: "A\206\310\002\234\231\200\000\360\000\360\000\360e:8\240\000\360\000\360\000\360\000\360\000x" + } + test { + key { + values { + string_value: "2023-10-26T10:00:00.1234567890Z" + } + } + start: "A\206\310\002\234\231\200\000\360\000\360\000\360e:8\240\007[\315\025\000x" + } + test { + key { + values { + string_value: "2023-10-26T10:00:00.1234567891Z" + } + } + start: "A\206\310\002\234\231\200\000\360\000\360\000\360e:8\240\007[\315\025\000x" + } + test { + key { + values { + string_value: "2023-10-26T10:00:00.1234567899Z" + } + } + start: "A\206\310\002\234\231\200\000\360\000\360\000\360e:8\240\007[\315\025\000x" + } + test { + key { + values { + string_value: "0000-10-26T10:00:00Z" + } + } + start: "A\206\310\002\234\231\177\377\020\377\020\361\210\026A \000\360\000\360\000\360\000\360\000x" + } + test { + key { + values { + string_value: "NOT A TIMESTAMP" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + number_value: 0 + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-10-26T10:00:00" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-10-26T10:00:00z" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-10-26T10:00:00+07:00" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-13-26T10:00:00Z" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-10-26T10:00:61Z" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-10-26 10:00:00Z" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "10000-10-26T10:00:00Z" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key_range { + start_closed { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + end_open { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + } + start: "A\206\310\002\234\231\177\377\020\377\020\361\210n\t\000\360\000\360\000\360\000\360\000\360\000x" + limit: "A\206\310\002\234\231\200\000\360\000\360:\377\020\364A\177;\232\311\377\020\000x" + } + test { + key_range { + start_open { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + end_closed { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + } + start: "A\206\310\002\234\231\177\377\020\377\020\361\210n\t\000\360\000\360\000\360\000\360\000\360\000y" + limit: "A\206\310\002\234\231\200\000\360\000\360:\377\020\364A\177;\232\311\377\020\000y" + } + test { + key_range { + start_closed { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + end_closed { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + } + start: "A\206\310\002\234\231\177\377\020\377\020\361\210n\t\000\360\000\360\000\360\000\360\000\360\000x" + limit: "A\206\310\002\234\231\200\000\360\000\360:\377\020\364A\177;\232\311\377\020\000y" + } + test { + key_range { + start_open { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + end_open { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + } + start: "A\206\310\002\234\231\177\377\020\377\020\361\210n\t\000\360\000\360\000\360\000\360\000\360\000y" + limit: "A\206\310\002\234\231\200\000\360\000\360:\377\020\364A\177;\232\311\377\020\000x" + } +} + +test_case { + name: "DataTypeTest_TIMESTAMP_Desc" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_TIMESTAMP_Desc" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: DESCENDING + null_order: NULLS_LAST + type { + code: TIMESTAMP + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + start: "A\206\310\002\273\271\177\377\020\377\020\305\000\360\013\276\200\304e6\000\360\377x" + } + test { + key { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + start: "A\206\310\002\273\271\200\000\360\000\360\016w\221\366\377\020\377\020\377\020\377\020\377\020\377x" + } + test { + key_range { + start_closed { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + end_open { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + } + start: "A\206\310\002\273\271\177\377\020\377\020\305\000\360\013\276\200\304e6\000\360\377x" + limit: "A\206\310\002\273\271\200\000\360\000\360\016w\221\366\377\020\377\020\377\020\377\020\377\020\377x" + } + test { + key_range { + start_open { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + end_closed { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + } + start: "A\206\310\002\273\271\177\377\020\377\020\305\000\360\013\276\200\304e6\000\360\377y" + limit: "A\206\310\002\273\271\200\000\360\000\360\016w\221\366\377\020\377\020\377\020\377\020\377\020\377y" + } + test { + key_range { + start_closed { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + end_closed { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + } + start: "A\206\310\002\273\271\177\377\020\377\020\305\000\360\013\276\200\304e6\000\360\377x" + limit: "A\206\310\002\273\271\200\000\360\000\360\016w\221\366\377\020\377\020\377\020\377\020\377\020\377y" + } + test { + key_range { + start_open { + values { + string_value: "9999-12-31T23:59:59.999999999Z" + } + } + end_open { + values { + string_value: "0001-01-01T00:00:00Z" + } + } + } + start: "A\206\310\002\273\271\177\377\020\377\020\305\000\360\013\276\200\304e6\000\360\377y" + limit: "A\206\310\002\273\271\200\000\360\000\360\016w\221\366\377\020\377\020\377\020\377\020\377\020\377x" + } +} + +test_case { + name: "DataTypeTest_DATE" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_DATE" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: DATE + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "0000-01-01" + } + } + start: "A\206\310\002\234\216\352\n\260" + } + test { + key { + values { + string_value: "9999-12-31" + } + } + start: "A\206\310\002\234\223Y\201@" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000" + } + test { + key { + values { + string_value: "1970-01-01" + } + } + start: "A\206\310\002\234\221\000" + } + test { + key { + values { + string_value: "2023-10-26" + } + } + start: "A\206\310\002\234\222\231\220" + } + test { + key { + values { + string_value: "NOT A DATE" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + number_value: 0 + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-13-01" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-12-32" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "10000-01-01" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-1-1" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-01-001" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023/01/01" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "2023-01-01T10:00:00Z" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key_range { + start_closed { + values { + string_value: "0000-01-01" + } + } + end_open { + values { + string_value: "9999-12-31" + } + } + } + start: "A\206\310\002\234\216\352\n\260" + limit: "A\206\310\002\234\223Y\201@" + } + test { + key_range { + start_open { + values { + string_value: "0000-01-01" + } + } + end_closed { + values { + string_value: "9999-12-31" + } + } + } + start: "A\206\310\002\234\216\352\n\261" + limit: "A\206\310\002\234\223Y\201A" + } + test { + key_range { + start_closed { + values { + string_value: "0000-01-01" + } + } + end_closed { + values { + string_value: "9999-12-31" + } + } + } + start: "A\206\310\002\234\216\352\n\260" + limit: "A\206\310\002\234\223Y\201A" + } + test { + key_range { + start_open { + values { + string_value: "0000-01-01" + } + } + end_open { + values { + string_value: "9999-12-31" + } + } + } + start: "A\206\310\002\234\216\352\n\261" + limit: "A\206\310\002\234\223Y\201@" + } +} + +test_case { + name: "DataTypeTest_DATE_Desc" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_DATE_Desc" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: DESCENDING + null_order: NULLS_LAST + type { + code: DATE + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "9999-12-31" + } + } + start: "A\206\310\002\273\256\246~\276" + } + test { + key { + values { + string_value: "0000-01-01" + } + } + start: "A\206\310\002\273\263\025\365N" + } + test { + key_range { + start_closed { + values { + string_value: "9999-12-31" + } + } + end_open { + values { + string_value: "0000-01-01" + } + } + } + start: "A\206\310\002\273\256\246~\276" + limit: "A\206\310\002\273\263\025\365N" + } + test { + key_range { + start_open { + values { + string_value: "9999-12-31" + } + } + end_closed { + values { + string_value: "0000-01-01" + } + } + } + start: "A\206\310\002\273\256\246~\277" + limit: "A\206\310\002\273\263\025\365O" + } + test { + key_range { + start_closed { + values { + string_value: "9999-12-31" + } + } + end_closed { + values { + string_value: "0000-01-01" + } + } + } + start: "A\206\310\002\273\256\246~\276" + limit: "A\206\310\002\273\263\025\365O" + } + test { + key_range { + start_open { + values { + string_value: "9999-12-31" + } + } + end_open { + values { + string_value: "0000-01-01" + } + } + } + start: "A\206\310\002\273\256\246~\277" + limit: "A\206\310\002\273\263\025\365N" + } +} + +test_case { + name: "DataTypeTest_STRING" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_STRING" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "" + } + } + start: "A\206\310\002\234\231\000x" + } + test { + key { + values { + string_value: "ZZZZZZZ" + } + } + start: "A\206\310\002\234\231ZZZZZZZ\000x" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000" + } + test { + key_range { + start_closed { + values { + string_value: "" + } + } + end_open { + values { + string_value: "ZZZZZZZ" + } + } + } + start: "A\206\310\002\234\231\000x" + limit: "A\206\310\002\234\231ZZZZZZZ\000x" + } + test { + key_range { + start_open { + values { + string_value: "" + } + } + end_closed { + values { + string_value: "ZZZZZZZ" + } + } + } + start: "A\206\310\002\234\231\000y" + limit: "A\206\310\002\234\231ZZZZZZZ\000y" + } + test { + key_range { + start_closed { + values { + string_value: "" + } + } + end_closed { + values { + string_value: "ZZZZZZZ" + } + } + } + start: "A\206\310\002\234\231\000x" + limit: "A\206\310\002\234\231ZZZZZZZ\000y" + } + test { + key_range { + start_open { + values { + string_value: "" + } + } + end_open { + values { + string_value: "ZZZZZZZ" + } + } + } + start: "A\206\310\002\234\231\000y" + limit: "A\206\310\002\234\231ZZZZZZZ\000x" + } +} + +test_case { + name: "DataTypeTest_STRING_Desc" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_STRING_Desc" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: DESCENDING + null_order: NULLS_LAST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "ZZZZZZZ" + } + } + start: "A\206\310\002\273\271\245\245\245\245\245\245\245\377x" + } + test { + key { + values { + string_value: "" + } + } + start: "A\206\310\002\273\271\377x" + } + test { + key_range { + start_closed { + values { + string_value: "ZZZZZZZ" + } + } + end_open { + values { + string_value: "" + } + } + } + start: "A\206\310\002\273\271\245\245\245\245\245\245\245\377x" + limit: "A\206\310\002\273\271\377x" + } + test { + key_range { + start_open { + values { + string_value: "ZZZZZZZ" + } + } + end_closed { + values { + string_value: "" + } + } + } + start: "A\206\310\002\273\271\245\245\245\245\245\245\245\377y" + limit: "A\206\310\002\273\271\377y" + } + test { + key_range { + start_closed { + values { + string_value: "ZZZZZZZ" + } + } + end_closed { + values { + string_value: "" + } + } + } + start: "A\206\310\002\273\271\245\245\245\245\245\245\245\377x" + limit: "A\206\310\002\273\271\377y" + } + test { + key_range { + start_open { + values { + string_value: "ZZZZZZZ" + } + } + end_open { + values { + string_value: "" + } + } + } + start: "A\206\310\002\273\271\245\245\245\245\245\245\245\377y" + limit: "A\206\310\002\273\271\377x" + } +} + +test_case { + name: "DataTypeTest_BYTES" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_BYTES" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: BYTES + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "" + } + } + start: "A\206\310\002\234\231\000x" + } + test { + key { + values { + string_value: "/////w==" + } + } + start: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\000x" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000" + } + test { + key { + values { + string_value: "" + } + } + start: "A\206\310\002\234\231\000x" + } + test { + key_range { + start_closed { + values { + string_value: "" + } + } + end_open { + values { + string_value: "/////w==" + } + } + } + start: "A\206\310\002\234\231\000x" + limit: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\000x" + } + test { + key_range { + start_open { + values { + string_value: "" + } + } + end_closed { + values { + string_value: "/////w==" + } + } + } + start: "A\206\310\002\234\231\000y" + limit: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\000y" + } + test { + key_range { + start_closed { + values { + string_value: "" + } + } + end_closed { + values { + string_value: "/////w==" + } + } + } + start: "A\206\310\002\234\231\000x" + limit: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\000y" + } + test { + key_range { + start_open { + values { + string_value: "" + } + } + end_open { + values { + string_value: "/////w==" + } + } + } + start: "A\206\310\002\234\231\000y" + limit: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\000x" + } +} + +test_case { + name: "DataTypeTest_BYTES_Desc" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_BYTES_Desc" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: DESCENDING + null_order: NULLS_LAST + type { + code: BYTES + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "/////w==" + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\377x" + } + test { + key { + values { + string_value: "" + } + } + start: "A\206\310\002\273\271\377x" + } + test { + key_range { + start_closed { + values { + string_value: "/////w==" + } + } + end_open { + values { + string_value: "" + } + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\377x" + limit: "A\206\310\002\273\271\377x" + } + test { + key_range { + start_open { + values { + string_value: "/////w==" + } + } + end_closed { + values { + string_value: "" + } + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\377y" + limit: "A\206\310\002\273\271\377y" + } + test { + key_range { + start_closed { + values { + string_value: "/////w==" + } + } + end_closed { + values { + string_value: "" + } + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\377x" + limit: "A\206\310\002\273\271\377y" + } + test { + key_range { + start_open { + values { + string_value: "/////w==" + } + } + end_open { + values { + string_value: "" + } + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\377y" + limit: "A\206\310\002\273\271\377x" + } +} + +test_case { + name: "NumericBasic" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "NumericBasic" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: NUMERIC + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "123" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + number_value: 123 + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } +} + +test_case { + name: "NumericMultiPart" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "NumericMultiPart" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "user_id" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: NUMERIC + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "123" + } + values { + string_value: "456" + } + } + start: "A\206\310\002\234\221\366" + limit: "A\206\310\002\234\221\367" + approximate: true + } +} + +test_case { + name: "DataTypeTest_UUID" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_UUID" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: UUID + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + start: "A\206\310\002\234\231\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000x" + } + test { + key { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + start: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\000x" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000" + } + test { + key { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + start: "A\206\310\002\234\231\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000x" + } + test { + key { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + start: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\000x" + } + test { + key { + values { + string_value: "12345678-1234-1234-1234-1234567890ab" + } + } + start: "A\206\310\002\234\231\0224Vx\0224\0224\0224\0224Vx\220\253\000x" + } + test { + key { + values { + string_value: "12345678-1234-1234-1234-1234567890AB" + } + } + start: "A\206\310\002\234\231\0224Vx\0224\0224\0224\0224Vx\220\253\000x" + } + test { + key { + values { + string_value: "{12345678-1234-1234-1234-1234567890ad}" + } + } + start: "A\206\310\002\234\231\0224Vx\0224\0224\0224\0224Vx\220\255\000x" + } + test { + key { + values { + string_value: "{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}" + } + } + start: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\000x" + } + test { + key { + values { + string_value: "NOT A UUID" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + number_value: 0 + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678x1234-1234-1234-1234567890ab" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678-1234-1234-1234-1234567890a" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678-1234-1234-1234-1234567890abc" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678-1234-1234-1234-1234567890ag" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "123456781234-1234-1234-1234567890ab" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678-12341234-1234-1234567890ab" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678-1234-12341234-1234567890ab" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678-1234-1234-12341234567890ab" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "-12345678-1234-1234-1234-1234567890ab" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678-1234-1234-1234-1234567890ab-" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678--1234-1234-1234-1234567890ab" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "{12345678-1234-1234-1234-1234567890ab" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678-1234-1234-1234-1234567890ab}" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "{{12345678-1234-1234-1234-1234567890ab}}" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key { + values { + string_value: "12345678-{1234-1234-1234}-1234567890ab" + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } + test { + key_range { + start_closed { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + end_open { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + } + start: "A\206\310\002\234\231\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000x" + limit: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\000x" + } + test { + key_range { + start_open { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + end_closed { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + } + start: "A\206\310\002\234\231\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000y" + limit: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\000y" + } + test { + key_range { + start_closed { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + end_closed { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + } + start: "A\206\310\002\234\231\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000x" + limit: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\000y" + } + test { + key_range { + start_open { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + end_open { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + } + start: "A\206\310\002\234\231\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000y" + limit: "A\206\310\002\234\231\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\000x" + } +} + +test_case { + name: "DataTypeTest_UUID_Desc" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "DataTypeTest_UUID_Desc" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: DESCENDING + null_order: NULLS_LAST + type { + code: UUID + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\377x" + } + test { + key { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + start: "A\206\310\002\273\271\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377x" + } + test { + key_range { + start_closed { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + end_open { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\377x" + limit: "A\206\310\002\273\271\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377x" + } + test { + key_range { + start_open { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + end_closed { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\377y" + limit: "A\206\310\002\273\271\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377y" + } + test { + key_range { + start_closed { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + end_closed { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\377x" + limit: "A\206\310\002\273\271\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377y" + } + test { + key_range { + start_open { + values { + string_value: "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + end_open { + values { + string_value: "00000000-0000-0000-0000-000000000000" + } + } + } + start: "A\206\310\002\273\271\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\000\360\377y" + limit: "A\206\310\002\273\271\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377\020\377x" + } +} + +test_case { + name: "NotNull" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "NotNull" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NOT_NULL + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "" + } + } + start: "A\206\310\002\231\000x" + } + test { + key { + values { + string_value: "foo" + } + } + start: "A\206\310\002\231foo\000x" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } +} + +test_case { + name: "NullsLast" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "NullsLast" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_LAST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "" + } + } + start: "A\206\310\002\273\231\000x" + } + test { + key { + values { + string_value: "foo" + } + } + start: "A\206\310\002\273\231foo\000x" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\274\000" + } +} + +test_case { + name: "MultiPart" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "MultiPart" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k1" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k2" + } + } + } + test { + key { + values { + string_value: "foo" + } + values { + string_value: "8" + } + } + start: "A\206\310\002\234\231foo\000x\234\221\020" + } + test { + key { + values { + string_value: "foo" + } + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\234\231foo\000x\233\000" + } + test { + key { + values { + null_value: NULL_VALUE + } + values { + string_value: "8" + } + } + start: "A\206\310\002\233\000\234\221\020" + } + test { + key { + values { + null_value: NULL_VALUE + } + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000\233\000" + } + test { + key_range { + start_closed { + values { + string_value: "A" + } + } + end_closed { + values { + string_value: "Z" + } + } + } + start: "A\206\310\002\234\231A\000x" + limit: "A\206\310\002\234\231Z\000y" + } + test { + key_range { + start_closed { + values { + string_value: "A" + } + values { + string_value: "4" + } + } + end_closed { + values { + string_value: "A" + } + values { + string_value: "7" + } + } + } + start: "A\206\310\002\234\231A\000x\234\221\010" + limit: "A\206\310\002\234\231A\000x\234\221\017" + } +} + +test_case { + name: "Interleaved" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "C" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + part { + tag: 2 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k2" + } + } + } + test { + key { + values { + string_value: "foo" + } + values { + string_value: "99" + } + } + start: "A\206\310\002\234\231foo\000x\004\234\221\306" + } + test { + key { + values { + string_value: "foo" + } + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\234\231foo\000x\004\233\000" + } + test { + key { + values { + null_value: NULL_VALUE + } + values { + string_value: "99" + } + } + start: "A\206\310\002\233\000\004\234\221\306" + } + test { + key { + values { + null_value: NULL_VALUE + } + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000\004\233\000" + } + test { + key_range { + start_closed { + values { + string_value: "A" + } + } + end_closed { + values { + string_value: "Z" + } + } + } + start: "A\206\310\002\234\231A\000x\004" + limit: "A\206\310\002\234\231Z\000x\005" + } + test { + key_range { + start_closed { + values { + string_value: "A" + } + values { + string_value: "4" + } + } + end_closed { + values { + string_value: "A" + } + values { + string_value: "7" + } + } + } + start: "A\206\310\002\234\231A\000x\004\234\221\010" + limit: "A\206\310\002\234\231A\000x\004\234\221\017" + } +} + +test_case { + name: "GeneratedKeyColumns" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k3" + } + } + } + test { + key { + values { + string_value: "foo" + } + values { + string_value: "99" + } + } + start: "A\206\310\002\234\231foo\000x\234\221\306" + } + test { + key { + values { + string_value: "foo" + } + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\234\231foo\000x\233\000" + } + test { + key { + values { + null_value: NULL_VALUE + } + values { + string_value: "99" + } + } + start: "A\206\310\002\233\000\234\221\306" + } + test { + key { + values { + null_value: NULL_VALUE + } + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\233\000\233\000" + } + test { + key_range { + start_closed { + values { + string_value: "A" + } + values { + string_value: "4" + } + } + end_closed { + values { + string_value: "A" + } + values { + string_value: "7" + } + } + } + start: "A\206\310\002\234\231A\000x\234\221\010" + limit: "A\206\310\002\234\231A\000x\234\221\017" + } +} + +test_case { + name: "GlobalIndex" + recipes { + schema_generation: "\001\001" + recipe { + index_name: "I" + part { + tag: 1 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k2" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "8" + } + } + start: "\002\002\234\221\020" + limit: "\002\002\234\221\021" + } + test { + key { + values { + null_value: NULL_VALUE + } + } + start: "\002\002\233\000" + limit: "\002\002\233\001" + } +} + +test_case { + name: "LocalIndex" + recipes { + schema_generation: "\001\001" + recipe { + index_name: "I" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + part { + tag: 3 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k3" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k2" + } + } + } + test { + key { + values { + string_value: "foo" + } + values { + string_value: "8" + } + } + start: "A\206\310\002\234\231foo\000x\006\234\221\020" + limit: "A\206\310\002\234\231foo\000x\006\234\221\021" + } + test { + key { + values { + string_value: "foo" + } + values { + null_value: NULL_VALUE + } + } + start: "A\206\310\002\234\231foo\000x\006\233\000" + limit: "A\206\310\002\234\231foo\000x\006\233\001" + } +} + +test_case { + name: "KeySet" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "KeySet" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k" + } + } + } + test { + key_set { + keys { + values { + string_value: "99" + } + } + } + start: "A\206\310\002\234\221\306" + } + test { + key_set { + ranges { + start_closed { + values { + string_value: "1" + } + } + end_open { + values { + string_value: "10" + } + } + } + } + start: "A\206\310\002\234\221\002" + limit: "A\206\310\002\234\221\024" + } + test { + key_set { + keys { + values { + string_value: "99" + } + } + keys { + values { + string_value: "101" + } + } + } + start: "A\206\310\002\234\221\306" + limit: "A\206\310\002\234\221\313" + } + test { + key_set { + ranges { + start_closed { + values { + string_value: "1" + } + } + end_open { + values { + string_value: "10" + } + } + } + ranges { + start_closed { + values { + string_value: "20" + } + } + end_open { + values { + string_value: "30" + } + } + } + } + start: "A\206\310\002\234\221\002" + limit: "A\206\310\002\234\221<" + } + test { + key_set { + keys { + values { + string_value: "1" + } + } + ranges { + start_closed { + values { + string_value: "5" + } + } + end_open { + values { + string_value: "10" + } + } + } + } + start: "A\206\310\002\234\221\002" + limit: "A\206\310\002\234\221\024" + } + test { + key_set { + keys { + values { + string_value: "10" + } + } + ranges { + start_closed { + values { + string_value: "5" + } + } + end_open { + values { + string_value: "10" + } + } + } + } + start: "A\206\310\002\234\221\n" + limit: "A\206\310\002\234\221\025" + } +} + +test_case { + name: "KeySet_All" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key_set { + all: true + } + start: "A\206\310" + limit: "A\206\311" + } +} + +test_case { + name: "InvalidRecipe_EmptyPart" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "BadRecipe" + part { + tag: 50020 + } + part { + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "A" + } + } + start: "A\206\310" + limit: "A\206\311" + approximate: true + } +} + +test_case { + name: "InvalidRecipe_BadOrder" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "BadRecipe" + part { + tag: 50020 + } + part { + order: 99 + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k1" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "A" + } + } + start: "A\206\310" + limit: "A\206\311" + approximate: true + } +} + +test_case { + name: "InvalidRecipe_BadNullOrder" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "BadRecipe" + part { + tag: 50020 + } + part { + order: ASCENDING + null_order: 99 + type { + code: STRING + } + identifier: "k1" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "A" + } + } + start: "A\206\310" + limit: "A\206\311" + approximate: true + } +} + +test_case { + name: "InvalidRecipe_BadType" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "BadRecipe" + part { + tag: 50020 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: TOKENLIST + } + identifier: "k1" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + key { + values { + string_value: "A" + } + } + start: "A\206\310" + limit: "A\206\311" + approximate: true + } +} + +test_case { + name: "SimpleMutations" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "SimpleMutations" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k" + } + } + } + test { + mutation { + insert { + table: "SimpleMutations" + columns: "k" + values { + values { + string_value: "80" + } + } + } + } + start: "A\206\310\002\234\221\240" + limit: "A\206\310\002\234\221\241" + } + test { + mutation { + update { + table: "SimpleMutations" + columns: "k" + values { + values { + string_value: "80" + } + } + } + } + start: "A\206\310\002\234\221\240" + limit: "A\206\310\002\234\221\241" + } + test { + mutation { + insert_or_update { + table: "SimpleMutations" + columns: "k" + values { + values { + string_value: "80" + } + } + } + } + start: "A\206\310\002\234\221\240" + limit: "A\206\310\002\234\221\241" + } + test { + mutation { + replace { + table: "SimpleMutations" + columns: "k" + values { + values { + string_value: "80" + } + } + } + } + start: "A\206\310\002\234\221\240" + limit: "A\206\310\002\234\221\241" + } + test { + mutation { + delete { + table: "SimpleMutations" + key_set { + keys { + values { + string_value: "80" + } + } + } + } + } + start: "A\206\310\002\234\221\240" + limit: "A\206\310\002\234\221\241" + } + test { + mutation { + delete { + table: "SimpleMutations" + key_set { + ranges { + start_closed { + values { + string_value: "80" + } + } + end_open { + values { + string_value: "100" + } + } + } + } + } + } + start: "A\206\310\002\234\221\240" + limit: "A\206\310\002\234\221\310" + } +} + +test_case { + name: "QueueMutations" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "Q" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: INT64 + } + identifier: "k" + } + } + } + test { + mutation { + send { + queue: "Q" + key { + values { + string_value: "80" + } + } + payload { + string_value: "" + } + } + } + start: "A\206\310\002\234\221\240" + limit: "A\206\310\002\234\221\241" + } + test { + mutation { + ack { + queue: "Q" + key { + values { + string_value: "80" + } + } + } + } + start: "A\206\310\002\234\221\240" + limit: "A\206\310\002\234\221\241" + } +} + +test_case { + name: "CustomMutationCases" + recipes { + schema_generation: "\001\001" + recipe { + table_name: "T" + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "k" + } + } + } + test { + mutation { + } + start: "" + limit: "\377" + approximate: true + } + test { + mutation { + delete { + key_set { + all: true + } + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + } + test { + mutation { + delete { + key_set { + keys { + values { + string_value: "123" + } + } + keys { + values { + string_value: "456" + } + } + } + } + } + start: "A\206\310\002\234\231123\000x" + limit: "A\206\310\002\234\231456\000y" + } + test { + mutation { + delete { + key_set { + ranges { + start_closed { + values { + string_value: "123" + } + } + end_open { + values { + string_value: "456" + } + } + } + ranges { + start_closed { + values { + string_value: "100" + } + } + end_open { + values { + string_value: "200" + } + } + } + ranges { + start_closed { + values { + string_value: "150" + } + } + end_open { + values { + string_value: "500" + } + } + } + } + } + } + start: "A\206\310\002\234\231100\000x" + limit: "A\206\310\002\234\231500\000x" + } + test { + mutation { + delete { + key_set { + ranges { + start_closed { + values { + string_value: "123" + } + } + end_open { + values { + string_value: "456" + } + } + } + all: true + } + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + } + test { + mutation { + delete { + key_set { + keys { + values { + string_value: "123" + } + } + keys { + values { + number_value: 456 + } + } + } + } + } + start: "A\206\310\002" + limit: "A\206\310\003" + approximate: true + } +} + +test_case { + name: "QueryEncoding" + recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 6 + part { + tag: 50020 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "p1" + } + part { + order: ASCENDING + null_order: NULLS_FIRST + type { + code: STRING + } + identifier: "p0" + } + } + } + test { + query_params { + fields { + key: "p0" + value { + string_value: "foo" + } + } + fields { + key: "p1" + value { + string_value: "bar" + } + } + } + start: "A\206\310\002\234\231bar\000x\234\231foo\000x" + } + test { + query_params { + fields { + key: "p1" + value { + string_value: "bar" + } + } + } + start: "A\206\310\002\234\231bar\000x" + limit: "A\206\310\002\234\231bar\000y" + approximate: true + } +} + +test_case { + name: "RandomQueryroot" + recipes { + schema_generation: "\001\001" + recipe { + operation_uid: 7 + part { + tag: 50016 + } + part { + tag: 1 + } + part { + order: ASCENDING + null_order: NOT_NULL + type { + code: INT64 + } + random: true + } + } + } + test { + query_params { + } + start: "A\206\300\002\230\327\342\351\276\316\214%$" + } +} \ No newline at end of file diff --git a/grpc-google-cloud-spanner-admin-database-v1/pom.xml b/grpc-google-cloud-spanner-admin-database-v1/pom.xml index cb5b2f928f2..5968a770f50 100644 --- a/grpc-google-cloud-spanner-admin-database-v1/pom.xml +++ b/grpc-google-cloud-spanner-admin-database-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.102.1 + 6.113.1-SNAPSHOT grpc-google-cloud-spanner-admin-database-v1 GRPC library for grpc-google-cloud-spanner-admin-database-v1 com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT diff --git a/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java b/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java index 1a543ae634f..162a0cb9c52 100644 --- a/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java +++ b/grpc-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseAdminGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,9 +29,6 @@ * * restore a database from an existing backup * */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/spanner/admin/database/v1/spanner_database_admin.proto") @io.grpc.stub.annotations.GrpcGenerated public final class DatabaseAdminGrpc { @@ -2531,8 +2528,9 @@ protected DatabaseAdminBlockingV2Stub build( * */ public com.google.spanner.admin.database.v1.ListDatabasesResponse listDatabases( - com.google.spanner.admin.database.v1.ListDatabasesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.ListDatabasesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListDatabasesMethod(), getCallOptions(), request); } @@ -2551,8 +2549,9 @@ public com.google.spanner.admin.database.v1.ListDatabasesResponse listDatabases( * */ public com.google.longrunning.Operation createDatabase( - com.google.spanner.admin.database.v1.CreateDatabaseRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.CreateDatabaseRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getCreateDatabaseMethod(), getCallOptions(), request); } @@ -2564,8 +2563,9 @@ public com.google.longrunning.Operation createDatabase( * */ public com.google.spanner.admin.database.v1.Database getDatabase( - com.google.spanner.admin.database.v1.GetDatabaseRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.GetDatabaseRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetDatabaseMethod(), getCallOptions(), request); } @@ -2607,8 +2607,9 @@ public com.google.spanner.admin.database.v1.Database getDatabase( * */ public com.google.longrunning.Operation updateDatabase( - com.google.spanner.admin.database.v1.UpdateDatabaseRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.UpdateDatabaseRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getUpdateDatabaseMethod(), getCallOptions(), request); } @@ -2627,8 +2628,9 @@ public com.google.longrunning.Operation updateDatabase( * */ public com.google.longrunning.Operation updateDatabaseDdl( - com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getUpdateDatabaseDdlMethod(), getCallOptions(), request); } @@ -2644,8 +2646,9 @@ public com.google.longrunning.Operation updateDatabaseDdl( * */ public com.google.protobuf.Empty dropDatabase( - com.google.spanner.admin.database.v1.DropDatabaseRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.DropDatabaseRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getDropDatabaseMethod(), getCallOptions(), request); } @@ -2659,8 +2662,9 @@ public com.google.protobuf.Empty dropDatabase( * */ public com.google.spanner.admin.database.v1.GetDatabaseDdlResponse getDatabaseDdl( - com.google.spanner.admin.database.v1.GetDatabaseDdlRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.GetDatabaseDdlRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetDatabaseDdlMethod(), getCallOptions(), request); } @@ -2676,8 +2680,9 @@ public com.google.spanner.admin.database.v1.GetDatabaseDdlResponse getDatabaseDd * permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. * */ - public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); } @@ -2694,8 +2699,9 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque * permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. * */ - public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); } @@ -2715,8 +2721,8 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque * */ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.iam.v1.TestIamPermissionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); } @@ -2739,8 +2745,9 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( * */ public com.google.longrunning.Operation createBackup( - com.google.spanner.admin.database.v1.CreateBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.CreateBackupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getCreateBackupMethod(), getCallOptions(), request); } @@ -2764,8 +2771,9 @@ public com.google.longrunning.Operation createBackup( * */ public com.google.longrunning.Operation copyBackup( - com.google.spanner.admin.database.v1.CopyBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.CopyBackupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getCopyBackupMethod(), getCallOptions(), request); } @@ -2778,8 +2786,9 @@ public com.google.longrunning.Operation copyBackup( * */ public com.google.spanner.admin.database.v1.Backup getBackup( - com.google.spanner.admin.database.v1.GetBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.GetBackupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetBackupMethod(), getCallOptions(), request); } @@ -2792,8 +2801,9 @@ public com.google.spanner.admin.database.v1.Backup getBackup( * */ public com.google.spanner.admin.database.v1.Backup updateBackup( - com.google.spanner.admin.database.v1.UpdateBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.UpdateBackupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getUpdateBackupMethod(), getCallOptions(), request); } @@ -2806,8 +2816,9 @@ public com.google.spanner.admin.database.v1.Backup updateBackup( * */ public com.google.protobuf.Empty deleteBackup( - com.google.spanner.admin.database.v1.DeleteBackupRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.DeleteBackupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getDeleteBackupMethod(), getCallOptions(), request); } @@ -2821,8 +2832,9 @@ public com.google.protobuf.Empty deleteBackup( * */ public com.google.spanner.admin.database.v1.ListBackupsResponse listBackups( - com.google.spanner.admin.database.v1.ListBackupsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.ListBackupsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListBackupsMethod(), getCallOptions(), request); } @@ -2850,8 +2862,9 @@ public com.google.spanner.admin.database.v1.ListBackupsResponse listBackups( * */ public com.google.longrunning.Operation restoreDatabase( - com.google.spanner.admin.database.v1.RestoreDatabaseRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.RestoreDatabaseRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getRestoreDatabaseMethod(), getCallOptions(), request); } @@ -2871,8 +2884,9 @@ public com.google.longrunning.Operation restoreDatabase( */ public com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse listDatabaseOperations( - com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListDatabaseOperationsMethod(), getCallOptions(), request); } @@ -2893,8 +2907,9 @@ public com.google.longrunning.Operation restoreDatabase( * */ public com.google.spanner.admin.database.v1.ListBackupOperationsResponse listBackupOperations( - com.google.spanner.admin.database.v1.ListBackupOperationsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.ListBackupOperationsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListBackupOperationsMethod(), getCallOptions(), request); } @@ -2906,8 +2921,9 @@ public com.google.spanner.admin.database.v1.ListBackupOperationsResponse listBac * */ public com.google.spanner.admin.database.v1.ListDatabaseRolesResponse listDatabaseRoles( - com.google.spanner.admin.database.v1.ListDatabaseRolesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.ListDatabaseRolesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListDatabaseRolesMethod(), getCallOptions(), request); } @@ -2919,8 +2935,9 @@ public com.google.spanner.admin.database.v1.ListDatabaseRolesResponse listDataba * */ public com.google.spanner.admin.database.v1.AddSplitPointsResponse addSplitPoints( - com.google.spanner.admin.database.v1.AddSplitPointsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.AddSplitPointsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getAddSplitPointsMethod(), getCallOptions(), request); } @@ -2932,8 +2949,9 @@ public com.google.spanner.admin.database.v1.AddSplitPointsResponse addSplitPoint * */ public com.google.spanner.admin.database.v1.BackupSchedule createBackupSchedule( - com.google.spanner.admin.database.v1.CreateBackupScheduleRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.CreateBackupScheduleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getCreateBackupScheduleMethod(), getCallOptions(), request); } @@ -2945,8 +2963,9 @@ public com.google.spanner.admin.database.v1.BackupSchedule createBackupSchedule( * */ public com.google.spanner.admin.database.v1.BackupSchedule getBackupSchedule( - com.google.spanner.admin.database.v1.GetBackupScheduleRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.GetBackupScheduleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetBackupScheduleMethod(), getCallOptions(), request); } @@ -2958,8 +2977,9 @@ public com.google.spanner.admin.database.v1.BackupSchedule getBackupSchedule( * */ public com.google.spanner.admin.database.v1.BackupSchedule updateBackupSchedule( - com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getUpdateBackupScheduleMethod(), getCallOptions(), request); } @@ -2971,8 +2991,9 @@ public com.google.spanner.admin.database.v1.BackupSchedule updateBackupSchedule( * */ public com.google.protobuf.Empty deleteBackupSchedule( - com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getDeleteBackupScheduleMethod(), getCallOptions(), request); } @@ -2984,8 +3005,9 @@ public com.google.protobuf.Empty deleteBackupSchedule( * */ public com.google.spanner.admin.database.v1.ListBackupSchedulesResponse listBackupSchedules( - com.google.spanner.admin.database.v1.ListBackupSchedulesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.ListBackupSchedulesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListBackupSchedulesMethod(), getCallOptions(), request); } @@ -2999,8 +3021,9 @@ public com.google.spanner.admin.database.v1.ListBackupSchedulesResponse listBack */ public com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse internalUpdateGraphOperation( - com.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getInternalUpdateGraphOperationMethod(), getCallOptions(), request); } } diff --git a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml index 105c323afd9..4ae1ec48cb3 100644 --- a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml +++ b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.102.1 + 6.113.1-SNAPSHOT grpc-google-cloud-spanner-admin-instance-v1 GRPC library for grpc-google-cloud-spanner-admin-instance-v1 com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT diff --git a/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java b/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java index e8ae31bca92..093b6a45960 100644 --- a/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java +++ b/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,9 +41,6 @@ * databases in that instance, and their performance may suffer. * */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/spanner/admin/instance/v1/spanner_instance_admin.proto") @io.grpc.stub.annotations.GrpcGenerated public final class InstanceAdminGrpc { @@ -2462,8 +2459,9 @@ protected InstanceAdminBlockingV2Stub build( * */ public com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse listInstanceConfigs( - com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListInstanceConfigsMethod(), getCallOptions(), request); } @@ -2475,8 +2473,9 @@ public com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse listInst * */ public com.google.spanner.admin.instance.v1.InstanceConfig getInstanceConfig( - com.google.spanner.admin.instance.v1.GetInstanceConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.GetInstanceConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetInstanceConfigMethod(), getCallOptions(), request); } @@ -2520,8 +2519,9 @@ public com.google.spanner.admin.instance.v1.InstanceConfig getInstanceConfig( * */ public com.google.longrunning.Operation createInstanceConfig( - com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getCreateInstanceConfigMethod(), getCallOptions(), request); } @@ -2567,8 +2567,9 @@ public com.google.longrunning.Operation createInstanceConfig( * */ public com.google.longrunning.Operation updateInstanceConfig( - com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getUpdateInstanceConfigMethod(), getCallOptions(), request); } @@ -2585,8 +2586,9 @@ public com.google.longrunning.Operation updateInstanceConfig( * */ public com.google.protobuf.Empty deleteInstanceConfig( - com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getDeleteInstanceConfigMethod(), getCallOptions(), request); } @@ -2609,8 +2611,9 @@ public com.google.protobuf.Empty deleteInstanceConfig( */ public com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse listInstanceConfigOperations( - com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListInstanceConfigOperationsMethod(), getCallOptions(), request); } @@ -2622,8 +2625,9 @@ public com.google.protobuf.Empty deleteInstanceConfig( * */ public com.google.spanner.admin.instance.v1.ListInstancesResponse listInstances( - com.google.spanner.admin.instance.v1.ListInstancesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.ListInstancesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListInstancesMethod(), getCallOptions(), request); } @@ -2636,8 +2640,9 @@ public com.google.spanner.admin.instance.v1.ListInstancesResponse listInstances( */ public com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse listInstancePartitions( - com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListInstancePartitionsMethod(), getCallOptions(), request); } @@ -2649,8 +2654,9 @@ public com.google.spanner.admin.instance.v1.ListInstancesResponse listInstances( * */ public com.google.spanner.admin.instance.v1.Instance getInstance( - com.google.spanner.admin.instance.v1.GetInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.GetInstanceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetInstanceMethod(), getCallOptions(), request); } @@ -2688,8 +2694,9 @@ public com.google.spanner.admin.instance.v1.Instance getInstance( * */ public com.google.longrunning.Operation createInstance( - com.google.spanner.admin.instance.v1.CreateInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.CreateInstanceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getCreateInstanceMethod(), getCallOptions(), request); } @@ -2731,8 +2738,9 @@ public com.google.longrunning.Operation createInstance( * */ public com.google.longrunning.Operation updateInstance( - com.google.spanner.admin.instance.v1.UpdateInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.UpdateInstanceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); } @@ -2750,8 +2758,9 @@ public com.google.longrunning.Operation updateInstance( * */ public com.google.protobuf.Empty deleteInstance( - com.google.spanner.admin.instance.v1.DeleteInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.DeleteInstanceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); } @@ -2765,8 +2774,9 @@ public com.google.protobuf.Empty deleteInstance( * [resource][google.iam.v1.SetIamPolicyRequest.resource]. * */ - public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); } @@ -2780,8 +2790,9 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque * [resource][google.iam.v1.GetIamPolicyRequest.resource]. * */ - public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); } @@ -2797,8 +2808,8 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque * */ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.iam.v1.TestIamPermissionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); } @@ -2810,8 +2821,9 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( * */ public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartition( - com.google.spanner.admin.instance.v1.GetInstancePartitionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.GetInstancePartitionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetInstancePartitionMethod(), getCallOptions(), request); } @@ -2852,8 +2864,9 @@ public com.google.spanner.admin.instance.v1.InstancePartition getInstancePartiti * */ public com.google.longrunning.Operation createInstancePartition( - com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getCreateInstancePartitionMethod(), getCallOptions(), request); } @@ -2870,8 +2883,9 @@ public com.google.longrunning.Operation createInstancePartition( * */ public com.google.protobuf.Empty deleteInstancePartition( - com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getDeleteInstancePartitionMethod(), getCallOptions(), request); } @@ -2917,8 +2931,9 @@ public com.google.protobuf.Empty deleteInstancePartition( * */ public com.google.longrunning.Operation updateInstancePartition( - com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getUpdateInstancePartitionMethod(), getCallOptions(), request); } @@ -2943,8 +2958,9 @@ public com.google.longrunning.Operation updateInstancePartition( */ public com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse listInstancePartitionOperations( - com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListInstancePartitionOperationsMethod(), getCallOptions(), request); } @@ -3005,8 +3021,9 @@ public com.google.longrunning.Operation updateInstancePartition( * */ public com.google.longrunning.Operation moveInstance( - com.google.spanner.admin.instance.v1.MoveInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.admin.instance.v1.MoveInstanceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getMoveInstanceMethod(), getCallOptions(), request); } } diff --git a/grpc-google-cloud-spanner-executor-v1/pom.xml b/grpc-google-cloud-spanner-executor-v1/pom.xml index 3b7da0e8178..9c2e69a6636 100644 --- a/grpc-google-cloud-spanner-executor-v1/pom.xml +++ b/grpc-google-cloud-spanner-executor-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-spanner-executor-v1 - 6.102.1 + 6.113.1-SNAPSHOT grpc-google-cloud-spanner-executor-v1 GRPC library for google-cloud-spanner com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT 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 index b2b9ddada6d..b33fca41f1c 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,9 +24,6 @@ * 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 { diff --git a/grpc-google-cloud-spanner-v1/pom.xml b/grpc-google-cloud-spanner-v1/pom.xml index fcfcfa276ae..26ba1244ac7 100644 --- a/grpc-google-cloud-spanner-v1/pom.xml +++ b/grpc-google-cloud-spanner-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.102.1 + 6.113.1-SNAPSHOT grpc-google-cloud-spanner-v1 GRPC library for grpc-google-cloud-spanner-v1 com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT diff --git a/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java b/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java index 8eb67081efe..4c280f1af90 100644 --- a/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java +++ b/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +26,6 @@ * transactions on data stored in Cloud Spanner databases. * */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/spanner/v1/spanner.proto") @io.grpc.stub.annotations.GrpcGenerated public final class SpannerGrpc { @@ -1545,8 +1542,8 @@ protected SpannerBlockingV2Stub build( * */ public com.google.spanner.v1.Session createSession( - com.google.spanner.v1.CreateSessionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.v1.CreateSessionRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getCreateSessionMethod(), getCallOptions(), request); } @@ -1560,8 +1557,8 @@ public com.google.spanner.v1.Session createSession( * */ public com.google.spanner.v1.BatchCreateSessionsResponse batchCreateSessions( - com.google.spanner.v1.BatchCreateSessionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.v1.BatchCreateSessionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getBatchCreateSessionsMethod(), getCallOptions(), request); } @@ -1574,9 +1571,9 @@ public com.google.spanner.v1.BatchCreateSessionsResponse batchCreateSessions( * alive. * */ - public com.google.spanner.v1.Session getSession( - com.google.spanner.v1.GetSessionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + public com.google.spanner.v1.Session getSession(com.google.spanner.v1.GetSessionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getGetSessionMethod(), getCallOptions(), request); } @@ -1588,8 +1585,8 @@ public com.google.spanner.v1.Session getSession( * */ public com.google.spanner.v1.ListSessionsResponse listSessions( - com.google.spanner.v1.ListSessionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.v1.ListSessionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListSessionsMethod(), getCallOptions(), request); } @@ -1603,8 +1600,8 @@ public com.google.spanner.v1.ListSessionsResponse listSessions( * */ public com.google.protobuf.Empty deleteSession( - com.google.spanner.v1.DeleteSessionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.v1.DeleteSessionRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getDeleteSessionMethod(), getCallOptions(), request); } @@ -1628,8 +1625,8 @@ public com.google.protobuf.Empty deleteSession( * */ public com.google.spanner.v1.ResultSet executeSql( - com.google.spanner.v1.ExecuteSqlRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.v1.ExecuteSqlRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getExecuteSqlMethod(), getCallOptions(), request); } @@ -1670,8 +1667,8 @@ public com.google.spanner.v1.ResultSet executeSql( * */ public com.google.spanner.v1.ExecuteBatchDmlResponse executeBatchDml( - com.google.spanner.v1.ExecuteBatchDmlRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.v1.ExecuteBatchDmlRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getExecuteBatchDmlMethod(), getCallOptions(), request); } @@ -1693,8 +1690,9 @@ public com.google.spanner.v1.ExecuteBatchDmlResponse executeBatchDml( * [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead. * */ - public com.google.spanner.v1.ResultSet read(com.google.spanner.v1.ReadRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + public com.google.spanner.v1.ResultSet read(com.google.spanner.v1.ReadRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getReadMethod(), getCallOptions(), request); } @@ -1728,8 +1726,8 @@ public io.grpc.stub.BlockingClientCall */ public com.google.spanner.v1.Transaction beginTransaction( - com.google.spanner.v1.BeginTransactionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.v1.BeginTransactionRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getBeginTransactionMethod(), getCallOptions(), request); } @@ -1751,9 +1749,9 @@ public com.google.spanner.v1.Transaction beginTransaction( * state of things as they are now. * */ - public com.google.spanner.v1.CommitResponse commit( - com.google.spanner.v1.CommitRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + public com.google.spanner.v1.CommitResponse commit(com.google.spanner.v1.CommitRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getCommitMethod(), getCallOptions(), request); } @@ -1771,8 +1769,9 @@ public com.google.spanner.v1.CommitResponse commit( * found. `Rollback` never returns `ABORTED`. * */ - public com.google.protobuf.Empty rollback(com.google.spanner.v1.RollbackRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + public com.google.protobuf.Empty rollback(com.google.spanner.v1.RollbackRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getRollbackMethod(), getCallOptions(), request); } @@ -1794,8 +1793,8 @@ public com.google.protobuf.Empty rollback(com.google.spanner.v1.RollbackRequest * */ public com.google.spanner.v1.PartitionResponse partitionQuery( - com.google.spanner.v1.PartitionQueryRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.v1.PartitionQueryRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getPartitionQueryMethod(), getCallOptions(), request); } @@ -1819,8 +1818,8 @@ public com.google.spanner.v1.PartitionResponse partitionQuery( * */ public com.google.spanner.v1.PartitionResponse partitionRead( - com.google.spanner.v1.PartitionReadRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( + com.google.spanner.v1.PartitionReadRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getPartitionReadMethod(), getCallOptions(), request); } diff --git a/owlbot.py b/owlbot.py index 5765d1df17f..6c654ed80a0 100644 --- a/owlbot.py +++ b/owlbot.py @@ -46,6 +46,7 @@ ".kokoro/build.sh", ".kokoro/dependencies.sh", ".kokoro/requirements.in", - ".kokoro/requirements.txt" + ".kokoro/requirements.txt", + "README.md" ] ) diff --git a/pom.xml b/pom.xml index 357e8d51cb2..b517ae83223 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-spanner-parent pom - 6.102.1 + 6.113.1-SNAPSHOT Google Cloud Spanner Parent https://github.com/googleapis/java-spanner @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.53.0 + 3.58.0 @@ -61,49 +61,48 @@ com.google.api.grpc proto-google-cloud-spanner-admin-instance-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-executor-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-executor-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-admin-instance-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-spanner-admin-database-v1 - 6.102.1 + 6.113.1-SNAPSHOT com.google.cloud google-cloud-spanner - 6.102.1 + 6.113.1-SNAPSHOT - com.google.cloud google-cloud-shared-dependencies @@ -153,7 +152,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.1 + 3.15.0 1.8 1.8 diff --git a/proto-google-cloud-spanner-admin-database-v1/clirr-ignored-differences.xml b/proto-google-cloud-spanner-admin-database-v1/clirr-ignored-differences.xml index 3799fb341ac..fb64ee18470 100644 --- a/proto-google-cloud-spanner-admin-database-v1/clirr-ignored-differences.xml +++ b/proto-google-cloud-spanner-admin-database-v1/clirr-ignored-differences.xml @@ -17,7 +17,63 @@ boolean has*(*) - + + + + 5001 + com/google/spanner/admin/database/v1/* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/admin/database/v1/*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/admin/database/v1/*$* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/admin/database/v1/*$*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/admin/database/v1/*$*$* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/admin/database/v1/*$*$*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/admin/database/v1/*Proto + com/google/protobuf/GeneratedFile + + + + 7005 + com/google/spanner/admin/database/v1/** + * newBuilderForType(*) + ** + + + + 7006 + com/google/spanner/admin/database/v1/** + * internalGetFieldAccessorTable() + ** + + + + 7014 + com/google/spanner/admin/database/v1/** + * getDescriptor() + 7006 com/google/spanner/admin/database/v1/** diff --git a/proto-google-cloud-spanner-admin-database-v1/pom.xml b/proto-google-cloud-spanner-admin-database-v1/pom.xml index 8daa880c8b4..97f2f8b2da9 100644 --- a/proto-google-cloud-spanner-admin-database-v1/pom.xml +++ b/proto-google-cloud-spanner-admin-database-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-spanner-admin-database-v1 - 6.102.1 + 6.113.1-SNAPSHOT proto-google-cloud-spanner-admin-database-v1 PROTO library for proto-google-cloud-spanner-admin-database-v1 com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequest.java index 1453b09b37d..93020429848 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.AddSplitPointsRequest} */ -public final class AddSplitPointsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AddSplitPointsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.AddSplitPointsRequest) AddSplitPointsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AddSplitPointsRequest"); + } + // Use AddSplitPointsRequest.newBuilder() to construct. - private AddSplitPointsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AddSplitPointsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private AddSplitPointsRequest() { initiator_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AddSplitPointsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_fieldAccessorTable @@ -290,14 +296,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } for (int i = 0; i < splitPoints_.size(); i++) { output.writeMessage(2, splitPoints_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initiator_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, initiator_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(initiator_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, initiator_); } getUnknownFields().writeTo(output); } @@ -308,14 +314,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } for (int i = 0; i < splitPoints_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, splitPoints_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(initiator_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, initiator_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(initiator_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, initiator_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -397,38 +403,38 @@ public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFr public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.AddSplitPointsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -452,7 +458,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -467,7 +473,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.AddSplitPointsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.AddSplitPointsRequest) com.google.spanner.admin.database.v1.AddSplitPointsRequestOrBuilder { @@ -477,7 +483,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_fieldAccessorTable @@ -489,7 +495,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.AddSplitPointsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -564,39 +570,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.AddSplitPointsRe } } - @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.admin.database.v1.AddSplitPointsRequest) { @@ -634,8 +607,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.AddSplitPointsRequ splitPoints_ = other.splitPoints_; bitField0_ = (bitField0_ & ~0x00000002); splitPointsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSplitPointsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSplitPointsFieldBuilder() : null; } else { splitPointsBuilder_.addAllMessages(other.splitPoints_); @@ -860,7 +833,7 @@ private void ensureSplitPointsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.SplitPoints, com.google.spanner.admin.database.v1.SplitPoints.Builder, com.google.spanner.admin.database.v1.SplitPointsOrBuilder> @@ -1149,7 +1122,7 @@ public Builder removeSplitPoints(int index) { */ public com.google.spanner.admin.database.v1.SplitPoints.Builder getSplitPointsBuilder( int index) { - return getSplitPointsFieldBuilder().getBuilder(index); + return internalGetSplitPointsFieldBuilder().getBuilder(index); } /** @@ -1204,7 +1177,7 @@ public com.google.spanner.admin.database.v1.SplitPointsOrBuilder getSplitPointsO * */ public com.google.spanner.admin.database.v1.SplitPoints.Builder addSplitPointsBuilder() { - return getSplitPointsFieldBuilder() + return internalGetSplitPointsFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.SplitPoints.getDefaultInstance()); } @@ -1221,7 +1194,7 @@ public com.google.spanner.admin.database.v1.SplitPoints.Builder addSplitPointsBu */ public com.google.spanner.admin.database.v1.SplitPoints.Builder addSplitPointsBuilder( int index) { - return getSplitPointsFieldBuilder() + return internalGetSplitPointsFieldBuilder() .addBuilder(index, com.google.spanner.admin.database.v1.SplitPoints.getDefaultInstance()); } @@ -1238,17 +1211,17 @@ public com.google.spanner.admin.database.v1.SplitPoints.Builder addSplitPointsBu */ public java.util.List getSplitPointsBuilderList() { - return getSplitPointsFieldBuilder().getBuilderList(); + return internalGetSplitPointsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.SplitPoints, com.google.spanner.admin.database.v1.SplitPoints.Builder, com.google.spanner.admin.database.v1.SplitPointsOrBuilder> - getSplitPointsFieldBuilder() { + internalGetSplitPointsFieldBuilder() { if (splitPointsBuilder_ == null) { splitPointsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.SplitPoints, com.google.spanner.admin.database.v1.SplitPoints.Builder, com.google.spanner.admin.database.v1.SplitPointsOrBuilder>( @@ -1389,17 +1362,6 @@ public Builder setInitiatorBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.AddSplitPointsRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequestOrBuilder.java index 0e2532e3997..bbdc2efc8ae 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface AddSplitPointsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.AddSplitPointsRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponse.java index 3017838d91a..30eaaf424dc 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.database.v1.AddSplitPointsResponse} */ -public final class AddSplitPointsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AddSplitPointsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.AddSplitPointsResponse) AddSplitPointsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AddSplitPointsResponse"); + } + // Use AddSplitPointsResponse.newBuilder() to construct. - private AddSplitPointsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AddSplitPointsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AddSplitPointsResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AddSplitPointsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_fieldAccessorTable @@ -155,38 +161,38 @@ public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseF public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.AddSplitPointsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -210,7 +216,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -225,7 +231,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.AddSplitPointsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.AddSplitPointsResponse) com.google.spanner.admin.database.v1.AddSplitPointsResponseOrBuilder { @@ -235,7 +241,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_fieldAccessorTable @@ -247,7 +253,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.AddSplitPointsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -285,39 +291,6 @@ public com.google.spanner.admin.database.v1.AddSplitPointsResponse buildPartial( return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.admin.database.v1.AddSplitPointsResponse) { @@ -374,17 +347,6 @@ public Builder mergeFrom( 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.admin.database.v1.AddSplitPointsResponse) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponseOrBuilder.java index 5dc4d4e8ea1..e94d9fb2f36 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/AddSplitPointsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface AddSplitPointsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.AddSplitPointsResponse) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java index 69eef92f093..ccc75d55036 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Backup.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.Backup} */ -public final class Backup extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Backup extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.Backup) BackupOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Backup"); + } + // Use Backup.newBuilder() to construct. - private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Backup(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -52,19 +64,13 @@ private Backup() { instancePartitions_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Backup(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_Backup_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_Backup_fieldAccessorTable @@ -117,6 +123,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -209,7 +225,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.database.v1.Backup.getDescriptor().getEnumTypes().get(0); } @@ -1527,11 +1543,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, database_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getExpireTime()); @@ -1546,8 +1562,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeEnum(6, state_); } for (int i = 0; i < referencingDatabases_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 7, referencingDatabases_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 7, referencingDatabases_.getRaw(i)); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(8, getEncryptionInfo()); @@ -1561,7 +1576,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeEnum(10, databaseDialect_); } for (int i = 0; i < referencingBackups_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, referencingBackups_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 11, referencingBackups_.getRaw(i)); } if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(12, getMaxExpireTime()); @@ -1570,7 +1585,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(13, encryptionInformation_.get(i)); } for (int i = 0; i < backupSchedules_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 14, backupSchedules_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 14, backupSchedules_.getRaw(i)); } if (freeableSizeBytes_ != 0L) { output.writeInt64(15, freeableSizeBytes_); @@ -1578,8 +1593,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (exclusiveSizeBytes_ != 0L) { output.writeInt64(16, exclusiveSizeBytes_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(incrementalBackupChainId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 17, incrementalBackupChainId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(incrementalBackupChainId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 17, incrementalBackupChainId_); } if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(18, getOldestVersionTime()); @@ -1596,11 +1611,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, database_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExpireTime()); @@ -1663,9 +1678,8 @@ public int getSerializedSize() { if (exclusiveSizeBytes_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(16, exclusiveSizeBytes_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(incrementalBackupChainId_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(17, incrementalBackupChainId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(incrementalBackupChainId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(17, incrementalBackupChainId_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getOldestVersionTime()); @@ -1840,38 +1854,38 @@ public static com.google.spanner.admin.database.v1.Backup parseFrom( public static com.google.spanner.admin.database.v1.Backup parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.Backup parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.Backup parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.Backup parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.Backup parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.Backup parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1894,7 +1908,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1908,7 +1922,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.Backup} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.Backup) com.google.spanner.admin.database.v1.BackupOrBuilder { @@ -1918,7 +1932,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_Backup_fieldAccessorTable @@ -1932,21 +1946,21 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVersionTimeFieldBuilder(); - getExpireTimeFieldBuilder(); - getCreateTimeFieldBuilder(); - getEncryptionInfoFieldBuilder(); - getEncryptionInformationFieldBuilder(); - getMaxExpireTimeFieldBuilder(); - getOldestVersionTimeFieldBuilder(); - getInstancePartitionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetVersionTimeFieldBuilder(); + internalGetExpireTimeFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetEncryptionInfoFieldBuilder(); + internalGetEncryptionInformationFieldBuilder(); + internalGetMaxExpireTimeFieldBuilder(); + internalGetOldestVersionTimeFieldBuilder(); + internalGetInstancePartitionsFieldBuilder(); } } @@ -2137,39 +2151,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.Backup result) { 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.admin.database.v1.Backup) { @@ -2245,8 +2226,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) { encryptionInformation_ = other.encryptionInformation_; bitField0_ = (bitField0_ & ~0x00000800); encryptionInformationBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getEncryptionInformationFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEncryptionInformationFieldBuilder() : null; } else { encryptionInformationBuilder_.addAllMessages(other.encryptionInformation_); @@ -2306,8 +2287,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Backup other) { instancePartitions_ = other.instancePartitions_; bitField0_ = (bitField0_ & ~0x00040000); instancePartitionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInstancePartitionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInstancePartitionsFieldBuilder() : null; } else { instancePartitionsBuilder_.addAllMessages(other.instancePartitions_); @@ -2354,13 +2335,15 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 34 @@ -2385,13 +2368,15 @@ public Builder mergeFrom( } // case 58 case 66: { - input.readMessage(getEncryptionInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetEncryptionInfoFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000400; break; } // case 66 case 74: { - input.readMessage(getVersionTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetVersionTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 74 @@ -2410,7 +2395,8 @@ public Builder mergeFrom( } // case 90 case 98: { - input.readMessage(getMaxExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMaxExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00004000; break; } // case 98 @@ -2456,7 +2442,7 @@ public Builder mergeFrom( case 146: { input.readMessage( - getOldestVersionTimeFieldBuilder().getBuilder(), extensionRegistry); + internalGetOldestVersionTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00020000; break; } // case 146 @@ -2625,7 +2611,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp versionTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -2791,7 +2777,7 @@ public Builder clearVersionTime() { public com.google.protobuf.Timestamp.Builder getVersionTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getVersionTimeFieldBuilder().getBuilder(); + return internalGetVersionTimeFieldBuilder().getBuilder(); } /** @@ -2828,14 +2814,14 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { * * .google.protobuf.Timestamp version_time = 9; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getVersionTimeFieldBuilder() { + internalGetVersionTimeFieldBuilder() { if (versionTimeBuilder_ == null) { versionTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2846,7 +2832,7 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { } private com.google.protobuf.Timestamp expireTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -3033,7 +3019,7 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } /** @@ -3076,14 +3062,14 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * * .google.protobuf.Timestamp expire_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpireTimeFieldBuilder() { + internalGetExpireTimeFieldBuilder() { if (expireTimeBuilder_ == null) { expireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -3280,7 +3266,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -3460,7 +3446,7 @@ public Builder clearCreateTime() { public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } /** @@ -3501,14 +3487,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { + internalGetCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -4085,7 +4071,7 @@ public Builder addReferencingDatabasesBytes(com.google.protobuf.ByteString value } private com.google.spanner.admin.database.v1.EncryptionInfo encryptionInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionInfo, com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder> @@ -4246,7 +4232,7 @@ public Builder clearEncryptionInfo() { public com.google.spanner.admin.database.v1.EncryptionInfo.Builder getEncryptionInfoBuilder() { bitField0_ |= 0x00000400; onChanged(); - return getEncryptionInfoFieldBuilder().getBuilder(); + return internalGetEncryptionInfoFieldBuilder().getBuilder(); } /** @@ -4282,14 +4268,14 @@ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder getEncryption * .google.spanner.admin.database.v1.EncryptionInfo encryption_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionInfo, com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder> - getEncryptionInfoFieldBuilder() { + internalGetEncryptionInfoFieldBuilder() { if (encryptionInfoBuilder_ == null) { encryptionInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionInfo, com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>( @@ -4311,7 +4297,7 @@ private void ensureEncryptionInformationIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.EncryptionInfo, com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder> @@ -4667,7 +4653,7 @@ public Builder removeEncryptionInformation(int index) { */ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder getEncryptionInformationBuilder(int index) { - return getEncryptionInformationFieldBuilder().getBuilder(index); + return internalGetEncryptionInformationFieldBuilder().getBuilder(index); } /** @@ -4738,7 +4724,7 @@ public Builder removeEncryptionInformation(int index) { */ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder addEncryptionInformationBuilder() { - return getEncryptionInformationFieldBuilder() + return internalGetEncryptionInformationFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance()); } @@ -4760,7 +4746,7 @@ public Builder removeEncryptionInformation(int index) { */ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder addEncryptionInformationBuilder(int index) { - return getEncryptionInformationFieldBuilder() + return internalGetEncryptionInformationFieldBuilder() .addBuilder( index, com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance()); } @@ -4783,17 +4769,17 @@ public Builder removeEncryptionInformation(int index) { */ public java.util.List getEncryptionInformationBuilderList() { - return getEncryptionInformationFieldBuilder().getBuilderList(); + return internalGetEncryptionInformationFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.EncryptionInfo, com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder> - getEncryptionInformationFieldBuilder() { + internalGetEncryptionInformationFieldBuilder() { if (encryptionInformationBuilder_ == null) { encryptionInformationBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.EncryptionInfo, com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>( @@ -5169,7 +5155,7 @@ public Builder addReferencingBackupsBytes(com.google.protobuf.ByteString value) } private com.google.protobuf.Timestamp maxExpireTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -5356,7 +5342,7 @@ public Builder clearMaxExpireTime() { public com.google.protobuf.Timestamp.Builder getMaxExpireTimeBuilder() { bitField0_ |= 0x00004000; onChanged(); - return getMaxExpireTimeFieldBuilder().getBuilder(); + return internalGetMaxExpireTimeFieldBuilder().getBuilder(); } /** @@ -5399,14 +5385,14 @@ public com.google.protobuf.TimestampOrBuilder getMaxExpireTimeOrBuilder() { * .google.protobuf.Timestamp max_expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getMaxExpireTimeFieldBuilder() { + internalGetMaxExpireTimeFieldBuilder() { if (maxExpireTimeBuilder_ == null) { maxExpireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -5826,7 +5812,7 @@ public Builder setIncrementalBackupChainIdBytes(com.google.protobuf.ByteString v } private com.google.protobuf.Timestamp oldestVersionTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -6020,7 +6006,7 @@ public Builder clearOldestVersionTime() { public com.google.protobuf.Timestamp.Builder getOldestVersionTimeBuilder() { bitField0_ |= 0x00020000; onChanged(); - return getOldestVersionTimeFieldBuilder().getBuilder(); + return internalGetOldestVersionTimeFieldBuilder().getBuilder(); } /** @@ -6065,14 +6051,14 @@ public com.google.protobuf.TimestampOrBuilder getOldestVersionTimeOrBuilder() { * .google.protobuf.Timestamp oldest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getOldestVersionTimeFieldBuilder() { + internalGetOldestVersionTimeFieldBuilder() { if (oldestVersionTimeBuilder_ == null) { oldestVersionTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -6094,7 +6080,7 @@ private void ensureInstancePartitionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.BackupInstancePartition, com.google.spanner.admin.database.v1.BackupInstancePartition.Builder, com.google.spanner.admin.database.v1.BackupInstancePartitionOrBuilder> @@ -6428,7 +6414,7 @@ public Builder removeInstancePartitions(int index) { */ public com.google.spanner.admin.database.v1.BackupInstancePartition.Builder getInstancePartitionsBuilder(int index) { - return getInstancePartitionsFieldBuilder().getBuilder(index); + return internalGetInstancePartitionsFieldBuilder().getBuilder(index); } /** @@ -6494,7 +6480,7 @@ public Builder removeInstancePartitions(int index) { */ public com.google.spanner.admin.database.v1.BackupInstancePartition.Builder addInstancePartitionsBuilder() { - return getInstancePartitionsFieldBuilder() + return internalGetInstancePartitionsFieldBuilder() .addBuilder( com.google.spanner.admin.database.v1.BackupInstancePartition.getDefaultInstance()); } @@ -6515,7 +6501,7 @@ public Builder removeInstancePartitions(int index) { */ public com.google.spanner.admin.database.v1.BackupInstancePartition.Builder addInstancePartitionsBuilder(int index) { - return getInstancePartitionsFieldBuilder() + return internalGetInstancePartitionsFieldBuilder() .addBuilder( index, com.google.spanner.admin.database.v1.BackupInstancePartition.getDefaultInstance()); @@ -6537,17 +6523,17 @@ public Builder removeInstancePartitions(int index) { */ public java.util.List getInstancePartitionsBuilderList() { - return getInstancePartitionsFieldBuilder().getBuilderList(); + return internalGetInstancePartitionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.BackupInstancePartition, com.google.spanner.admin.database.v1.BackupInstancePartition.Builder, com.google.spanner.admin.database.v1.BackupInstancePartitionOrBuilder> - getInstancePartitionsFieldBuilder() { + internalGetInstancePartitionsFieldBuilder() { if (instancePartitionsBuilder_ == null) { instancePartitionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.BackupInstancePartition, com.google.spanner.admin.database.v1.BackupInstancePartition.Builder, com.google.spanner.admin.database.v1.BackupInstancePartitionOrBuilder>( @@ -6560,17 +6546,6 @@ public Builder removeInstancePartitions(int index) { return instancePartitionsBuilder_; } - @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.admin.database.v1.Backup) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java index 6eac977232f..ce202a7a5a1 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.BackupInfo} */ -public final class BackupInfo extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BackupInfo extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.BackupInfo) BackupInfoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BackupInfo"); + } + // Use BackupInfo.newBuilder() to construct. - private BackupInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BackupInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private BackupInfo() { sourceDatabase_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BackupInfo(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_BackupInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_BackupInfo_fieldAccessorTable @@ -302,14 +308,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, backup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backup_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, backup_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getCreateTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceDatabase_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceDatabase_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sourceDatabase_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getVersionTime()); @@ -323,14 +329,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, backup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backup_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, backup_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceDatabase_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceDatabase_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceDatabase_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sourceDatabase_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getVersionTime()); @@ -426,38 +432,38 @@ public static com.google.spanner.admin.database.v1.BackupInfo parseFrom( public static com.google.spanner.admin.database.v1.BackupInfo parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.BackupInfo parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.BackupInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -480,7 +486,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -494,7 +500,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.BackupInfo} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.BackupInfo) com.google.spanner.admin.database.v1.BackupInfoOrBuilder { @@ -504,7 +510,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_BackupInfo_fieldAccessorTable @@ -518,15 +524,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getVersionTimeFieldBuilder(); - getCreateTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetVersionTimeFieldBuilder(); + internalGetCreateTimeFieldBuilder(); } } @@ -601,39 +607,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.BackupInfo resul 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.admin.database.v1.BackupInfo) { @@ -697,7 +670,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 18 @@ -709,7 +683,8 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getVersionTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetVersionTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 34 @@ -844,7 +819,7 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp versionTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1017,7 +992,7 @@ public Builder clearVersionTime() { public com.google.protobuf.Timestamp.Builder getVersionTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getVersionTimeFieldBuilder().getBuilder(); + return internalGetVersionTimeFieldBuilder().getBuilder(); } /** @@ -1056,14 +1031,14 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { * * .google.protobuf.Timestamp version_time = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getVersionTimeFieldBuilder() { + internalGetVersionTimeFieldBuilder() { if (versionTimeBuilder_ == null) { versionTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1074,7 +1049,7 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { } private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1233,7 +1208,7 @@ public Builder clearCreateTime() { public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } /** @@ -1268,14 +1243,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * .google.protobuf.Timestamp create_time = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { + internalGetCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1396,17 +1371,6 @@ public Builder setSourceDatabaseBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.BackupInfo) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java index 667998ecc1f..02c959477ee 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface BackupInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.BackupInfo) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInstancePartition.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInstancePartition.java index 921c906e77e..c95133cddd8 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInstancePartition.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInstancePartition.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.BackupInstancePartition} */ -public final class BackupInstancePartition extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BackupInstancePartition extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.BackupInstancePartition) BackupInstancePartitionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BackupInstancePartition"); + } + // Use BackupInstancePartition.newBuilder() to construct. - private BackupInstancePartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BackupInstancePartition(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private BackupInstancePartition() { instancePartition_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BackupInstancePartition(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_BackupInstancePartition_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_BackupInstancePartition_fieldAccessorTable @@ -133,8 +139,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instancePartition_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instancePartition_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instancePartition_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instancePartition_); } getUnknownFields().writeTo(output); } @@ -145,8 +151,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instancePartition_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instancePartition_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instancePartition_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instancePartition_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -220,38 +226,38 @@ public static com.google.spanner.admin.database.v1.BackupInstancePartition parse public static com.google.spanner.admin.database.v1.BackupInstancePartition parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupInstancePartition parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.BackupInstancePartition parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupInstancePartition parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.BackupInstancePartition parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupInstancePartition parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -275,7 +281,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -289,7 +295,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.BackupInstancePartition} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.BackupInstancePartition) com.google.spanner.admin.database.v1.BackupInstancePartitionOrBuilder { @@ -299,7 +305,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_BackupInstancePartition_fieldAccessorTable @@ -311,7 +317,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.BackupInstancePartition.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -363,39 +369,6 @@ private void buildPartial0( } } - @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.admin.database.v1.BackupInstancePartition) { @@ -582,17 +555,6 @@ public Builder setInstancePartitionBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.BackupInstancePartition) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInstancePartitionOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInstancePartitionOrBuilder.java index 765ba1a205d..8a2856c7b80 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInstancePartitionOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupInstancePartitionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface BackupInstancePartitionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.BackupInstancePartition) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java index 2d2974df614..da90c9f8401 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java index e78e4faa823..1366d6d0c05 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface BackupOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.Backup) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java index e35aa8f2203..38d648d0892 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; -public final class BackupProto { +@com.google.protobuf.Generated +public final class BackupProto extends com.google.protobuf.GeneratedFile { private BackupProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BackupProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,75 +42,75 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_Backup_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_Backup_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CreateBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CreateBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CopyBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_GetBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_GetBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListBackupsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListBackupsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListBackupsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListBackupsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_BackupInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_BackupInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_FullBackupSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_FullBackupSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_BackupInstancePartition_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_BackupInstancePartition_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -245,9 +257,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.spanner.admin.database.v1.CommonProto.getDescriptor(), }); internal_static_google_spanner_admin_database_v1_Backup_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_spanner_admin_database_v1_Backup_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_Backup_descriptor, new java.lang.String[] { "Database", @@ -271,137 +283,144 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstancePartitions", }); internal_static_google_spanner_admin_database_v1_CreateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_spanner_admin_database_v1_CreateBackupRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CreateBackupRequest_descriptor, new java.lang.String[] { "Parent", "BackupId", "Backup", "EncryptionConfig", }); internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_descriptor, new java.lang.String[] { "Name", "Database", "Progress", "CancelTime", }); internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_spanner_admin_database_v1_CopyBackupRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor, new java.lang.String[] { "Parent", "BackupId", "SourceBackup", "ExpireTime", "EncryptionConfig", }); internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor, new java.lang.String[] { "Name", "SourceBackup", "Progress", "CancelTime", }); internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageType(5); internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_descriptor, new java.lang.String[] { "Backup", "UpdateMask", }); internal_static_google_spanner_admin_database_v1_GetBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageType(6); internal_static_google_spanner_admin_database_v1_GetBackupRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_GetBackupRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageType(7); internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_spanner_admin_database_v1_ListBackupsRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageType(8); internal_static_google_spanner_admin_database_v1_ListBackupsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupsRequest_descriptor, new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_spanner_admin_database_v1_ListBackupsResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageType(9); internal_static_google_spanner_admin_database_v1_ListBackupsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupsResponse_descriptor, new java.lang.String[] { "Backups", "NextPageToken", }); internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageType(10); internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_descriptor, new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageType(11); internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_descriptor, new java.lang.String[] { "Operations", "NextPageToken", }); internal_static_google_spanner_admin_database_v1_BackupInfo_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageType(12); internal_static_google_spanner_admin_database_v1_BackupInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_BackupInfo_descriptor, new java.lang.String[] { "Backup", "VersionTime", "CreateTime", "SourceDatabase", }); internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageType(13); internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_descriptor, new java.lang.String[] { "EncryptionType", "KmsKeyName", "KmsKeyNames", }); internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageType(14); internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor, new java.lang.String[] { "EncryptionType", "KmsKeyName", "KmsKeyNames", }); internal_static_google_spanner_admin_database_v1_FullBackupSpec_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageType(15); internal_static_google_spanner_admin_database_v1_FullBackupSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_FullBackupSpec_descriptor, new java.lang.String[] {}); internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageType(16); internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_descriptor, new java.lang.String[] {}); internal_static_google_spanner_admin_database_v1_BackupInstancePartition_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageType(17); internal_static_google_spanner_admin_database_v1_BackupInstancePartition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_BackupInstancePartition_descriptor, new java.lang.String[] { "InstancePartition", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.spanner.admin.database.v1.CommonProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -409,12 +428,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.spanner.admin.database.v1.CommonProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupSchedule.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupSchedule.java index 26b77a85fcc..ef07225e99b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupSchedule.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupSchedule.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -30,14 +31,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.BackupSchedule} */ -public final class BackupSchedule extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BackupSchedule extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.BackupSchedule) BackupScheduleOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BackupSchedule"); + } + // Use BackupSchedule.newBuilder() to construct. - private BackupSchedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BackupSchedule(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private BackupSchedule() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BackupSchedule(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_BackupSchedule_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_BackupSchedule_fieldAccessorTable @@ -563,8 +569,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getRetentionDuration()); @@ -594,8 +600,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRetentionDuration()); @@ -746,38 +752,38 @@ public static com.google.spanner.admin.database.v1.BackupSchedule parseFrom( public static com.google.spanner.admin.database.v1.BackupSchedule parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupSchedule parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.BackupSchedule parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupSchedule parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.BackupSchedule parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupSchedule parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -800,7 +806,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -816,7 +822,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.BackupSchedule} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.BackupSchedule) com.google.spanner.admin.database.v1.BackupScheduleOrBuilder { @@ -826,7 +832,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_BackupSchedule_fieldAccessorTable @@ -840,17 +846,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSpecFieldBuilder(); - getRetentionDurationFieldBuilder(); - getEncryptionConfigFieldBuilder(); - getUpdateTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSpecFieldBuilder(); + internalGetRetentionDurationFieldBuilder(); + internalGetEncryptionConfigFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); } } @@ -962,39 +968,6 @@ private void buildPartialOneofs(com.google.spanner.admin.database.v1.BackupSched } } - @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.admin.database.v1.BackupSchedule) { @@ -1076,39 +1049,41 @@ public Builder mergeFrom( case 26: { input.readMessage( - getRetentionDurationFieldBuilder().getBuilder(), extensionRegistry); + internalGetRetentionDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 50: { - input.readMessage(getSpecFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetSpecFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 50 case 58: { - input.readMessage(getFullBackupSpecFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFullBackupSpecFieldBuilder().getBuilder(), extensionRegistry); backupTypeSpecCase_ = 7; break; } // case 58 case 66: { input.readMessage( - getIncrementalBackupSpecFieldBuilder().getBuilder(), extensionRegistry); + internalGetIncrementalBackupSpecFieldBuilder().getBuilder(), extensionRegistry); backupTypeSpecCase_ = 8; break; } // case 66 case 74: { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 74 @@ -1297,7 +1272,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.BackupScheduleSpec spec_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupScheduleSpec, com.google.spanner.admin.database.v1.BackupScheduleSpec.Builder, com.google.spanner.admin.database.v1.BackupScheduleSpecOrBuilder> @@ -1465,7 +1440,7 @@ public Builder clearSpec() { public com.google.spanner.admin.database.v1.BackupScheduleSpec.Builder getSpecBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSpecFieldBuilder().getBuilder(); + return internalGetSpecFieldBuilder().getBuilder(); } /** @@ -1502,14 +1477,14 @@ public com.google.spanner.admin.database.v1.BackupScheduleSpecOrBuilder getSpecO * .google.spanner.admin.database.v1.BackupScheduleSpec spec = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupScheduleSpec, com.google.spanner.admin.database.v1.BackupScheduleSpec.Builder, com.google.spanner.admin.database.v1.BackupScheduleSpecOrBuilder> - getSpecFieldBuilder() { + internalGetSpecFieldBuilder() { if (specBuilder_ == null) { specBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupScheduleSpec, com.google.spanner.admin.database.v1.BackupScheduleSpec.Builder, com.google.spanner.admin.database.v1.BackupScheduleSpecOrBuilder>( @@ -1520,7 +1495,7 @@ public com.google.spanner.admin.database.v1.BackupScheduleSpecOrBuilder getSpecO } private com.google.protobuf.Duration retentionDuration_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> @@ -1693,7 +1668,7 @@ public Builder clearRetentionDuration() { public com.google.protobuf.Duration.Builder getRetentionDurationBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getRetentionDurationFieldBuilder().getBuilder(); + return internalGetRetentionDurationFieldBuilder().getBuilder(); } /** @@ -1732,14 +1707,14 @@ public com.google.protobuf.DurationOrBuilder getRetentionDurationOrBuilder() { * .google.protobuf.Duration retention_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getRetentionDurationFieldBuilder() { + internalGetRetentionDurationFieldBuilder() { if (retentionDurationBuilder_ == null) { retentionDurationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -1750,7 +1725,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionDurationOrBuilder() { } private com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder> @@ -1929,7 +1904,7 @@ public Builder clearEncryptionConfig() { getEncryptionConfigBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } /** @@ -1969,14 +1944,14 @@ public Builder clearEncryptionConfig() { * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder>( @@ -1986,7 +1961,7 @@ public Builder clearEncryptionConfig() { return encryptionConfigBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.FullBackupSpec, com.google.spanner.admin.database.v1.FullBackupSpec.Builder, com.google.spanner.admin.database.v1.FullBackupSpecOrBuilder> @@ -2148,7 +2123,7 @@ public Builder clearFullBackupSpec() { * .google.spanner.admin.database.v1.FullBackupSpec full_backup_spec = 7; */ public com.google.spanner.admin.database.v1.FullBackupSpec.Builder getFullBackupSpecBuilder() { - return getFullBackupSpecFieldBuilder().getBuilder(); + return internalGetFullBackupSpecFieldBuilder().getBuilder(); } /** @@ -2182,18 +2157,18 @@ public com.google.spanner.admin.database.v1.FullBackupSpec.Builder getFullBackup * * .google.spanner.admin.database.v1.FullBackupSpec full_backup_spec = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.FullBackupSpec, com.google.spanner.admin.database.v1.FullBackupSpec.Builder, com.google.spanner.admin.database.v1.FullBackupSpecOrBuilder> - getFullBackupSpecFieldBuilder() { + internalGetFullBackupSpecFieldBuilder() { if (fullBackupSpecBuilder_ == null) { if (!(backupTypeSpecCase_ == 7)) { backupTypeSpec_ = com.google.spanner.admin.database.v1.FullBackupSpec.getDefaultInstance(); } fullBackupSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.FullBackupSpec, com.google.spanner.admin.database.v1.FullBackupSpec.Builder, com.google.spanner.admin.database.v1.FullBackupSpecOrBuilder>( @@ -2207,7 +2182,7 @@ public com.google.spanner.admin.database.v1.FullBackupSpec.Builder getFullBackup return fullBackupSpecBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.IncrementalBackupSpec, com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder, com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder> @@ -2380,7 +2355,7 @@ public Builder clearIncrementalBackupSpec() { */ public com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder getIncrementalBackupSpecBuilder() { - return getIncrementalBackupSpecFieldBuilder().getBuilder(); + return internalGetIncrementalBackupSpecFieldBuilder().getBuilder(); } /** @@ -2416,18 +2391,18 @@ public Builder clearIncrementalBackupSpec() { * .google.spanner.admin.database.v1.IncrementalBackupSpec incremental_backup_spec = 8; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.IncrementalBackupSpec, com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder, com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder> - getIncrementalBackupSpecFieldBuilder() { + internalGetIncrementalBackupSpecFieldBuilder() { if (incrementalBackupSpecBuilder_ == null) { if (!(backupTypeSpecCase_ == 8)) { backupTypeSpec_ = com.google.spanner.admin.database.v1.IncrementalBackupSpec.getDefaultInstance(); } incrementalBackupSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.IncrementalBackupSpec, com.google.spanner.admin.database.v1.IncrementalBackupSpec.Builder, com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder>( @@ -2442,7 +2417,7 @@ public Builder clearIncrementalBackupSpec() { } private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -2615,7 +2590,7 @@ public Builder clearUpdateTime() { public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { bitField0_ |= 0x00000040; onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); } /** @@ -2654,14 +2629,14 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { + internalGetUpdateTimeFieldBuilder() { if (updateTimeBuilder_ == null) { updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2671,17 +2646,6 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTimeBuilder_; } - @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.admin.database.v1.BackupSchedule) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleName.java index 20c1a436d66..0fd9b79cd7a 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleName.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleOrBuilder.java index c4536252dc2..4e5a79ab54c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface BackupScheduleOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.BackupSchedule) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleProto.java index 30fa19ffa90..e5cdc336c62 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; -public final class BackupScheduleProto { +@com.google.protobuf.Generated +public final class BackupScheduleProto extends com.google.protobuf.GeneratedFile { private BackupScheduleProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BackupScheduleProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,39 +42,39 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_BackupScheduleSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_BackupScheduleSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_BackupSchedule_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_BackupSchedule_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CrontabSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CrontabSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CreateBackupScheduleRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CreateBackupScheduleRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_GetBackupScheduleRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_GetBackupScheduleRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_DeleteBackupScheduleRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_DeleteBackupScheduleRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListBackupSchedulesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListBackupSchedulesRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListBackupSchedulesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListBackupSchedulesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_UpdateBackupScheduleRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_UpdateBackupScheduleRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -150,17 +162,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.spanner.admin.database.v1.BackupProto.getDescriptor(), }); internal_static_google_spanner_admin_database_v1_BackupScheduleSpec_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_spanner_admin_database_v1_BackupScheduleSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_BackupScheduleSpec_descriptor, new java.lang.String[] { "CronSpec", "ScheduleSpec", }); internal_static_google_spanner_admin_database_v1_BackupSchedule_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_spanner_admin_database_v1_BackupSchedule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_BackupSchedule_descriptor, new java.lang.String[] { "Name", @@ -173,61 +185,68 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BackupTypeSpec", }); internal_static_google_spanner_admin_database_v1_CrontabSpec_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_spanner_admin_database_v1_CrontabSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CrontabSpec_descriptor, new java.lang.String[] { "Text", "TimeZone", "CreationWindow", }); internal_static_google_spanner_admin_database_v1_CreateBackupScheduleRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_spanner_admin_database_v1_CreateBackupScheduleRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CreateBackupScheduleRequest_descriptor, new java.lang.String[] { "Parent", "BackupScheduleId", "BackupSchedule", }); internal_static_google_spanner_admin_database_v1_GetBackupScheduleRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_spanner_admin_database_v1_GetBackupScheduleRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_GetBackupScheduleRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_spanner_admin_database_v1_DeleteBackupScheduleRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageType(5); internal_static_google_spanner_admin_database_v1_DeleteBackupScheduleRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_DeleteBackupScheduleRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_spanner_admin_database_v1_ListBackupSchedulesRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageType(6); internal_static_google_spanner_admin_database_v1_ListBackupSchedulesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupSchedulesRequest_descriptor, new java.lang.String[] { "Parent", "PageSize", "PageToken", }); internal_static_google_spanner_admin_database_v1_ListBackupSchedulesResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageType(7); internal_static_google_spanner_admin_database_v1_ListBackupSchedulesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListBackupSchedulesResponse_descriptor, new java.lang.String[] { "BackupSchedules", "NextPageToken", }); internal_static_google_spanner_admin_database_v1_UpdateBackupScheduleRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageType(8); internal_static_google_spanner_admin_database_v1_UpdateBackupScheduleRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_UpdateBackupScheduleRequest_descriptor, new java.lang.String[] { "BackupSchedule", "UpdateMask", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.spanner.admin.database.v1.BackupProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -235,12 +254,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.spanner.admin.database.v1.BackupProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleSpec.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleSpec.java index 96a94d9e686..22075bdc46a 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleSpec.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleSpec.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.admin.database.v1.BackupScheduleSpec} */ -public final class BackupScheduleSpec extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BackupScheduleSpec extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.BackupScheduleSpec) BackupScheduleSpecOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BackupScheduleSpec"); + } + // Use BackupScheduleSpec.newBuilder() to construct. - private BackupScheduleSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BackupScheduleSpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BackupScheduleSpec() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BackupScheduleSpec(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_BackupScheduleSpec_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_BackupScheduleSpec_fieldAccessorTable @@ -279,38 +285,38 @@ public static com.google.spanner.admin.database.v1.BackupScheduleSpec parseFrom( public static com.google.spanner.admin.database.v1.BackupScheduleSpec parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupScheduleSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.BackupScheduleSpec parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupScheduleSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.BackupScheduleSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.BackupScheduleSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -334,7 +340,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -348,7 +354,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.BackupScheduleSpec} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.BackupScheduleSpec) com.google.spanner.admin.database.v1.BackupScheduleSpecOrBuilder { @@ -358,7 +364,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_BackupScheduleSpec_fieldAccessorTable @@ -370,7 +376,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.BackupScheduleSpec.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -431,39 +437,6 @@ private void buildPartialOneofs( } } - @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.admin.database.v1.BackupScheduleSpec) { @@ -516,7 +489,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getCronSpecFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCronSpecFieldBuilder().getBuilder(), extensionRegistry); scheduleSpecCase_ = 1; break; } // case 10 @@ -553,7 +527,7 @@ public Builder clearScheduleSpec() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CrontabSpec, com.google.spanner.admin.database.v1.CrontabSpec.Builder, com.google.spanner.admin.database.v1.CrontabSpecOrBuilder> @@ -715,7 +689,7 @@ public Builder clearCronSpec() { * .google.spanner.admin.database.v1.CrontabSpec cron_spec = 1; */ public com.google.spanner.admin.database.v1.CrontabSpec.Builder getCronSpecBuilder() { - return getCronSpecFieldBuilder().getBuilder(); + return internalGetCronSpecFieldBuilder().getBuilder(); } /** @@ -748,17 +722,17 @@ public com.google.spanner.admin.database.v1.CrontabSpecOrBuilder getCronSpecOrBu * * .google.spanner.admin.database.v1.CrontabSpec cron_spec = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CrontabSpec, com.google.spanner.admin.database.v1.CrontabSpec.Builder, com.google.spanner.admin.database.v1.CrontabSpecOrBuilder> - getCronSpecFieldBuilder() { + internalGetCronSpecFieldBuilder() { if (cronSpecBuilder_ == null) { if (!(scheduleSpecCase_ == 1)) { scheduleSpec_ = com.google.spanner.admin.database.v1.CrontabSpec.getDefaultInstance(); } cronSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CrontabSpec, com.google.spanner.admin.database.v1.CrontabSpec.Builder, com.google.spanner.admin.database.v1.CrontabSpecOrBuilder>( @@ -772,17 +746,6 @@ public com.google.spanner.admin.database.v1.CrontabSpecOrBuilder getCronSpecOrBu return cronSpecBuilder_; } - @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.admin.database.v1.BackupScheduleSpec) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleSpecOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleSpecOrBuilder.java index f1f06f342e9..0109d54758b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleSpecOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/BackupScheduleSpecOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface BackupScheduleSpecOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.BackupScheduleSpec) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java index 64a94607588..fcbb39dc095 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CommonProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; -public final class CommonProto { +@com.google.protobuf.Generated +public final class CommonProto extends com.google.protobuf.GeneratedFile { private CommonProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CommonProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,15 +42,15 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_OperationProgress_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_OperationProgress_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_EncryptionConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_EncryptionInfo_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -97,29 +109,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_spanner_admin_database_v1_OperationProgress_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_spanner_admin_database_v1_OperationProgress_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_OperationProgress_descriptor, new java.lang.String[] { "ProgressPercent", "StartTime", "EndTime", }); internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_spanner_admin_database_v1_EncryptionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor, new java.lang.String[] { "KmsKeyName", "KmsKeyNames", }); internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_spanner_admin_database_v1_EncryptionInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor, new java.lang.String[] { "EncryptionType", "EncryptionStatus", "KmsKeyVersion", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -127,10 +144,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java index 0e3d2fc147d..a03493f9269 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupEncryptionConfig} */ -public final class CopyBackupEncryptionConfig extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CopyBackupEncryptionConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CopyBackupEncryptionConfig) CopyBackupEncryptionConfigOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CopyBackupEncryptionConfig"); + } + // Use CopyBackupEncryptionConfig.newBuilder() to construct. - private CopyBackupEncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CopyBackupEncryptionConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CopyBackupEncryptionConfig() { kmsKeyNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CopyBackupEncryptionConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_fieldAccessorTable @@ -127,6 +133,16 @@ public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EncryptionType"); + } + /** * * @@ -238,7 +254,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.getDescriptor() .getEnumTypes() .get(0); @@ -532,11 +548,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, encryptionType_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kmsKeyName_); } for (int i = 0; i < kmsKeyNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kmsKeyNames_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, kmsKeyNames_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -553,8 +569,8 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, encryptionType_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kmsKeyName_); } { int dataSize = 0; @@ -644,38 +660,38 @@ public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig pa public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -699,7 +715,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -713,7 +729,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupEncryptionConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CopyBackupEncryptionConfig) com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder { @@ -723,7 +739,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CopyBackupEncryptionConfig_fieldAccessorTable @@ -735,7 +751,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -796,39 +812,6 @@ private void buildPartial0( } } - @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.admin.database.v1.CopyBackupEncryptionConfig) { @@ -1514,17 +1497,6 @@ public Builder addKmsKeyNamesBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.CopyBackupEncryptionConfig) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java index 5b6f0bbf57a..ef10e01d28e 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupEncryptionConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CopyBackupEncryptionConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CopyBackupEncryptionConfig) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java index d7f6d21a8c5..7151a3520b0 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupMetadata} */ -public final class CopyBackupMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CopyBackupMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CopyBackupMetadata) CopyBackupMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CopyBackupMetadata"); + } + // Use CopyBackupMetadata.newBuilder() to construct. - private CopyBackupMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CopyBackupMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CopyBackupMetadata() { sourceBackup_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CopyBackupMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_fieldAccessorTable @@ -336,11 +342,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, sourceBackup_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getProgress()); @@ -357,11 +363,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sourceBackup_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProgress()); @@ -460,38 +466,38 @@ public static com.google.spanner.admin.database.v1.CopyBackupMetadata parseFrom( public static com.google.spanner.admin.database.v1.CopyBackupMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CopyBackupMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CopyBackupMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CopyBackupMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CopyBackupMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CopyBackupMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -515,7 +521,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -530,7 +536,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CopyBackupMetadata) com.google.spanner.admin.database.v1.CopyBackupMetadataOrBuilder { @@ -540,7 +546,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CopyBackupMetadata_fieldAccessorTable @@ -554,15 +560,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProgressFieldBuilder(); - getCancelTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetProgressFieldBuilder(); + internalGetCancelTimeFieldBuilder(); } } @@ -636,39 +642,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.CopyBackupMetada 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.admin.database.v1.CopyBackupMetadata) { @@ -738,13 +711,15 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1010,7 +985,7 @@ public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> @@ -1171,7 +1146,7 @@ public Builder clearProgress() { public com.google.spanner.admin.database.v1.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } /** @@ -1206,14 +1181,14 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre * * .google.spanner.admin.database.v1.OperationProgress progress = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder>( @@ -1224,7 +1199,7 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1446,7 +1421,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1499,14 +1474,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1516,17 +1491,6 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { return cancelTimeBuilder_; } - @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.admin.database.v1.CopyBackupMetadata) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java index 66c364035d2..81ce31fb4e7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CopyBackupMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CopyBackupMetadata) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java index 5bd946cffba..981f13a37f7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupRequest} */ -public final class CopyBackupRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CopyBackupRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CopyBackupRequest) CopyBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CopyBackupRequest"); + } + // Use CopyBackupRequest.newBuilder() to construct. - private CopyBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CopyBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private CopyBackupRequest() { sourceBackup_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CopyBackupRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CopyBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CopyBackupRequest_fieldAccessorTable @@ -401,14 +407,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sourceBackup_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getExpireTime()); @@ -425,14 +431,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sourceBackup_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExpireTime()); @@ -534,38 +540,38 @@ public static com.google.spanner.admin.database.v1.CopyBackupRequest parseFrom( public static com.google.spanner.admin.database.v1.CopyBackupRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CopyBackupRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CopyBackupRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CopyBackupRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CopyBackupRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CopyBackupRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -589,7 +595,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -604,7 +610,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CopyBackupRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CopyBackupRequest) com.google.spanner.admin.database.v1.CopyBackupRequestOrBuilder { @@ -614,7 +620,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CopyBackupRequest_fieldAccessorTable @@ -628,15 +634,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getExpireTimeFieldBuilder(); - getEncryptionConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpireTimeFieldBuilder(); + internalGetEncryptionConfigFieldBuilder(); } } @@ -715,39 +721,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.CopyBackupReques 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.admin.database.v1.CopyBackupRequest) { @@ -828,14 +801,15 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -1252,7 +1226,7 @@ public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp expireTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1432,7 +1406,7 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } /** @@ -1473,14 +1447,14 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpireTimeFieldBuilder() { + internalGetExpireTimeFieldBuilder() { if (expireTimeBuilder_ == null) { expireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1491,7 +1465,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { } private com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig, com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder, com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder> @@ -1684,7 +1658,7 @@ public Builder clearEncryptionConfig() { getEncryptionConfigBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } /** @@ -1728,14 +1702,14 @@ public Builder clearEncryptionConfig() { * .google.spanner.admin.database.v1.CopyBackupEncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig, com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder, com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig, com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.Builder, com.google.spanner.admin.database.v1.CopyBackupEncryptionConfigOrBuilder>( @@ -1745,17 +1719,6 @@ public Builder clearEncryptionConfig() { return encryptionConfigBuilder_; } - @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.admin.database.v1.CopyBackupRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java index 5e08510aea6..3eae68b598f 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CopyBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CopyBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CopyBackupRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java index b989586bdc8..1540a3abc7c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupEncryptionConfig} */ -public final class CreateBackupEncryptionConfig extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateBackupEncryptionConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CreateBackupEncryptionConfig) CreateBackupEncryptionConfigOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateBackupEncryptionConfig"); + } + // Use CreateBackupEncryptionConfig.newBuilder() to construct. - private CreateBackupEncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateBackupEncryptionConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CreateBackupEncryptionConfig() { kmsKeyNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateBackupEncryptionConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_fieldAccessorTable @@ -126,6 +132,16 @@ public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EncryptionType"); + } + /** * * @@ -236,7 +252,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.getDescriptor() .getEnumTypes() .get(0); @@ -526,11 +542,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, encryptionType_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kmsKeyName_); } for (int i = 0; i < kmsKeyNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kmsKeyNames_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, kmsKeyNames_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -547,8 +563,8 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, encryptionType_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kmsKeyName_); } { int dataSize = 0; @@ -638,39 +654,39 @@ public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -694,7 +710,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -708,7 +724,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupEncryptionConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CreateBackupEncryptionConfig) com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder { @@ -718,7 +734,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CreateBackupEncryptionConfig_fieldAccessorTable @@ -731,7 +747,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -792,39 +808,6 @@ private void buildPartial0( } } - @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.admin.database.v1.CreateBackupEncryptionConfig) { @@ -1501,17 +1484,6 @@ public Builder addKmsKeyNamesBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.CreateBackupEncryptionConfig) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java index eb67bb7bd32..abd7c65b69b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupEncryptionConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CreateBackupEncryptionConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CreateBackupEncryptionConfig) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java index 8e959803846..1bab9d15b76 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupMetadata} */ -public final class CreateBackupMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateBackupMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CreateBackupMetadata) CreateBackupMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateBackupMetadata"); + } + // Use CreateBackupMetadata.newBuilder() to construct. - private CreateBackupMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateBackupMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CreateBackupMetadata() { database_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateBackupMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_fieldAccessorTable @@ -328,11 +334,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, database_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getProgress()); @@ -349,11 +355,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, database_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProgress()); @@ -452,38 +458,38 @@ public static com.google.spanner.admin.database.v1.CreateBackupMetadata parseFro public static com.google.spanner.admin.database.v1.CreateBackupMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateBackupMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateBackupMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -507,7 +513,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -522,7 +528,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CreateBackupMetadata) com.google.spanner.admin.database.v1.CreateBackupMetadataOrBuilder { @@ -532,7 +538,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CreateBackupMetadata_fieldAccessorTable @@ -546,15 +552,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProgressFieldBuilder(); - getCancelTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetProgressFieldBuilder(); + internalGetCancelTimeFieldBuilder(); } } @@ -628,39 +634,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.CreateBackupMeta 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.admin.database.v1.CreateBackupMetadata) { @@ -730,13 +703,15 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -982,7 +957,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> @@ -1143,7 +1118,7 @@ public Builder clearProgress() { public com.google.spanner.admin.database.v1.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } /** @@ -1178,14 +1153,14 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre * * .google.spanner.admin.database.v1.OperationProgress progress = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder>( @@ -1196,7 +1171,7 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1418,7 +1393,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1471,14 +1446,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1488,17 +1463,6 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { return cancelTimeBuilder_; } - @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.admin.database.v1.CreateBackupMetadata) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java index b83db702108..61ebc10cc35 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CreateBackupMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CreateBackupMetadata) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java index 867cf12c3aa..5b825bf82f7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupRequest} */ -public final class CreateBackupRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateBackupRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CreateBackupRequest) CreateBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateBackupRequest"); + } + // Use CreateBackupRequest.newBuilder() to construct. - private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CreateBackupRequest() { backupId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateBackupRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CreateBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CreateBackupRequest_fieldAccessorTable @@ -336,11 +342,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getBackup()); @@ -357,11 +363,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackup()); @@ -460,38 +466,38 @@ public static com.google.spanner.admin.database.v1.CreateBackupRequest parseFrom public static com.google.spanner.admin.database.v1.CreateBackupRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateBackupRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateBackupRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -515,7 +521,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -530,7 +536,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CreateBackupRequest) com.google.spanner.admin.database.v1.CreateBackupRequestOrBuilder { @@ -540,7 +546,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_CreateBackupRequest_fieldAccessorTable @@ -554,15 +560,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBackupFieldBuilder(); - getEncryptionConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupFieldBuilder(); + internalGetEncryptionConfigFieldBuilder(); } } @@ -637,39 +643,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.CreateBackupRequ 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.admin.database.v1.CreateBackupRequest) { @@ -739,14 +712,14 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetBackupFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1037,7 +1010,7 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> @@ -1196,7 +1169,7 @@ public Builder clearBackup() { public com.google.spanner.admin.database.v1.Backup.Builder getBackupBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getBackupFieldBuilder().getBuilder(); + return internalGetBackupFieldBuilder().getBuilder(); } /** @@ -1231,14 +1204,14 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() * .google.spanner.admin.database.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> - getBackupFieldBuilder() { + internalGetBackupFieldBuilder() { if (backupBuilder_ == null) { backupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder>( @@ -1249,7 +1222,7 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() } private com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder> @@ -1442,7 +1415,7 @@ public Builder clearEncryptionConfig() { getEncryptionConfigBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } /** @@ -1486,14 +1459,14 @@ public Builder clearEncryptionConfig() { * .google.spanner.admin.database.v1.CreateBackupEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.Builder, com.google.spanner.admin.database.v1.CreateBackupEncryptionConfigOrBuilder>( @@ -1503,17 +1476,6 @@ public Builder clearEncryptionConfig() { return encryptionConfigBuilder_; } - @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.admin.database.v1.CreateBackupRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java index 9a8bee3d8bf..99882444f66 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CreateBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CreateBackupRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupScheduleRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupScheduleRequest.java index 5a25d1d9325..6b0726c36e1 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupScheduleRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupScheduleRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupScheduleRequest} */ -public final class CreateBackupScheduleRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateBackupScheduleRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CreateBackupScheduleRequest) CreateBackupScheduleRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateBackupScheduleRequest"); + } + // Use CreateBackupScheduleRequest.newBuilder() to construct. - private CreateBackupScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateBackupScheduleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CreateBackupScheduleRequest() { backupScheduleId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateBackupScheduleRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_CreateBackupScheduleRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_CreateBackupScheduleRequest_fieldAccessorTable @@ -254,11 +260,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupScheduleId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupScheduleId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupScheduleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupScheduleId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getBackupSchedule()); @@ -272,11 +278,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupScheduleId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupScheduleId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupScheduleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupScheduleId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackupSchedule()); @@ -364,38 +370,38 @@ public static com.google.spanner.admin.database.v1.CreateBackupScheduleRequest p public static com.google.spanner.admin.database.v1.CreateBackupScheduleRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupScheduleRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateBackupScheduleRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupScheduleRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateBackupScheduleRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateBackupScheduleRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -419,7 +425,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -434,7 +440,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CreateBackupScheduleRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CreateBackupScheduleRequest) com.google.spanner.admin.database.v1.CreateBackupScheduleRequestOrBuilder { @@ -444,7 +450,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_CreateBackupScheduleRequest_fieldAccessorTable @@ -458,14 +464,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBackupScheduleFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupScheduleFieldBuilder(); } } @@ -533,39 +539,6 @@ private void buildPartial0( 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.admin.database.v1.CreateBackupScheduleRequest) { @@ -634,7 +607,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getBackupScheduleFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBackupScheduleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -900,7 +874,7 @@ public Builder setBackupScheduleIdBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.BackupSchedule backupSchedule_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupSchedule, com.google.spanner.admin.database.v1.BackupSchedule.Builder, com.google.spanner.admin.database.v1.BackupScheduleOrBuilder> @@ -1061,7 +1035,7 @@ public Builder clearBackupSchedule() { public com.google.spanner.admin.database.v1.BackupSchedule.Builder getBackupScheduleBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getBackupScheduleFieldBuilder().getBuilder(); + return internalGetBackupScheduleFieldBuilder().getBuilder(); } /** @@ -1097,14 +1071,14 @@ public com.google.spanner.admin.database.v1.BackupSchedule.Builder getBackupSche * .google.spanner.admin.database.v1.BackupSchedule backup_schedule = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupSchedule, com.google.spanner.admin.database.v1.BackupSchedule.Builder, com.google.spanner.admin.database.v1.BackupScheduleOrBuilder> - getBackupScheduleFieldBuilder() { + internalGetBackupScheduleFieldBuilder() { if (backupScheduleBuilder_ == null) { backupScheduleBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupSchedule, com.google.spanner.admin.database.v1.BackupSchedule.Builder, com.google.spanner.admin.database.v1.BackupScheduleOrBuilder>( @@ -1114,17 +1088,6 @@ public com.google.spanner.admin.database.v1.BackupSchedule.Builder getBackupSche return backupScheduleBuilder_; } - @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.admin.database.v1.CreateBackupScheduleRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupScheduleRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupScheduleRequestOrBuilder.java index ec606a94dc4..b72bf7410d3 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupScheduleRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateBackupScheduleRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CreateBackupScheduleRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CreateBackupScheduleRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadata.java index 4bc29e87fee..106765ec363 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CreateDatabaseMetadata} */ -public final class CreateDatabaseMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateDatabaseMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CreateDatabaseMetadata) CreateDatabaseMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateDatabaseMetadata"); + } + // Use CreateDatabaseMetadata.newBuilder() to construct. - private CreateDatabaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateDatabaseMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private CreateDatabaseMetadata() { database_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateDatabaseMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_CreateDatabaseMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_CreateDatabaseMetadata_fieldAccessorTable @@ -132,8 +138,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } getUnknownFields().writeTo(output); } @@ -144,8 +150,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -219,38 +225,38 @@ public static com.google.spanner.admin.database.v1.CreateDatabaseMetadata parseF public static com.google.spanner.admin.database.v1.CreateDatabaseMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateDatabaseMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateDatabaseMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateDatabaseMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateDatabaseMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateDatabaseMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -274,7 +280,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -289,7 +295,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CreateDatabaseMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CreateDatabaseMetadata) com.google.spanner.admin.database.v1.CreateDatabaseMetadataOrBuilder { @@ -299,7 +305,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_CreateDatabaseMetadata_fieldAccessorTable @@ -311,7 +317,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.CreateDatabaseMetadata.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -361,39 +367,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.CreateDatabaseMe } } - @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.admin.database.v1.CreateDatabaseMetadata) { @@ -574,17 +547,6 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.CreateDatabaseMetadata) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadataOrBuilder.java index daa3e2603cd..05e67b26858 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CreateDatabaseMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CreateDatabaseMetadata) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java index aa5a5a664c7..37ff9fa76c1 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CreateDatabaseRequest} */ -public final class CreateDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateDatabaseRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CreateDatabaseRequest) CreateDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateDatabaseRequest"); + } + // Use CreateDatabaseRequest.newBuilder() to construct. - private CreateDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateDatabaseRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +60,13 @@ private CreateDatabaseRequest() { protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateDatabaseRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_CreateDatabaseRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_CreateDatabaseRequest_fieldAccessorTable @@ -395,9 +401,9 @@ public com.google.spanner.admin.database.v1.DatabaseDialect getDatabaseDialect() * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). @@ -426,14 +432,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(createStatement_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, createStatement_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(createStatement_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, createStatement_); } for (int i = 0; i < extraStatements_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, extraStatements_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, extraStatements_.getRaw(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getEncryptionConfig()); @@ -455,11 +461,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(createStatement_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, createStatement_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(createStatement_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, createStatement_); } { int dataSize = 0; @@ -574,38 +580,38 @@ public static com.google.spanner.admin.database.v1.CreateDatabaseRequest parseFr public static com.google.spanner.admin.database.v1.CreateDatabaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateDatabaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateDatabaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateDatabaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CreateDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CreateDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -629,7 +635,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -644,7 +650,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CreateDatabaseRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CreateDatabaseRequest) com.google.spanner.admin.database.v1.CreateDatabaseRequestOrBuilder { @@ -654,7 +660,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_CreateDatabaseRequest_fieldAccessorTable @@ -668,14 +674,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncryptionConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncryptionConfigFieldBuilder(); } } @@ -754,39 +760,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.CreateDatabaseRe 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.admin.database.v1.CreateDatabaseRequest) { @@ -826,7 +799,7 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.CreateDatabaseRequ if (other.databaseDialect_ != 0) { setDatabaseDialectValue(other.getDatabaseDialectValue()); } - if (other.getProtoDescriptors() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getProtoDescriptors().isEmpty()) { setProtoDescriptors(other.getProtoDescriptors()); } this.mergeUnknownFields(other.getUnknownFields()); @@ -877,7 +850,7 @@ public Builder mergeFrom( case 34: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1380,7 +1353,7 @@ public Builder addExtraStatementsBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> @@ -1558,7 +1531,7 @@ public Builder clearEncryptionConfig() { getEncryptionConfigBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } /** @@ -1598,14 +1571,14 @@ public Builder clearEncryptionConfig() { * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>( @@ -1737,9 +1710,9 @@ public Builder clearDatabaseDialect() { * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). @@ -1767,9 +1740,9 @@ public com.google.protobuf.ByteString getProtoDescriptors() { * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). @@ -1803,9 +1776,9 @@ public Builder setProtoDescriptors(com.google.protobuf.ByteString value) { * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). @@ -1822,17 +1795,6 @@ public Builder clearProtoDescriptors() { 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.admin.database.v1.CreateDatabaseRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java index 3d8a26f7498..4e20351bf43 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CreateDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CreateDatabaseRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CreateDatabaseRequest) @@ -248,9 +250,9 @@ public interface CreateDatabaseRequestOrBuilder * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CrontabSpec.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CrontabSpec.java index 5706d4d278f..fea9434cd1e 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CrontabSpec.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CrontabSpec.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.CrontabSpec} */ -public final class CrontabSpec extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CrontabSpec extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.CrontabSpec) CrontabSpecOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CrontabSpec"); + } + // Use CrontabSpec.newBuilder() to construct. - private CrontabSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CrontabSpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CrontabSpec() { timeZone_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CrontabSpec(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_CrontabSpec_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_CrontabSpec_fieldAccessorTable @@ -83,11 +89,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * The backup will contain an externally consistent copy of the * database at the version time. Allowed frequencies are 12 hour, 1 day, * 1 week and 1 month. Examples of valid cron specifications: - * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - * * `0 2 * * * ` : once a day at 2 past midnight in UTC. - * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + * * `0 2 * * * ` : once a day at 2 past midnight in UTC. + * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. * * * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -118,11 +124,11 @@ public java.lang.String getText() { * The backup will contain an externally consistent copy of the * database at the version time. Allowed frequencies are 12 hour, 1 day, * 1 week and 1 month. Examples of valid cron specifications: - * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - * * `0 2 * * * ` : once a day at 2 past midnight in UTC. - * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + * * `0 2 * * * ` : once a day at 2 past midnight in UTC. + * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. * * * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -288,11 +294,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, text_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeZone_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, timeZone_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, timeZone_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getCreationWindow()); @@ -306,11 +312,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, text_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeZone_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, timeZone_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, timeZone_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreationWindow()); @@ -398,38 +404,38 @@ public static com.google.spanner.admin.database.v1.CrontabSpec parseFrom( public static com.google.spanner.admin.database.v1.CrontabSpec parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CrontabSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CrontabSpec parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CrontabSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.CrontabSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.CrontabSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -452,7 +458,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -467,7 +473,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.CrontabSpec} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.CrontabSpec) com.google.spanner.admin.database.v1.CrontabSpecOrBuilder { @@ -477,7 +483,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_CrontabSpec_fieldAccessorTable @@ -491,14 +497,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCreationWindowFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreationWindowFieldBuilder(); } } @@ -564,39 +570,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.CrontabSpec resu 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.admin.database.v1.CrontabSpec) { @@ -663,7 +636,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getCreationWindowFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCreationWindowFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -699,11 +673,11 @@ public Builder mergeFrom( * The backup will contain an externally consistent copy of the * database at the version time. Allowed frequencies are 12 hour, 1 day, * 1 week and 1 month. Examples of valid cron specifications: - * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - * * `0 2 * * * ` : once a day at 2 past midnight in UTC. - * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + * * `0 2 * * * ` : once a day at 2 past midnight in UTC. + * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. * * * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -733,11 +707,11 @@ public java.lang.String getText() { * The backup will contain an externally consistent copy of the * database at the version time. Allowed frequencies are 12 hour, 1 day, * 1 week and 1 month. Examples of valid cron specifications: - * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - * * `0 2 * * * ` : once a day at 2 past midnight in UTC. - * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + * * `0 2 * * * ` : once a day at 2 past midnight in UTC. + * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. * * * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -767,11 +741,11 @@ public com.google.protobuf.ByteString getTextBytes() { * The backup will contain an externally consistent copy of the * database at the version time. Allowed frequencies are 12 hour, 1 day, * 1 week and 1 month. Examples of valid cron specifications: - * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - * * `0 2 * * * ` : once a day at 2 past midnight in UTC. - * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + * * `0 2 * * * ` : once a day at 2 past midnight in UTC. + * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. * * * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -800,11 +774,11 @@ public Builder setText(java.lang.String value) { * The backup will contain an externally consistent copy of the * database at the version time. Allowed frequencies are 12 hour, 1 day, * 1 week and 1 month. Examples of valid cron specifications: - * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - * * `0 2 * * * ` : once a day at 2 past midnight in UTC. - * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + * * `0 2 * * * ` : once a day at 2 past midnight in UTC. + * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. * * * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -829,11 +803,11 @@ public Builder clearText() { * The backup will contain an externally consistent copy of the * database at the version time. Allowed frequencies are 12 hour, 1 day, * 1 week and 1 month. Examples of valid cron specifications: - * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - * * `0 2 * * * ` : once a day at 2 past midnight in UTC. - * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + * * `0 2 * * * ` : once a day at 2 past midnight in UTC. + * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. * * * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -969,7 +943,7 @@ public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Duration creationWindow_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> @@ -1170,7 +1144,7 @@ public Builder clearCreationWindow() { public com.google.protobuf.Duration.Builder getCreationWindowBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCreationWindowFieldBuilder().getBuilder(); + return internalGetCreationWindowFieldBuilder().getBuilder(); } /** @@ -1217,14 +1191,14 @@ public com.google.protobuf.DurationOrBuilder getCreationWindowOrBuilder() { * .google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getCreationWindowFieldBuilder() { + internalGetCreationWindowFieldBuilder() { if (creationWindowBuilder_ == null) { creationWindowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -1234,17 +1208,6 @@ public com.google.protobuf.DurationOrBuilder getCreationWindowOrBuilder() { return creationWindowBuilder_; } - @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.admin.database.v1.CrontabSpec) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CrontabSpecOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CrontabSpecOrBuilder.java index cd74356e8dc..03c7ce8580d 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CrontabSpecOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/CrontabSpecOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface CrontabSpecOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.CrontabSpec) @@ -35,11 +37,11 @@ public interface CrontabSpecOrBuilder * The backup will contain an externally consistent copy of the * database at the version time. Allowed frequencies are 12 hour, 1 day, * 1 week and 1 month. Examples of valid cron specifications: - * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - * * `0 2 * * * ` : once a day at 2 past midnight in UTC. - * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + * * `0 2 * * * ` : once a day at 2 past midnight in UTC. + * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. * * * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -59,11 +61,11 @@ public interface CrontabSpecOrBuilder * The backup will contain an externally consistent copy of the * database at the version time. Allowed frequencies are 12 hour, 1 day, * 1 week and 1 month. Examples of valid cron specifications: - * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - * * `0 2 * * * ` : once a day at 2 past midnight in UTC. - * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + * * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + * * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + * * `0 2 * * * ` : once a day at 2 past midnight in UTC. + * * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + * * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. * * * string text = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Database.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Database.java index 43e7e73038d..6afbcbbf51e 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Database.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/Database.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.Database} */ -public final class Database extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Database extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.Database) DatabaseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Database"); + } + // Use Database.newBuilder() to construct. - private Database(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Database(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +60,13 @@ private Database() { databaseDialect_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Database(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_Database_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_Database_fieldAccessorTable @@ -130,6 +136,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -242,7 +258,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.database.v1.Database.getDescriptor().getEnumTypes().get(0); } @@ -982,8 +998,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (state_ != com.google.spanner.admin.database.v1.Database.State.STATE_UNSPECIFIED.getNumber()) { @@ -998,8 +1014,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(5, getEncryptionConfig()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(versionRetentionPeriod_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, versionRetentionPeriod_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(versionRetentionPeriod_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, versionRetentionPeriod_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(7, getEarliestVersionTime()); @@ -1007,8 +1023,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < encryptionInfo_.size(); i++) { output.writeMessage(8, encryptionInfo_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultLeader_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, defaultLeader_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLeader_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, defaultLeader_); } if (databaseDialect_ != com.google.spanner.admin.database.v1.DatabaseDialect.DATABASE_DIALECT_UNSPECIFIED @@ -1030,8 +1046,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (state_ != com.google.spanner.admin.database.v1.Database.State.STATE_UNSPECIFIED.getNumber()) { @@ -1046,8 +1062,8 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEncryptionConfig()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(versionRetentionPeriod_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, versionRetentionPeriod_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(versionRetentionPeriod_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, versionRetentionPeriod_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEarliestVersionTime()); @@ -1055,8 +1071,8 @@ public int getSerializedSize() { for (int i = 0; i < encryptionInfo_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, encryptionInfo_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultLeader_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, defaultLeader_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLeader_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, defaultLeader_); } if (databaseDialect_ != com.google.spanner.admin.database.v1.DatabaseDialect.DATABASE_DIALECT_UNSPECIFIED @@ -1196,38 +1212,38 @@ public static com.google.spanner.admin.database.v1.Database parseFrom( public static com.google.spanner.admin.database.v1.Database parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.Database parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.Database parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.Database parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.Database parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.Database parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1250,7 +1266,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1264,7 +1280,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.Database} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.Database) com.google.spanner.admin.database.v1.DatabaseOrBuilder { @@ -1274,7 +1290,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_Database_fieldAccessorTable @@ -1288,18 +1304,18 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCreateTimeFieldBuilder(); - getRestoreInfoFieldBuilder(); - getEncryptionConfigFieldBuilder(); - getEncryptionInfoFieldBuilder(); - getEarliestVersionTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetRestoreInfoFieldBuilder(); + internalGetEncryptionConfigFieldBuilder(); + internalGetEncryptionInfoFieldBuilder(); + internalGetEarliestVersionTimeFieldBuilder(); } } @@ -1436,39 +1452,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.Database result) 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.admin.database.v1.Database) { @@ -1517,8 +1500,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.Database other) { encryptionInfo_ = other.encryptionInfo_; bitField0_ = (bitField0_ & ~0x00000020); encryptionInfoBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getEncryptionInfoFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEncryptionInfoFieldBuilder() : null; } else { encryptionInfoBuilder_.addAllMessages(other.encryptionInfo_); @@ -1587,20 +1570,22 @@ public Builder mergeFrom( } // case 16 case 26: { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getRestoreInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRestoreInfoFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -1613,7 +1598,7 @@ public Builder mergeFrom( case 58: { input.readMessage( - getEarliestVersionTimeFieldBuilder().getBuilder(), extensionRegistry); + internalGetEarliestVersionTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 58 @@ -1913,7 +1898,7 @@ public Builder clearState() { } private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -2072,7 +2057,7 @@ public Builder clearCreateTime() { public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } /** @@ -2107,14 +2092,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { + internalGetCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2125,7 +2110,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { } private com.google.spanner.admin.database.v1.RestoreInfo restoreInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.RestoreInfo, com.google.spanner.admin.database.v1.RestoreInfo.Builder, com.google.spanner.admin.database.v1.RestoreInfoOrBuilder> @@ -2293,7 +2278,7 @@ public Builder clearRestoreInfo() { public com.google.spanner.admin.database.v1.RestoreInfo.Builder getRestoreInfoBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getRestoreInfoFieldBuilder().getBuilder(); + return internalGetRestoreInfoFieldBuilder().getBuilder(); } /** @@ -2330,14 +2315,14 @@ public com.google.spanner.admin.database.v1.RestoreInfoOrBuilder getRestoreInfoO * .google.spanner.admin.database.v1.RestoreInfo restore_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.RestoreInfo, com.google.spanner.admin.database.v1.RestoreInfo.Builder, com.google.spanner.admin.database.v1.RestoreInfoOrBuilder> - getRestoreInfoFieldBuilder() { + internalGetRestoreInfoFieldBuilder() { if (restoreInfoBuilder_ == null) { restoreInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.RestoreInfo, com.google.spanner.admin.database.v1.RestoreInfo.Builder, com.google.spanner.admin.database.v1.RestoreInfoOrBuilder>( @@ -2348,7 +2333,7 @@ public com.google.spanner.admin.database.v1.RestoreInfoOrBuilder getRestoreInfoO } private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> @@ -2533,7 +2518,7 @@ public Builder clearEncryptionConfig() { getEncryptionConfigBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } /** @@ -2575,14 +2560,14 @@ public Builder clearEncryptionConfig() { * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>( @@ -2604,7 +2589,7 @@ private void ensureEncryptionInfoIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.EncryptionInfo, com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder> @@ -3011,7 +2996,7 @@ public Builder removeEncryptionInfo(int index) { */ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder getEncryptionInfoBuilder( int index) { - return getEncryptionInfoFieldBuilder().getBuilder(index); + return internalGetEncryptionInfoFieldBuilder().getBuilder(index); } /** @@ -3093,7 +3078,7 @@ public com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder getEncryptio * */ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder addEncryptionInfoBuilder() { - return getEncryptionInfoFieldBuilder() + return internalGetEncryptionInfoFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance()); } @@ -3119,7 +3104,7 @@ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder addEncryption */ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder addEncryptionInfoBuilder( int index) { - return getEncryptionInfoFieldBuilder() + return internalGetEncryptionInfoFieldBuilder() .addBuilder( index, com.google.spanner.admin.database.v1.EncryptionInfo.getDefaultInstance()); } @@ -3146,17 +3131,17 @@ public com.google.spanner.admin.database.v1.EncryptionInfo.Builder addEncryption */ public java.util.List getEncryptionInfoBuilderList() { - return getEncryptionInfoFieldBuilder().getBuilderList(); + return internalGetEncryptionInfoFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.EncryptionInfo, com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder> - getEncryptionInfoFieldBuilder() { + internalGetEncryptionInfoFieldBuilder() { if (encryptionInfoBuilder_ == null) { encryptionInfoBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.EncryptionInfo, com.google.spanner.admin.database.v1.EncryptionInfo.Builder, com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder>( @@ -3306,7 +3291,7 @@ public Builder setVersionRetentionPeriodBytes(com.google.protobuf.ByteString val } private com.google.protobuf.Timestamp earliestVersionTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -3493,7 +3478,7 @@ public Builder clearEarliestVersionTime() { public com.google.protobuf.Timestamp.Builder getEarliestVersionTimeBuilder() { bitField0_ |= 0x00000080; onChanged(); - return getEarliestVersionTimeFieldBuilder().getBuilder(); + return internalGetEarliestVersionTimeFieldBuilder().getBuilder(); } /** @@ -3536,14 +3521,14 @@ public com.google.protobuf.TimestampOrBuilder getEarliestVersionTimeOrBuilder() * .google.protobuf.Timestamp earliest_version_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEarliestVersionTimeFieldBuilder() { + internalGetEarliestVersionTimeFieldBuilder() { if (earliestVersionTimeBuilder_ == null) { earliestVersionTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -3920,17 +3905,6 @@ public Builder clearReconciling() { 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.admin.database.v1.Database) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseDialect.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseDialect.java index ba3ef78ed50..aa4a8200db7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseDialect.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseDialect.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,6 +29,7 @@ * * Protobuf enum {@code google.spanner.admin.database.v1.DatabaseDialect} */ +@com.google.protobuf.Generated public enum DatabaseDialect implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -63,6 +65,16 @@ public enum DatabaseDialect implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DatabaseDialect"); + } + /** * * @@ -155,7 +167,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.database.v1.CommonProto.getDescriptor().getEnumTypes().get(0); } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java index b502edd4db1..55973a0c023 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java index aa74f263a70..530c25d0ff5 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface DatabaseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.Database) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRole.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRole.java index 29c7b143877..b31034c9ab6 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRole.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRole.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.DatabaseRole} */ -public final class DatabaseRole extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DatabaseRole extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.DatabaseRole) DatabaseRoleOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DatabaseRole"); + } + // Use DatabaseRole.newBuilder() to construct. - private DatabaseRole(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DatabaseRole(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private DatabaseRole() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DatabaseRole(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_DatabaseRole_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_DatabaseRole_fieldAccessorTable @@ -135,8 +141,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -147,8 +153,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -222,38 +228,38 @@ public static com.google.spanner.admin.database.v1.DatabaseRole parseFrom( public static com.google.spanner.admin.database.v1.DatabaseRole parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DatabaseRole parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DatabaseRole parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DatabaseRole parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DatabaseRole parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DatabaseRole parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -276,7 +282,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -290,7 +296,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.DatabaseRole} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.DatabaseRole) com.google.spanner.admin.database.v1.DatabaseRoleOrBuilder { @@ -300,7 +306,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_DatabaseRole_fieldAccessorTable @@ -312,7 +318,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.DatabaseRole.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -362,39 +368,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.DatabaseRole res } } - @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.admin.database.v1.DatabaseRole) { @@ -585,17 +558,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.DatabaseRole) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRoleOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRoleOrBuilder.java index a51b44658a0..d7a8f2303e1 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRoleOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DatabaseRoleOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface DatabaseRoleOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.DatabaseRole) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfo.java index 725917699e6..ab70fe88307 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfo.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -30,14 +31,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.DdlStatementActionInfo} */ -public final class DdlStatementActionInfo extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DdlStatementActionInfo extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.DdlStatementActionInfo) DdlStatementActionInfoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DdlStatementActionInfo"); + } + // Use DdlStatementActionInfo.newBuilder() to construct. - private DdlStatementActionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DdlStatementActionInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +59,13 @@ private DdlStatementActionInfo() { entityNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DdlStatementActionInfo(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_DdlStatementActionInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_DdlStatementActionInfo_fieldAccessorTable @@ -278,14 +284,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, action_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, action_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityType_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(entityType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, entityType_); } for (int i = 0; i < entityNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, entityNames_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, entityNames_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -296,11 +302,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, action_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, action_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, entityType_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(entityType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, entityType_); } { int dataSize = 0; @@ -390,38 +396,38 @@ public static com.google.spanner.admin.database.v1.DdlStatementActionInfo parseF public static com.google.spanner.admin.database.v1.DdlStatementActionInfo parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DdlStatementActionInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DdlStatementActionInfo parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DdlStatementActionInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DdlStatementActionInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DdlStatementActionInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -445,7 +451,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -461,7 +467,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.DdlStatementActionInfo} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.DdlStatementActionInfo) com.google.spanner.admin.database.v1.DdlStatementActionInfoOrBuilder { @@ -471,7 +477,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_DdlStatementActionInfo_fieldAccessorTable @@ -483,7 +489,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.DdlStatementActionInfo.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -542,39 +548,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.DdlStatementActi } } - @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.admin.database.v1.DdlStatementActionInfo) { @@ -1128,17 +1101,6 @@ public Builder addEntityNamesBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.DdlStatementActionInfo) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfoOrBuilder.java index fa354dc18c1..b70586cbe47 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DdlStatementActionInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface DdlStatementActionInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.DdlStatementActionInfo) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java index 38934bfd025..0d51c9bcb18 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.DeleteBackupRequest} */ -public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.DeleteBackupRequest) DeleteBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteBackupRequest"); + } + // Use DeleteBackupRequest.newBuilder() to construct. - private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private DeleteBackupRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteBackupRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_fieldAccessorTable @@ -140,8 +146,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -152,8 +158,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -227,38 +233,38 @@ public static com.google.spanner.admin.database.v1.DeleteBackupRequest parseFrom public static com.google.spanner.admin.database.v1.DeleteBackupRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DeleteBackupRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DeleteBackupRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DeleteBackupRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DeleteBackupRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DeleteBackupRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -282,7 +288,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -297,7 +303,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.DeleteBackupRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.DeleteBackupRequest) com.google.spanner.admin.database.v1.DeleteBackupRequestOrBuilder { @@ -307,7 +313,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_DeleteBackupRequest_fieldAccessorTable @@ -319,7 +325,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.DeleteBackupRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -369,39 +375,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.DeleteBackupRequ } } - @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.admin.database.v1.DeleteBackupRequest) { @@ -602,17 +575,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.DeleteBackupRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequestOrBuilder.java index f5e662ae800..07a259a9d34 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface DeleteBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.DeleteBackupRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupScheduleRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupScheduleRequest.java index 92318be8ccb..41fec9e9f7d 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupScheduleRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupScheduleRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.DeleteBackupScheduleRequest} */ -public final class DeleteBackupScheduleRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteBackupScheduleRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.DeleteBackupScheduleRequest) DeleteBackupScheduleRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteBackupScheduleRequest"); + } + // Use DeleteBackupScheduleRequest.newBuilder() to construct. - private DeleteBackupScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteBackupScheduleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private DeleteBackupScheduleRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteBackupScheduleRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_DeleteBackupScheduleRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_DeleteBackupScheduleRequest_fieldAccessorTable @@ -140,8 +146,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -152,8 +158,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -227,38 +233,38 @@ public static com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest p public static com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -282,7 +288,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -297,7 +303,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.DeleteBackupScheduleRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.DeleteBackupScheduleRequest) com.google.spanner.admin.database.v1.DeleteBackupScheduleRequestOrBuilder { @@ -307,7 +313,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_DeleteBackupScheduleRequest_fieldAccessorTable @@ -319,7 +325,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.DeleteBackupScheduleRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -371,39 +377,6 @@ private void buildPartial0( } } - @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.admin.database.v1.DeleteBackupScheduleRequest) { @@ -606,17 +579,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.DeleteBackupScheduleRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupScheduleRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupScheduleRequestOrBuilder.java index 9ebe50989fc..277431696b7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupScheduleRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DeleteBackupScheduleRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface DeleteBackupScheduleRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.DeleteBackupScheduleRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java index 0a6cde5bb49..eee9562f465 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.DropDatabaseRequest} */ -public final class DropDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DropDatabaseRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.DropDatabaseRequest) DropDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DropDatabaseRequest"); + } + // Use DropDatabaseRequest.newBuilder() to construct. - private DropDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DropDatabaseRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private DropDatabaseRequest() { database_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DropDatabaseRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_DropDatabaseRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_DropDatabaseRequest_fieldAccessorTable @@ -136,8 +142,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } getUnknownFields().writeTo(output); } @@ -148,8 +154,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -223,38 +229,38 @@ public static com.google.spanner.admin.database.v1.DropDatabaseRequest parseFrom public static com.google.spanner.admin.database.v1.DropDatabaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DropDatabaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DropDatabaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DropDatabaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.DropDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.DropDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -278,7 +284,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -293,7 +299,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.DropDatabaseRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.DropDatabaseRequest) com.google.spanner.admin.database.v1.DropDatabaseRequestOrBuilder { @@ -303,7 +309,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_DropDatabaseRequest_fieldAccessorTable @@ -315,7 +321,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.DropDatabaseRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -365,39 +371,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.DropDatabaseRequ } } - @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.admin.database.v1.DropDatabaseRequest) { @@ -588,17 +561,6 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.DropDatabaseRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequestOrBuilder.java index 1f7c3fa55a4..ac33421ba89 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/DropDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface DropDatabaseRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.DropDatabaseRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java index 2d8ee93ffe1..67e2abb32d8 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.EncryptionConfig} */ -public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class EncryptionConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.EncryptionConfig) EncryptionConfigOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EncryptionConfig"); + } + // Use EncryptionConfig.newBuilder() to construct. - private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private EncryptionConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private EncryptionConfig() { kmsKeyNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EncryptionConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.CommonProto .internal_static_google_spanner_admin_database_v1_EncryptionConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.CommonProto .internal_static_google_spanner_admin_database_v1_EncryptionConfig_fieldAccessorTable @@ -260,11 +266,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kmsKeyName_); } for (int i = 0; i < kmsKeyNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kmsKeyNames_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, kmsKeyNames_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -275,8 +281,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kmsKeyName_); } { int dataSize = 0; @@ -363,38 +369,38 @@ public static com.google.spanner.admin.database.v1.EncryptionConfig parseFrom( public static com.google.spanner.admin.database.v1.EncryptionConfig parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.EncryptionConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.EncryptionConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.EncryptionConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.EncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.EncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -418,7 +424,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -432,7 +438,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.EncryptionConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.EncryptionConfig) com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder { @@ -442,7 +448,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.CommonProto .internal_static_google_spanner_admin_database_v1_EncryptionConfig_fieldAccessorTable @@ -454,7 +460,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.EncryptionConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -509,39 +515,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.EncryptionConfig } } - @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.admin.database.v1.EncryptionConfig) { @@ -1058,17 +1031,6 @@ public Builder addKmsKeyNamesBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.EncryptionConfig) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java index 2ddbddc4d1d..7f197529ce7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface EncryptionConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.EncryptionConfig) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java index 71618baa2b1..384fafb9cfd 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.EncryptionInfo} */ -public final class EncryptionInfo extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class EncryptionInfo extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.EncryptionInfo) EncryptionInfoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EncryptionInfo"); + } + // Use EncryptionInfo.newBuilder() to construct. - private EncryptionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private EncryptionInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private EncryptionInfo() { kmsKeyVersion_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new EncryptionInfo(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.CommonProto .internal_static_google_spanner_admin_database_v1_EncryptionInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.CommonProto .internal_static_google_spanner_admin_database_v1_EncryptionInfo_fieldAccessorTable @@ -112,6 +118,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + /** * * @@ -207,7 +223,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.database.v1.EncryptionInfo.getDescriptor() .getEnumTypes() .get(0); @@ -413,8 +429,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kmsKeyVersion_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kmsKeyVersion_); } if (encryptionType_ != com.google.spanner.admin.database.v1.EncryptionInfo.Type.TYPE_UNSPECIFIED.getNumber()) { @@ -432,8 +448,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kmsKeyVersion_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kmsKeyVersion_); } if (encryptionType_ != com.google.spanner.admin.database.v1.EncryptionInfo.Type.TYPE_UNSPECIFIED.getNumber()) { @@ -525,38 +541,38 @@ public static com.google.spanner.admin.database.v1.EncryptionInfo parseFrom( public static com.google.spanner.admin.database.v1.EncryptionInfo parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.EncryptionInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.EncryptionInfo parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.EncryptionInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.EncryptionInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.EncryptionInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -579,7 +595,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -593,7 +609,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.EncryptionInfo} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.EncryptionInfo) com.google.spanner.admin.database.v1.EncryptionInfoOrBuilder { @@ -603,7 +619,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.CommonProto .internal_static_google_spanner_admin_database_v1_EncryptionInfo_fieldAccessorTable @@ -617,14 +633,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncryptionStatusFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncryptionStatusFieldBuilder(); } } @@ -690,39 +706,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.EncryptionInfo r 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.admin.database.v1.EncryptionInfo) { @@ -788,7 +771,7 @@ public Builder mergeFrom( case 34: { input.readMessage( - getEncryptionStatusFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionStatusFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 34 @@ -920,7 +903,7 @@ public Builder clearEncryptionType() { } private com.google.rpc.Status encryptionStatus_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> encryptionStatusBuilder_; @@ -1084,7 +1067,7 @@ public Builder clearEncryptionStatus() { public com.google.rpc.Status.Builder getEncryptionStatusBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getEncryptionStatusFieldBuilder().getBuilder(); + return internalGetEncryptionStatusFieldBuilder().getBuilder(); } /** @@ -1121,12 +1104,12 @@ public com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder() { * .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getEncryptionStatusFieldBuilder() { + internalGetEncryptionStatusFieldBuilder() { if (encryptionStatusBuilder_ == null) { encryptionStatusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( @@ -1262,17 +1245,6 @@ public Builder setKmsKeyVersionBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.EncryptionInfo) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java index 85e664159e4..be33d9db1d8 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/EncryptionInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface EncryptionInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.EncryptionInfo) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/FullBackupSpec.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/FullBackupSpec.java index 0f2b7288b25..4846177aa30 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/FullBackupSpec.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/FullBackupSpec.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -30,32 +31,37 @@ * * Protobuf type {@code google.spanner.admin.database.v1.FullBackupSpec} */ -public final class FullBackupSpec extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class FullBackupSpec extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.FullBackupSpec) FullBackupSpecOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FullBackupSpec"); + } + // Use FullBackupSpec.newBuilder() to construct. - private FullBackupSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FullBackupSpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FullBackupSpec() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FullBackupSpec(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_FullBackupSpec_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_FullBackupSpec_fieldAccessorTable @@ -156,38 +162,38 @@ public static com.google.spanner.admin.database.v1.FullBackupSpec parseFrom( public static com.google.spanner.admin.database.v1.FullBackupSpec parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.FullBackupSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.FullBackupSpec parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.FullBackupSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.FullBackupSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.FullBackupSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -210,7 +216,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -226,7 +232,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.FullBackupSpec} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.FullBackupSpec) com.google.spanner.admin.database.v1.FullBackupSpecOrBuilder { @@ -236,7 +242,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_FullBackupSpec_fieldAccessorTable @@ -248,7 +254,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.FullBackupSpec.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -286,39 +292,6 @@ public com.google.spanner.admin.database.v1.FullBackupSpec buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.admin.database.v1.FullBackupSpec) { @@ -375,17 +348,6 @@ public Builder mergeFrom( 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.admin.database.v1.FullBackupSpec) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/FullBackupSpecOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/FullBackupSpecOrBuilder.java index 870789fc760..bdcd4d1c743 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/FullBackupSpecOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/FullBackupSpecOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface FullBackupSpecOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.FullBackupSpec) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java index e356b59db28..0542dcaa64e 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.GetBackupRequest} */ -public final class GetBackupRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetBackupRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.GetBackupRequest) GetBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetBackupRequest"); + } + // Use GetBackupRequest.newBuilder() to construct. - private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GetBackupRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetBackupRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_GetBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_GetBackupRequest_fieldAccessorTable @@ -140,8 +146,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -152,8 +158,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -227,38 +233,38 @@ public static com.google.spanner.admin.database.v1.GetBackupRequest parseFrom( public static com.google.spanner.admin.database.v1.GetBackupRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetBackupRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetBackupRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetBackupRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetBackupRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetBackupRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -282,7 +288,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -297,7 +303,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.GetBackupRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.GetBackupRequest) com.google.spanner.admin.database.v1.GetBackupRequestOrBuilder { @@ -307,7 +313,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_GetBackupRequest_fieldAccessorTable @@ -319,7 +325,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.GetBackupRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -369,39 +375,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.GetBackupRequest } } - @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.admin.database.v1.GetBackupRequest) { @@ -602,17 +575,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.GetBackupRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequestOrBuilder.java index af6a5338b26..0bc8d59dc0a 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface GetBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.GetBackupRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupScheduleRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupScheduleRequest.java index 67f280d71b0..43130fde2cb 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupScheduleRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupScheduleRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.GetBackupScheduleRequest} */ -public final class GetBackupScheduleRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetBackupScheduleRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.GetBackupScheduleRequest) GetBackupScheduleRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetBackupScheduleRequest"); + } + // Use GetBackupScheduleRequest.newBuilder() to construct. - private GetBackupScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetBackupScheduleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GetBackupScheduleRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetBackupScheduleRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_GetBackupScheduleRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_GetBackupScheduleRequest_fieldAccessorTable @@ -140,8 +146,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -152,8 +158,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -227,38 +233,38 @@ public static com.google.spanner.admin.database.v1.GetBackupScheduleRequest pars public static com.google.spanner.admin.database.v1.GetBackupScheduleRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetBackupScheduleRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetBackupScheduleRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetBackupScheduleRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetBackupScheduleRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetBackupScheduleRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -282,7 +288,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -297,7 +303,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.GetBackupScheduleRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.GetBackupScheduleRequest) com.google.spanner.admin.database.v1.GetBackupScheduleRequestOrBuilder { @@ -307,7 +313,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_GetBackupScheduleRequest_fieldAccessorTable @@ -319,7 +325,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.GetBackupScheduleRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -371,39 +377,6 @@ private void buildPartial0( } } - @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.admin.database.v1.GetBackupScheduleRequest) { @@ -605,17 +578,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.GetBackupScheduleRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupScheduleRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupScheduleRequestOrBuilder.java index c49489806d0..1eaf5055ae4 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupScheduleRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetBackupScheduleRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface GetBackupScheduleRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.GetBackupScheduleRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java index c1c558a7f08..a65174c9b14 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseDdlRequest} */ -public final class GetDatabaseDdlRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetDatabaseDdlRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.GetDatabaseDdlRequest) GetDatabaseDdlRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetDatabaseDdlRequest"); + } + // Use GetDatabaseDdlRequest.newBuilder() to construct. - private GetDatabaseDdlRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetDatabaseDdlRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GetDatabaseDdlRequest() { database_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetDatabaseDdlRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_GetDatabaseDdlRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_GetDatabaseDdlRequest_fieldAccessorTable @@ -140,8 +146,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } getUnknownFields().writeTo(output); } @@ -152,8 +158,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -227,38 +233,38 @@ public static com.google.spanner.admin.database.v1.GetDatabaseDdlRequest parseFr public static com.google.spanner.admin.database.v1.GetDatabaseDdlRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -282,7 +288,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -297,7 +303,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseDdlRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.GetDatabaseDdlRequest) com.google.spanner.admin.database.v1.GetDatabaseDdlRequestOrBuilder { @@ -307,7 +313,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_GetDatabaseDdlRequest_fieldAccessorTable @@ -319,7 +325,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.GetDatabaseDdlRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -369,39 +375,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.GetDatabaseDdlRe } } - @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.admin.database.v1.GetDatabaseDdlRequest) { @@ -602,17 +575,6 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.GetDatabaseDdlRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequestOrBuilder.java index 53162f5c399..6056b044d99 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface GetDatabaseDdlRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.GetDatabaseDdlRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java index b37275fed55..9215a815e3c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseDdlResponse} */ -public final class GetDatabaseDdlResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetDatabaseDdlResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.GetDatabaseDdlResponse) GetDatabaseDdlResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetDatabaseDdlResponse"); + } + // Use GetDatabaseDdlResponse.newBuilder() to construct. - private GetDatabaseDdlResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetDatabaseDdlResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private GetDatabaseDdlResponse() { protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetDatabaseDdlResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_GetDatabaseDdlResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_GetDatabaseDdlResponse_fieldAccessorTable @@ -176,7 +182,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < statements_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, statements_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, statements_.getRaw(i)); } if (!protoDescriptors_.isEmpty()) { output.writeBytes(2, protoDescriptors_); @@ -278,38 +284,38 @@ public static com.google.spanner.admin.database.v1.GetDatabaseDdlResponse parseF public static com.google.spanner.admin.database.v1.GetDatabaseDdlResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetDatabaseDdlResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -333,7 +339,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -348,7 +354,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseDdlResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.GetDatabaseDdlResponse) com.google.spanner.admin.database.v1.GetDatabaseDdlResponseOrBuilder { @@ -358,7 +364,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_GetDatabaseDdlResponse_fieldAccessorTable @@ -370,7 +376,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.GetDatabaseDdlResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -425,39 +431,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.GetDatabaseDdlRe } } - @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.admin.database.v1.GetDatabaseDdlResponse) { @@ -481,7 +454,7 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.GetDatabaseDdlResp } onChanged(); } - if (other.getProtoDescriptors() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getProtoDescriptors().isEmpty()) { setProtoDescriptors(other.getProtoDescriptors()); } this.mergeUnknownFields(other.getUnknownFields()); @@ -804,17 +777,6 @@ public Builder clearProtoDescriptors() { 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.admin.database.v1.GetDatabaseDdlResponse) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponseOrBuilder.java index 59db4c110c8..8404df27654 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseDdlResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface GetDatabaseDdlResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.GetDatabaseDdlResponse) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java index edd2c2687b1..66ba99f8662 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseRequest} */ -public final class GetDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetDatabaseRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.GetDatabaseRequest) GetDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetDatabaseRequest"); + } + // Use GetDatabaseRequest.newBuilder() to construct. - private GetDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetDatabaseRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GetDatabaseRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetDatabaseRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_fieldAccessorTable @@ -138,8 +144,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -150,8 +156,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -225,38 +231,38 @@ public static com.google.spanner.admin.database.v1.GetDatabaseRequest parseFrom( public static com.google.spanner.admin.database.v1.GetDatabaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetDatabaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetDatabaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetDatabaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.GetDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.GetDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -280,7 +286,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -295,7 +301,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.GetDatabaseRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.GetDatabaseRequest) com.google.spanner.admin.database.v1.GetDatabaseRequestOrBuilder { @@ -305,7 +311,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_fieldAccessorTable @@ -317,7 +323,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.GetDatabaseRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -367,39 +373,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.GetDatabaseReque } } - @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.admin.database.v1.GetDatabaseRequest) { @@ -595,17 +568,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.GetDatabaseRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequestOrBuilder.java index 336357afee9..75afb8431e3 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/GetDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface GetDatabaseRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.GetDatabaseRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpec.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpec.java index 826710a30c4..159e18a5b71 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpec.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpec.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -33,32 +34,37 @@ * * Protobuf type {@code google.spanner.admin.database.v1.IncrementalBackupSpec} */ -public final class IncrementalBackupSpec extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class IncrementalBackupSpec extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.IncrementalBackupSpec) IncrementalBackupSpecOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IncrementalBackupSpec"); + } + // Use IncrementalBackupSpec.newBuilder() to construct. - private IncrementalBackupSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private IncrementalBackupSpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private IncrementalBackupSpec() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new IncrementalBackupSpec(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_fieldAccessorTable @@ -159,38 +165,38 @@ public static com.google.spanner.admin.database.v1.IncrementalBackupSpec parseFr public static com.google.spanner.admin.database.v1.IncrementalBackupSpec parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.IncrementalBackupSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.IncrementalBackupSpec parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.IncrementalBackupSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.IncrementalBackupSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.IncrementalBackupSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -214,7 +220,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -233,7 +239,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.IncrementalBackupSpec} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.IncrementalBackupSpec) com.google.spanner.admin.database.v1.IncrementalBackupSpecOrBuilder { @@ -243,7 +249,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_IncrementalBackupSpec_fieldAccessorTable @@ -255,7 +261,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.IncrementalBackupSpec.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -293,39 +299,6 @@ public com.google.spanner.admin.database.v1.IncrementalBackupSpec buildPartial() return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.admin.database.v1.IncrementalBackupSpec) { @@ -382,17 +355,6 @@ public Builder mergeFrom( 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.admin.database.v1.IncrementalBackupSpec) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpecOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpecOrBuilder.java index b7b5f7d97ff..46ed7d32797 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpecOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/IncrementalBackupSpecOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface IncrementalBackupSpecOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.IncrementalBackupSpec) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java index c964f4cc581..0c1510da67d 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InstanceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationRequest.java index a16bdbbfbf4..bafd0df94a6 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,16 +29,26 @@ * * Protobuf type {@code google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest} */ -public final class InternalUpdateGraphOperationRequest - extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class InternalUpdateGraphOperationRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest) InternalUpdateGraphOperationRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InternalUpdateGraphOperationRequest"); + } + // Use InternalUpdateGraphOperationRequest.newBuilder() to construct. private InternalUpdateGraphOperationRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +58,13 @@ private InternalUpdateGraphOperationRequest() { vmIdentityToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new InternalUpdateGraphOperationRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationRequest_fieldAccessorTable @@ -314,17 +319,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, operationId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, operationId_); } if (java.lang.Double.doubleToRawLongBits(progress_) != 0) { output.writeDouble(3, progress_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmIdentityToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, vmIdentityToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vmIdentityToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, vmIdentityToken_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getStatus()); @@ -338,17 +343,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, operationId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operationId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, operationId_); } if (java.lang.Double.doubleToRawLongBits(progress_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, progress_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vmIdentityToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, vmIdentityToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vmIdentityToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, vmIdentityToken_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStatus()); @@ -447,39 +452,39 @@ public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationR public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -503,7 +508,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -517,7 +522,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest) com.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequestOrBuilder { @@ -527,7 +532,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationRequest_fieldAccessorTable @@ -543,14 +548,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStatusFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStatusFieldBuilder(); } } @@ -627,39 +632,6 @@ private void buildPartial0( 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 @@ -692,7 +664,7 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; onChanged(); } - if (other.getProgress() != 0D) { + if (java.lang.Double.doubleToRawLongBits(other.getProgress()) != 0) { setProgress(other.getProgress()); } if (other.hasStatus()) { @@ -750,7 +722,7 @@ public Builder mergeFrom( } // case 42 case 50: { - input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetStatusFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 50 @@ -1173,7 +1145,7 @@ public Builder clearProgress() { } private com.google.rpc.Status status_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; @@ -1314,7 +1286,7 @@ public Builder clearStatus() { public com.google.rpc.Status.Builder getStatusBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getStatusFieldBuilder().getBuilder(); + return internalGetStatusFieldBuilder().getBuilder(); } /** @@ -1343,12 +1315,12 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { * * .google.rpc.Status status = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusFieldBuilder() { + internalGetStatusFieldBuilder() { if (statusBuilder_ == null) { statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); @@ -1357,17 +1329,6 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { return statusBuilder_; } - @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.admin.database.v1.InternalUpdateGraphOperationRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationRequestOrBuilder.java index babdcdfc074..025fc44530e 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface InternalUpdateGraphOperationRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationResponse.java index 50020565303..e4c6f7589c1 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,34 +29,38 @@ * * Protobuf type {@code google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse} */ -public final class InternalUpdateGraphOperationResponse - extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class InternalUpdateGraphOperationResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse) InternalUpdateGraphOperationResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InternalUpdateGraphOperationResponse"); + } + // Use InternalUpdateGraphOperationResponse.newBuilder() to construct. private InternalUpdateGraphOperationResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private InternalUpdateGraphOperationResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new InternalUpdateGraphOperationResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationResponse_fieldAccessorTable @@ -158,39 +163,39 @@ public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationR public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -214,7 +219,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -228,7 +233,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse) com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponseOrBuilder { @@ -238,7 +243,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationResponse_fieldAccessorTable @@ -252,7 +257,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -294,39 +299,6 @@ public com.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other @@ -387,17 +359,6 @@ public Builder mergeFrom( 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.admin.database.v1.InternalUpdateGraphOperationResponse) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationResponseOrBuilder.java index 7f5e74fca40..17538af31a4 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/InternalUpdateGraphOperationResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface InternalUpdateGraphOperationResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java index 80bd3355ee2..2371ce6326f 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupOperationsRequest} */ -public final class ListBackupOperationsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListBackupOperationsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListBackupOperationsRequest) ListBackupOperationsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListBackupOperationsRequest"); + } + // Use ListBackupOperationsRequest.newBuilder() to construct. - private ListBackupOperationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListBackupOperationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private ListBackupOperationsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupOperationsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_fieldAccessorTable @@ -146,19 +152,19 @@ public com.google.protobuf.ByteString getParentBytes() { * The following fields in the [operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -166,45 +172,45 @@ public com.google.protobuf.ByteString getParentBytes() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The source database name of backup contains the string "prod". - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.name:howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The backup name contains the string "howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - * `(metadata.source_backup:test) AND` \ - * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - * * The source backup name contains the string "test". - * * The operation started before 2022-01-18T14:50:00Z. - * * The operation resulted in an error. - * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.database:test_db)) OR` \ - * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - * AND` \ - * `(metadata.source_backup:test_bkp)) AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata matches either of criteria: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * AND the source database name of the backup contains the string - * "test_db" - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] - * AND the source backup name contains the string "test_bkp" - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The source database name of backup contains the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.name:howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The backup name contains the string "howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup name contains the string "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * AND the source database name of the backup contains the string + * "test_db" + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + * AND the source backup name contains the string "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -239,19 +245,19 @@ public java.lang.String getFilter() { * The following fields in the [operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -259,45 +265,45 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The source database name of backup contains the string "prod". - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.name:howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The backup name contains the string "howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - * `(metadata.source_backup:test) AND` \ - * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - * * The source backup name contains the string "test". - * * The operation started before 2022-01-18T14:50:00Z. - * * The operation resulted in an error. - * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.database:test_db)) OR` \ - * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - * AND` \ - * `(metadata.source_backup:test_bkp)) AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata matches either of criteria: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * AND the source database name of the backup contains the string - * "test_db" - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] - * AND the source backup name contains the string "test_bkp" - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The source database name of backup contains the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.name:howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The backup name contains the string "howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup name contains the string "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * AND the source database name of the backup contains the string + * "test_db" + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + * AND the source backup name contains the string "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -412,17 +418,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); } if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -433,17 +439,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); } 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -526,38 +532,38 @@ public static com.google.spanner.admin.database.v1.ListBackupOperationsRequest p public static com.google.spanner.admin.database.v1.ListBackupOperationsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupOperationsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupOperationsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupOperationsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupOperationsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupOperationsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -581,7 +587,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -596,7 +602,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupOperationsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListBackupOperationsRequest) com.google.spanner.admin.database.v1.ListBackupOperationsRequestOrBuilder { @@ -606,7 +612,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupOperationsRequest_fieldAccessorTable @@ -618,7 +624,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.ListBackupOperationsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -682,39 +688,6 @@ private void buildPartial0( } } - @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.admin.database.v1.ListBackupOperationsRequest) { @@ -960,19 +933,19 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * The following fields in the [operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -980,45 +953,45 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The source database name of backup contains the string "prod". - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.name:howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The backup name contains the string "howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - * `(metadata.source_backup:test) AND` \ - * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - * * The source backup name contains the string "test". - * * The operation started before 2022-01-18T14:50:00Z. - * * The operation resulted in an error. - * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.database:test_db)) OR` \ - * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - * AND` \ - * `(metadata.source_backup:test_bkp)) AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata matches either of criteria: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * AND the source database name of the backup contains the string - * "test_db" - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] - * AND the source backup name contains the string "test_bkp" - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The source database name of backup contains the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.name:howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The backup name contains the string "howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup name contains the string "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * AND the source database name of the backup contains the string + * "test_db" + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + * AND the source backup name contains the string "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -1052,19 +1025,19 @@ public java.lang.String getFilter() { * The following fields in the [operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -1072,45 +1045,45 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The source database name of backup contains the string "prod". - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.name:howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The backup name contains the string "howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - * `(metadata.source_backup:test) AND` \ - * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - * * The source backup name contains the string "test". - * * The operation started before 2022-01-18T14:50:00Z. - * * The operation resulted in an error. - * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.database:test_db)) OR` \ - * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - * AND` \ - * `(metadata.source_backup:test_bkp)) AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata matches either of criteria: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * AND the source database name of the backup contains the string - * "test_db" - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] - * AND the source backup name contains the string "test_bkp" - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The source database name of backup contains the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.name:howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The backup name contains the string "howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup name contains the string "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * AND the source database name of the backup contains the string + * "test_db" + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + * AND the source backup name contains the string "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -1144,19 +1117,19 @@ public com.google.protobuf.ByteString getFilterBytes() { * The following fields in the [operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -1164,45 +1137,45 @@ public com.google.protobuf.ByteString getFilterBytes() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The source database name of backup contains the string "prod". - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.name:howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The backup name contains the string "howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - * `(metadata.source_backup:test) AND` \ - * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - * * The source backup name contains the string "test". - * * The operation started before 2022-01-18T14:50:00Z. - * * The operation resulted in an error. - * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.database:test_db)) OR` \ - * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - * AND` \ - * `(metadata.source_backup:test_bkp)) AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata matches either of criteria: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * AND the source database name of the backup contains the string - * "test_db" - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] - * AND the source backup name contains the string "test_bkp" - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The source database name of backup contains the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.name:howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The backup name contains the string "howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup name contains the string "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * AND the source database name of the backup contains the string + * "test_db" + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + * AND the source backup name contains the string "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -1235,19 +1208,19 @@ public Builder setFilter(java.lang.String value) { * The following fields in the [operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -1255,45 +1228,45 @@ public Builder setFilter(java.lang.String value) { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The source database name of backup contains the string "prod". - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.name:howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The backup name contains the string "howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - * `(metadata.source_backup:test) AND` \ - * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - * * The source backup name contains the string "test". - * * The operation started before 2022-01-18T14:50:00Z. - * * The operation resulted in an error. - * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.database:test_db)) OR` \ - * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - * AND` \ - * `(metadata.source_backup:test_bkp)) AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata matches either of criteria: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * AND the source database name of the backup contains the string - * "test_db" - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] - * AND the source backup name contains the string "test_bkp" - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The source database name of backup contains the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.name:howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The backup name contains the string "howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup name contains the string "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * AND the source database name of the backup contains the string + * "test_db" + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + * AND the source backup name contains the string "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -1322,19 +1295,19 @@ public Builder clearFilter() { * The following fields in the [operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -1342,45 +1315,45 @@ public Builder clearFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The source database name of backup contains the string "prod". - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.name:howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The backup name contains the string "howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - * `(metadata.source_backup:test) AND` \ - * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - * * The source backup name contains the string "test". - * * The operation started before 2022-01-18T14:50:00Z. - * * The operation resulted in an error. - * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.database:test_db)) OR` \ - * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - * AND` \ - * `(metadata.source_backup:test_bkp)) AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata matches either of criteria: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * AND the source database name of the backup contains the string - * "test_db" - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] - * AND the source backup name contains the string "test_bkp" - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The source database name of backup contains the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.name:howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The backup name contains the string "howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup name contains the string "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * AND the source database name of the backup contains the string + * "test_db" + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + * AND the source backup name contains the string "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -1589,17 +1562,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListBackupOperationsRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java index 74680ec26fe..8d952b07ec4 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListBackupOperationsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListBackupOperationsRequest) @@ -71,19 +73,19 @@ public interface ListBackupOperationsRequestOrBuilder * The following fields in the [operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -91,45 +93,45 @@ public interface ListBackupOperationsRequestOrBuilder * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The source database name of backup contains the string "prod". - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.name:howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The backup name contains the string "howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - * `(metadata.source_backup:test) AND` \ - * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - * * The source backup name contains the string "test". - * * The operation started before 2022-01-18T14:50:00Z. - * * The operation resulted in an error. - * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.database:test_db)) OR` \ - * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - * AND` \ - * `(metadata.source_backup:test_bkp)) AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata matches either of criteria: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * AND the source database name of the backup contains the string - * "test_db" - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] - * AND the source backup name contains the string "test_bkp" - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The source database name of backup contains the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.name:howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The backup name contains the string "howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup name contains the string "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * AND the source database name of the backup contains the string + * "test_db" + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + * AND the source backup name contains the string "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; @@ -153,19 +155,19 @@ public interface ListBackupOperationsRequestOrBuilder * The following fields in the [operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -173,45 +175,45 @@ public interface ListBackupOperationsRequestOrBuilder * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `metadata.database:prod` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The source database name of backup contains the string "prod". - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.name:howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - * * The backup name contains the string "howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - * `(metadata.source_backup:test) AND` \ - * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - * * The source backup name contains the string "test". - * * The operation started before 2022-01-18T14:50:00Z. - * * The operation resulted in an error. - * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - * `(metadata.database:test_db)) OR` \ - * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - * AND` \ - * `(metadata.source_backup:test_bkp)) AND` \ - * `(error:*)` - Returns operations where: - * * The operation's metadata matches either of criteria: - * * The operation's metadata type is - * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] - * AND the source database name of the backup contains the string - * "test_db" - * * The operation's metadata type is - * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] - * AND the source backup name contains the string "test_bkp" - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `metadata.database:prod` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The source database name of backup contains the string "prod". + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.name:howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + * * The backup name contains the string "howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + * `(metadata.source_backup:test) AND` \ + * `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + * * The source backup name contains the string "test". + * * The operation started before 2022-01-18T14:50:00Z. + * * The operation resulted in an error. + * * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + * `(metadata.database:test_db)) OR` \ + * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + * AND` \ + * `(metadata.source_backup:test_bkp)) AND` \ + * `(error:*)` - Returns operations where: + * * The operation's metadata matches either of criteria: + * * The operation's metadata type is + * [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] + * AND the source database name of the backup contains the string + * "test_db" + * * The operation's metadata type is + * [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata] + * AND the source backup name contains the string "test_bkp" + * * The operation resulted in an error. * * * string filter = 2; diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java index 4bfb120108a..78cb6b16347 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupOperationsResponse} */ -public final class ListBackupOperationsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListBackupOperationsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListBackupOperationsResponse) ListBackupOperationsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListBackupOperationsResponse"); + } + // Use ListBackupOperationsResponse.newBuilder() to construct. - private ListBackupOperationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListBackupOperationsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListBackupOperationsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupOperationsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_fieldAccessorTable @@ -256,8 +262,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < operations_.size(); i++) { output.writeMessage(1, operations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -271,8 +277,8 @@ public int getSerializedSize() { for (int i = 0; i < operations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, operations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -351,39 +357,39 @@ public static com.google.spanner.admin.database.v1.ListBackupOperationsResponse public static com.google.spanner.admin.database.v1.ListBackupOperationsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupOperationsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupOperationsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupOperationsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupOperationsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupOperationsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -407,7 +413,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -422,7 +428,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupOperationsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListBackupOperationsResponse) com.google.spanner.admin.database.v1.ListBackupOperationsResponseOrBuilder { @@ -432,7 +438,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupOperationsResponse_fieldAccessorTable @@ -445,7 +451,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.database.v1.ListBackupOperationsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -518,39 +524,6 @@ private void buildPartial0( } } - @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.admin.database.v1.ListBackupOperationsResponse) { @@ -585,8 +558,8 @@ public Builder mergeFrom( operations_ = other.operations_; bitField0_ = (bitField0_ & ~0x00000001); operationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getOperationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetOperationsFieldBuilder() : null; } else { operationsBuilder_.addAllMessages(other.operations_); @@ -671,7 +644,7 @@ private void ensureOperationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> @@ -1034,7 +1007,7 @@ public Builder removeOperations(int index) { * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder getOperationsBuilder(int index) { - return getOperationsFieldBuilder().getBuilder(index); + return internalGetOperationsFieldBuilder().getBuilder(index); } /** @@ -1106,7 +1079,7 @@ public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int inde * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder addOperationsBuilder() { - return getOperationsFieldBuilder() + return internalGetOperationsFieldBuilder() .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); } @@ -1128,7 +1101,7 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder() { * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) { - return getOperationsFieldBuilder() + return internalGetOperationsFieldBuilder() .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); } @@ -1150,17 +1123,17 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) * repeated .google.longrunning.Operation operations = 1; */ public java.util.List getOperationsBuilderList() { - return getOperationsFieldBuilder().getBuilderList(); + return internalGetOperationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> - getOperationsFieldBuilder() { + internalGetOperationsFieldBuilder() { if (operationsBuilder_ == null) { operationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( @@ -1291,17 +1264,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListBackupOperationsResponse) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java index 2c9f37a6d98..6bc4c85b6f8 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupOperationsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListBackupOperationsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListBackupOperationsResponse) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesRequest.java index 2e653f536aa..a142c9ba925 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupSchedulesRequest} */ -public final class ListBackupSchedulesRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListBackupSchedulesRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListBackupSchedulesRequest) ListBackupSchedulesRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListBackupSchedulesRequest"); + } + // Use ListBackupSchedulesRequest.newBuilder() to construct. - private ListBackupSchedulesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListBackupSchedulesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListBackupSchedulesRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupSchedulesRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_ListBackupSchedulesRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_ListBackupSchedulesRequest_fieldAccessorTable @@ -222,14 +228,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -240,14 +246,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -327,38 +333,38 @@ public static com.google.spanner.admin.database.v1.ListBackupSchedulesRequest pa public static com.google.spanner.admin.database.v1.ListBackupSchedulesRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -382,7 +388,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -397,7 +403,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupSchedulesRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListBackupSchedulesRequest) com.google.spanner.admin.database.v1.ListBackupSchedulesRequestOrBuilder { @@ -407,7 +413,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_ListBackupSchedulesRequest_fieldAccessorTable @@ -419,7 +425,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.ListBackupSchedulesRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -479,39 +485,6 @@ private void buildPartial0( } } - @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.admin.database.v1.ListBackupSchedulesRequest) { @@ -924,17 +897,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListBackupSchedulesRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesRequestOrBuilder.java index d724d484b8a..87cd5b69bce 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListBackupSchedulesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListBackupSchedulesRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesResponse.java index 411f9326d81..8f7675d63b6 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupSchedulesResponse} */ -public final class ListBackupSchedulesResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListBackupSchedulesResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListBackupSchedulesResponse) ListBackupSchedulesResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListBackupSchedulesResponse"); + } + // Use ListBackupSchedulesResponse.newBuilder() to construct. - private ListBackupSchedulesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListBackupSchedulesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListBackupSchedulesResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupSchedulesResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_ListBackupSchedulesResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_ListBackupSchedulesResponse_fieldAccessorTable @@ -218,8 +224,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < backupSchedules_.size(); i++) { output.writeMessage(1, backupSchedules_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -233,8 +239,8 @@ public int getSerializedSize() { for (int i = 0; i < backupSchedules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, backupSchedules_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -313,38 +319,38 @@ public static com.google.spanner.admin.database.v1.ListBackupSchedulesResponse p public static com.google.spanner.admin.database.v1.ListBackupSchedulesResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupSchedulesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -368,7 +374,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -383,7 +389,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupSchedulesResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListBackupSchedulesResponse) com.google.spanner.admin.database.v1.ListBackupSchedulesResponseOrBuilder { @@ -393,7 +399,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_ListBackupSchedulesResponse_fieldAccessorTable @@ -405,7 +411,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.ListBackupSchedulesResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -478,39 +484,6 @@ private void buildPartial0( } } - @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.admin.database.v1.ListBackupSchedulesResponse) { @@ -545,8 +518,8 @@ public Builder mergeFrom( backupSchedules_ = other.backupSchedules_; bitField0_ = (bitField0_ & ~0x00000001); backupSchedulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBackupSchedulesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupSchedulesFieldBuilder() : null; } else { backupSchedulesBuilder_.addAllMessages(other.backupSchedules_); @@ -635,7 +608,7 @@ private void ensureBackupSchedulesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.BackupSchedule, com.google.spanner.admin.database.v1.BackupSchedule.Builder, com.google.spanner.admin.database.v1.BackupScheduleOrBuilder> @@ -899,7 +872,7 @@ public Builder removeBackupSchedules(int index) { */ public com.google.spanner.admin.database.v1.BackupSchedule.Builder getBackupSchedulesBuilder( int index) { - return getBackupSchedulesFieldBuilder().getBuilder(index); + return internalGetBackupSchedulesFieldBuilder().getBuilder(index); } /** @@ -948,7 +921,7 @@ public com.google.spanner.admin.database.v1.BackupScheduleOrBuilder getBackupSch * repeated .google.spanner.admin.database.v1.BackupSchedule backup_schedules = 1; */ public com.google.spanner.admin.database.v1.BackupSchedule.Builder addBackupSchedulesBuilder() { - return getBackupSchedulesFieldBuilder() + return internalGetBackupSchedulesFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.BackupSchedule.getDefaultInstance()); } @@ -963,7 +936,7 @@ public com.google.spanner.admin.database.v1.BackupSchedule.Builder addBackupSche */ public com.google.spanner.admin.database.v1.BackupSchedule.Builder addBackupSchedulesBuilder( int index) { - return getBackupSchedulesFieldBuilder() + return internalGetBackupSchedulesFieldBuilder() .addBuilder( index, com.google.spanner.admin.database.v1.BackupSchedule.getDefaultInstance()); } @@ -979,17 +952,17 @@ public com.google.spanner.admin.database.v1.BackupSchedule.Builder addBackupSche */ public java.util.List getBackupSchedulesBuilderList() { - return getBackupSchedulesFieldBuilder().getBuilderList(); + return internalGetBackupSchedulesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.BackupSchedule, com.google.spanner.admin.database.v1.BackupSchedule.Builder, com.google.spanner.admin.database.v1.BackupScheduleOrBuilder> - getBackupSchedulesFieldBuilder() { + internalGetBackupSchedulesFieldBuilder() { if (backupSchedulesBuilder_ == null) { backupSchedulesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.BackupSchedule, com.google.spanner.admin.database.v1.BackupSchedule.Builder, com.google.spanner.admin.database.v1.BackupScheduleOrBuilder>( @@ -1123,17 +1096,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListBackupSchedulesResponse) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesResponseOrBuilder.java index 2cd03274c81..dbf7578a161 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupSchedulesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListBackupSchedulesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListBackupSchedulesResponse) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java index 9caa3c1d0bd..127d17c86e8 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupsRequest} */ -public final class ListBackupsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListBackupsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListBackupsRequest) ListBackupsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListBackupsRequest"); + } + // Use ListBackupsRequest.newBuilder() to construct. - private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListBackupsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private ListBackupsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupsRequest_fieldAccessorTable @@ -147,14 +153,14 @@ public com.google.protobuf.ByteString getParentBytes() { * [Backup][google.spanner.admin.database.v1.Backup] are eligible for * filtering: * - * * `name` - * * `database` - * * `state` - * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * * `backup_schedules` + * * `name` + * * `database` + * * `state` + * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * * `backup_schedules` * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -162,19 +168,19 @@ public com.google.protobuf.ByteString getParentBytes() { * * Here are a few examples: * - * * `name:Howl` - The backup's name contains the string "howl". - * * `database:prod` - * - The database's name contains the string "prod". - * * `state:CREATING` - The backup is pending creation. - * * `state:READY` - The backup is fully created and ready for use. - * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - * - The backup name contains the string "howl" and `create_time` - * of the backup is before 2018-03-28T14:50:00Z. - * * `expire_time < \"2018-03-28T14:50:00Z\"` - * - The backup `expire_time` is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` - The backup's size is greater than 10GB - * * `backup_schedules:daily` - * - The backup is created from a schedule with "daily" in its name. + * * `name:Howl` - The backup's name contains the string "howl". + * * `database:prod` + * - The database's name contains the string "prod". + * * `state:CREATING` - The backup is pending creation. + * * `state:READY` - The backup is fully created and ready for use. + * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + * - The backup name contains the string "howl" and `create_time` + * of the backup is before 2018-03-28T14:50:00Z. + * * `expire_time < \"2018-03-28T14:50:00Z\"` + * - The backup `expire_time` is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` - The backup's size is greater than 10GB + * * `backup_schedules:daily` + * - The backup is created from a schedule with "daily" in its name. * * * string filter = 2; @@ -210,14 +216,14 @@ public java.lang.String getFilter() { * [Backup][google.spanner.admin.database.v1.Backup] are eligible for * filtering: * - * * `name` - * * `database` - * * `state` - * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * * `backup_schedules` + * * `name` + * * `database` + * * `state` + * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * * `backup_schedules` * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -225,19 +231,19 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `name:Howl` - The backup's name contains the string "howl". - * * `database:prod` - * - The database's name contains the string "prod". - * * `state:CREATING` - The backup is pending creation. - * * `state:READY` - The backup is fully created and ready for use. - * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - * - The backup name contains the string "howl" and `create_time` - * of the backup is before 2018-03-28T14:50:00Z. - * * `expire_time < \"2018-03-28T14:50:00Z\"` - * - The backup `expire_time` is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` - The backup's size is greater than 10GB - * * `backup_schedules:daily` - * - The backup is created from a schedule with "daily" in its name. + * * `name:Howl` - The backup's name contains the string "howl". + * * `database:prod` + * - The database's name contains the string "prod". + * * `state:CREATING` - The backup is pending creation. + * * `state:READY` - The backup is fully created and ready for use. + * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + * - The backup name contains the string "howl" and `create_time` + * of the backup is before 2018-03-28T14:50:00Z. + * * `expire_time < \"2018-03-28T14:50:00Z\"` + * - The backup `expire_time` is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` - The backup's size is greater than 10GB + * * `backup_schedules:daily` + * - The backup is created from a schedule with "daily" in its name. * * * string filter = 2; @@ -352,17 +358,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); } if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -373,17 +379,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); } 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -466,38 +472,38 @@ public static com.google.spanner.admin.database.v1.ListBackupsRequest parseFrom( public static com.google.spanner.admin.database.v1.ListBackupsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -521,7 +527,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -536,7 +542,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListBackupsRequest) com.google.spanner.admin.database.v1.ListBackupsRequestOrBuilder { @@ -546,7 +552,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupsRequest_fieldAccessorTable @@ -558,7 +564,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.ListBackupsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -620,39 +626,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.ListBackupsReque } } - @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.admin.database.v1.ListBackupsRequest) { @@ -897,14 +870,14 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * [Backup][google.spanner.admin.database.v1.Backup] are eligible for * filtering: * - * * `name` - * * `database` - * * `state` - * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * * `backup_schedules` + * * `name` + * * `database` + * * `state` + * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * * `backup_schedules` * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -912,19 +885,19 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * Here are a few examples: * - * * `name:Howl` - The backup's name contains the string "howl". - * * `database:prod` - * - The database's name contains the string "prod". - * * `state:CREATING` - The backup is pending creation. - * * `state:READY` - The backup is fully created and ready for use. - * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - * - The backup name contains the string "howl" and `create_time` - * of the backup is before 2018-03-28T14:50:00Z. - * * `expire_time < \"2018-03-28T14:50:00Z\"` - * - The backup `expire_time` is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` - The backup's size is greater than 10GB - * * `backup_schedules:daily` - * - The backup is created from a schedule with "daily" in its name. + * * `name:Howl` - The backup's name contains the string "howl". + * * `database:prod` + * - The database's name contains the string "prod". + * * `state:CREATING` - The backup is pending creation. + * * `state:READY` - The backup is fully created and ready for use. + * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + * - The backup name contains the string "howl" and `create_time` + * of the backup is before 2018-03-28T14:50:00Z. + * * `expire_time < \"2018-03-28T14:50:00Z\"` + * - The backup `expire_time` is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` - The backup's size is greater than 10GB + * * `backup_schedules:daily` + * - The backup is created from a schedule with "daily" in its name. * * * string filter = 2; @@ -959,14 +932,14 @@ public java.lang.String getFilter() { * [Backup][google.spanner.admin.database.v1.Backup] are eligible for * filtering: * - * * `name` - * * `database` - * * `state` - * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * * `backup_schedules` + * * `name` + * * `database` + * * `state` + * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * * `backup_schedules` * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -974,19 +947,19 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `name:Howl` - The backup's name contains the string "howl". - * * `database:prod` - * - The database's name contains the string "prod". - * * `state:CREATING` - The backup is pending creation. - * * `state:READY` - The backup is fully created and ready for use. - * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - * - The backup name contains the string "howl" and `create_time` - * of the backup is before 2018-03-28T14:50:00Z. - * * `expire_time < \"2018-03-28T14:50:00Z\"` - * - The backup `expire_time` is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` - The backup's size is greater than 10GB - * * `backup_schedules:daily` - * - The backup is created from a schedule with "daily" in its name. + * * `name:Howl` - The backup's name contains the string "howl". + * * `database:prod` + * - The database's name contains the string "prod". + * * `state:CREATING` - The backup is pending creation. + * * `state:READY` - The backup is fully created and ready for use. + * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + * - The backup name contains the string "howl" and `create_time` + * of the backup is before 2018-03-28T14:50:00Z. + * * `expire_time < \"2018-03-28T14:50:00Z\"` + * - The backup `expire_time` is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` - The backup's size is greater than 10GB + * * `backup_schedules:daily` + * - The backup is created from a schedule with "daily" in its name. * * * string filter = 2; @@ -1021,14 +994,14 @@ public com.google.protobuf.ByteString getFilterBytes() { * [Backup][google.spanner.admin.database.v1.Backup] are eligible for * filtering: * - * * `name` - * * `database` - * * `state` - * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * * `backup_schedules` + * * `name` + * * `database` + * * `state` + * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * * `backup_schedules` * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -1036,19 +1009,19 @@ public com.google.protobuf.ByteString getFilterBytes() { * * Here are a few examples: * - * * `name:Howl` - The backup's name contains the string "howl". - * * `database:prod` - * - The database's name contains the string "prod". - * * `state:CREATING` - The backup is pending creation. - * * `state:READY` - The backup is fully created and ready for use. - * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - * - The backup name contains the string "howl" and `create_time` - * of the backup is before 2018-03-28T14:50:00Z. - * * `expire_time < \"2018-03-28T14:50:00Z\"` - * - The backup `expire_time` is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` - The backup's size is greater than 10GB - * * `backup_schedules:daily` - * - The backup is created from a schedule with "daily" in its name. + * * `name:Howl` - The backup's name contains the string "howl". + * * `database:prod` + * - The database's name contains the string "prod". + * * `state:CREATING` - The backup is pending creation. + * * `state:READY` - The backup is fully created and ready for use. + * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + * - The backup name contains the string "howl" and `create_time` + * of the backup is before 2018-03-28T14:50:00Z. + * * `expire_time < \"2018-03-28T14:50:00Z\"` + * - The backup `expire_time` is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` - The backup's size is greater than 10GB + * * `backup_schedules:daily` + * - The backup is created from a schedule with "daily" in its name. * * * string filter = 2; @@ -1082,14 +1055,14 @@ public Builder setFilter(java.lang.String value) { * [Backup][google.spanner.admin.database.v1.Backup] are eligible for * filtering: * - * * `name` - * * `database` - * * `state` - * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * * `backup_schedules` + * * `name` + * * `database` + * * `state` + * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * * `backup_schedules` * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -1097,19 +1070,19 @@ public Builder setFilter(java.lang.String value) { * * Here are a few examples: * - * * `name:Howl` - The backup's name contains the string "howl". - * * `database:prod` - * - The database's name contains the string "prod". - * * `state:CREATING` - The backup is pending creation. - * * `state:READY` - The backup is fully created and ready for use. - * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - * - The backup name contains the string "howl" and `create_time` - * of the backup is before 2018-03-28T14:50:00Z. - * * `expire_time < \"2018-03-28T14:50:00Z\"` - * - The backup `expire_time` is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` - The backup's size is greater than 10GB - * * `backup_schedules:daily` - * - The backup is created from a schedule with "daily" in its name. + * * `name:Howl` - The backup's name contains the string "howl". + * * `database:prod` + * - The database's name contains the string "prod". + * * `state:CREATING` - The backup is pending creation. + * * `state:READY` - The backup is fully created and ready for use. + * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + * - The backup name contains the string "howl" and `create_time` + * of the backup is before 2018-03-28T14:50:00Z. + * * `expire_time < \"2018-03-28T14:50:00Z\"` + * - The backup `expire_time` is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` - The backup's size is greater than 10GB + * * `backup_schedules:daily` + * - The backup is created from a schedule with "daily" in its name. * * * string filter = 2; @@ -1139,14 +1112,14 @@ public Builder clearFilter() { * [Backup][google.spanner.admin.database.v1.Backup] are eligible for * filtering: * - * * `name` - * * `database` - * * `state` - * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * * `backup_schedules` + * * `name` + * * `database` + * * `state` + * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * * `backup_schedules` * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -1154,19 +1127,19 @@ public Builder clearFilter() { * * Here are a few examples: * - * * `name:Howl` - The backup's name contains the string "howl". - * * `database:prod` - * - The database's name contains the string "prod". - * * `state:CREATING` - The backup is pending creation. - * * `state:READY` - The backup is fully created and ready for use. - * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - * - The backup name contains the string "howl" and `create_time` - * of the backup is before 2018-03-28T14:50:00Z. - * * `expire_time < \"2018-03-28T14:50:00Z\"` - * - The backup `expire_time` is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` - The backup's size is greater than 10GB - * * `backup_schedules:daily` - * - The backup is created from a schedule with "daily" in its name. + * * `name:Howl` - The backup's name contains the string "howl". + * * `database:prod` + * - The database's name contains the string "prod". + * * `state:CREATING` - The backup is pending creation. + * * `state:READY` - The backup is fully created and ready for use. + * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + * - The backup name contains the string "howl" and `create_time` + * of the backup is before 2018-03-28T14:50:00Z. + * * `expire_time < \"2018-03-28T14:50:00Z\"` + * - The backup `expire_time` is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` - The backup's size is greater than 10GB + * * `backup_schedules:daily` + * - The backup is created from a schedule with "daily" in its name. * * * string filter = 2; @@ -1375,17 +1348,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListBackupsRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java index 9e4ed9fc194..91a9f969202 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListBackupsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListBackupsRequest) @@ -72,14 +74,14 @@ public interface ListBackupsRequestOrBuilder * [Backup][google.spanner.admin.database.v1.Backup] are eligible for * filtering: * - * * `name` - * * `database` - * * `state` - * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * * `backup_schedules` + * * `name` + * * `database` + * * `state` + * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * * `backup_schedules` * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -87,19 +89,19 @@ public interface ListBackupsRequestOrBuilder * * Here are a few examples: * - * * `name:Howl` - The backup's name contains the string "howl". - * * `database:prod` - * - The database's name contains the string "prod". - * * `state:CREATING` - The backup is pending creation. - * * `state:READY` - The backup is fully created and ready for use. - * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - * - The backup name contains the string "howl" and `create_time` - * of the backup is before 2018-03-28T14:50:00Z. - * * `expire_time < \"2018-03-28T14:50:00Z\"` - * - The backup `expire_time` is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` - The backup's size is greater than 10GB - * * `backup_schedules:daily` - * - The backup is created from a schedule with "daily" in its name. + * * `name:Howl` - The backup's name contains the string "howl". + * * `database:prod` + * - The database's name contains the string "prod". + * * `state:CREATING` - The backup is pending creation. + * * `state:READY` - The backup is fully created and ready for use. + * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + * - The backup name contains the string "howl" and `create_time` + * of the backup is before 2018-03-28T14:50:00Z. + * * `expire_time < \"2018-03-28T14:50:00Z\"` + * - The backup `expire_time` is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` - The backup's size is greater than 10GB + * * `backup_schedules:daily` + * - The backup is created from a schedule with "daily" in its name. * * * string filter = 2; @@ -124,14 +126,14 @@ public interface ListBackupsRequestOrBuilder * [Backup][google.spanner.admin.database.v1.Backup] are eligible for * filtering: * - * * `name` - * * `database` - * * `state` - * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * * `backup_schedules` + * * `name` + * * `database` + * * `state` + * * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + * * `size_bytes` + * * `backup_schedules` * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic, but @@ -139,19 +141,19 @@ public interface ListBackupsRequestOrBuilder * * Here are a few examples: * - * * `name:Howl` - The backup's name contains the string "howl". - * * `database:prod` - * - The database's name contains the string "prod". - * * `state:CREATING` - The backup is pending creation. - * * `state:READY` - The backup is fully created and ready for use. - * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - * - The backup name contains the string "howl" and `create_time` - * of the backup is before 2018-03-28T14:50:00Z. - * * `expire_time < \"2018-03-28T14:50:00Z\"` - * - The backup `expire_time` is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` - The backup's size is greater than 10GB - * * `backup_schedules:daily` - * - The backup is created from a schedule with "daily" in its name. + * * `name:Howl` - The backup's name contains the string "howl". + * * `database:prod` + * - The database's name contains the string "prod". + * * `state:CREATING` - The backup is pending creation. + * * `state:READY` - The backup is fully created and ready for use. + * * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + * - The backup name contains the string "howl" and `create_time` + * of the backup is before 2018-03-28T14:50:00Z. + * * `expire_time < \"2018-03-28T14:50:00Z\"` + * - The backup `expire_time` is before 2018-03-28T14:50:00Z. + * * `size_bytes > 10000000000` - The backup's size is greater than 10GB + * * `backup_schedules:daily` + * - The backup is created from a schedule with "daily" in its name. * * * string filter = 2; diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java index 6f93e3d43c3..4def48cc8a9 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupsResponse} */ -public final class ListBackupsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListBackupsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListBackupsResponse) ListBackupsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListBackupsResponse"); + } + // Use ListBackupsResponse.newBuilder() to construct. - private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListBackupsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListBackupsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListBackupsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupsResponse_fieldAccessorTable @@ -221,8 +227,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < backups_.size(); i++) { output.writeMessage(1, backups_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -236,8 +242,8 @@ public int getSerializedSize() { for (int i = 0; i < backups_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, backups_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -316,38 +322,38 @@ public static com.google.spanner.admin.database.v1.ListBackupsResponse parseFrom public static com.google.spanner.admin.database.v1.ListBackupsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListBackupsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListBackupsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -371,7 +377,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -386,7 +392,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListBackupsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListBackupsResponse) com.google.spanner.admin.database.v1.ListBackupsResponseOrBuilder { @@ -396,7 +402,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_ListBackupsResponse_fieldAccessorTable @@ -408,7 +414,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.ListBackupsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -479,39 +485,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.ListBackupsRespo } } - @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.admin.database.v1.ListBackupsResponse) { @@ -544,8 +517,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.ListBackupsRespons backups_ = other.backups_; bitField0_ = (bitField0_ & ~0x00000001); backupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBackupsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupsFieldBuilder() : null; } else { backupsBuilder_.addAllMessages(other.backups_); @@ -631,7 +604,7 @@ private void ensureBackupsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> @@ -903,7 +876,7 @@ public Builder removeBackups(int index) { * repeated .google.spanner.admin.database.v1.Backup backups = 1; */ public com.google.spanner.admin.database.v1.Backup.Builder getBackupsBuilder(int index) { - return getBackupsFieldBuilder().getBuilder(index); + return internalGetBackupsFieldBuilder().getBuilder(index); } /** @@ -954,7 +927,7 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupsOrBuilder( * repeated .google.spanner.admin.database.v1.Backup backups = 1; */ public com.google.spanner.admin.database.v1.Backup.Builder addBackupsBuilder() { - return getBackupsFieldBuilder() + return internalGetBackupsFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.Backup.getDefaultInstance()); } @@ -969,7 +942,7 @@ public com.google.spanner.admin.database.v1.Backup.Builder addBackupsBuilder() { * repeated .google.spanner.admin.database.v1.Backup backups = 1; */ public com.google.spanner.admin.database.v1.Backup.Builder addBackupsBuilder(int index) { - return getBackupsFieldBuilder() + return internalGetBackupsFieldBuilder() .addBuilder(index, com.google.spanner.admin.database.v1.Backup.getDefaultInstance()); } @@ -985,17 +958,17 @@ public com.google.spanner.admin.database.v1.Backup.Builder addBackupsBuilder(int */ public java.util.List getBackupsBuilderList() { - return getBackupsFieldBuilder().getBuilderList(); + return internalGetBackupsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> - getBackupsFieldBuilder() { + internalGetBackupsFieldBuilder() { if (backupsBuilder_ == null) { backupsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder>( @@ -1126,17 +1099,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListBackupsResponse) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java index ad84f12ec96..c829ea06507 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListBackupsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListBackupsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListBackupsResponse) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java index c74939b15b3..7b2ab5ab931 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabaseOperationsRequest} */ -public final class ListDatabaseOperationsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListDatabaseOperationsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListDatabaseOperationsRequest) ListDatabaseOperationsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDatabaseOperationsRequest"); + } + // Use ListDatabaseOperationsRequest.newBuilder() to construct. - private ListDatabaseOperationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListDatabaseOperationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private ListDatabaseOperationsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListDatabaseOperationsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsRequest_fieldAccessorTable @@ -146,19 +152,19 @@ public com.google.protobuf.ByteString getParentBytes() { * The following fields in the [Operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -166,20 +172,20 @@ public com.google.protobuf.ByteString getParentBytes() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - * `(metadata.source_type:BACKUP) AND` \ - * `(metadata.backup_info.backup:backup_howl) AND` \ - * `(metadata.name:restored_howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - * * The database is restored from a backup. - * * The backup name contains "backup_howl". - * * The restored database's name contains "restored_howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + * `(metadata.source_type:BACKUP) AND` \ + * `(metadata.backup_info.backup:backup_howl) AND` \ + * `(metadata.name:restored_howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + * * The database is restored from a backup. + * * The backup name contains "backup_howl". + * * The restored database's name contains "restored_howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -214,19 +220,19 @@ public java.lang.String getFilter() { * The following fields in the [Operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -234,20 +240,20 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - * `(metadata.source_type:BACKUP) AND` \ - * `(metadata.backup_info.backup:backup_howl) AND` \ - * `(metadata.name:restored_howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - * * The database is restored from a backup. - * * The backup name contains "backup_howl". - * * The restored database's name contains "restored_howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + * `(metadata.source_type:BACKUP) AND` \ + * `(metadata.backup_info.backup:backup_howl) AND` \ + * `(metadata.name:restored_howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + * * The database is restored from a backup. + * * The backup name contains "backup_howl". + * * The restored database's name contains "restored_howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -362,17 +368,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); } if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -383,17 +389,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); } 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -476,39 +482,39 @@ public static com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest public static com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -532,7 +538,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -547,7 +553,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabaseOperationsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListDatabaseOperationsRequest) com.google.spanner.admin.database.v1.ListDatabaseOperationsRequestOrBuilder { @@ -557,7 +563,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsRequest_fieldAccessorTable @@ -570,7 +576,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -635,39 +641,6 @@ private void buildPartial0( } } - @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.admin.database.v1.ListDatabaseOperationsRequest) { @@ -914,19 +887,19 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * The following fields in the [Operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -934,20 +907,20 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - * `(metadata.source_type:BACKUP) AND` \ - * `(metadata.backup_info.backup:backup_howl) AND` \ - * `(metadata.name:restored_howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - * * The database is restored from a backup. - * * The backup name contains "backup_howl". - * * The restored database's name contains "restored_howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + * `(metadata.source_type:BACKUP) AND` \ + * `(metadata.backup_info.backup:backup_howl) AND` \ + * `(metadata.name:restored_howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + * * The database is restored from a backup. + * * The backup name contains "backup_howl". + * * The restored database's name contains "restored_howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -981,19 +954,19 @@ public java.lang.String getFilter() { * The following fields in the [Operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1001,20 +974,20 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - * `(metadata.source_type:BACKUP) AND` \ - * `(metadata.backup_info.backup:backup_howl) AND` \ - * `(metadata.name:restored_howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - * * The database is restored from a backup. - * * The backup name contains "backup_howl". - * * The restored database's name contains "restored_howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + * `(metadata.source_type:BACKUP) AND` \ + * `(metadata.backup_info.backup:backup_howl) AND` \ + * `(metadata.name:restored_howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + * * The database is restored from a backup. + * * The backup name contains "backup_howl". + * * The restored database's name contains "restored_howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -1048,19 +1021,19 @@ public com.google.protobuf.ByteString getFilterBytes() { * The following fields in the [Operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1068,20 +1041,20 @@ public com.google.protobuf.ByteString getFilterBytes() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - * `(metadata.source_type:BACKUP) AND` \ - * `(metadata.backup_info.backup:backup_howl) AND` \ - * `(metadata.name:restored_howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - * * The database is restored from a backup. - * * The backup name contains "backup_howl". - * * The restored database's name contains "restored_howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + * `(metadata.source_type:BACKUP) AND` \ + * `(metadata.backup_info.backup:backup_howl) AND` \ + * `(metadata.name:restored_howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + * * The database is restored from a backup. + * * The backup name contains "backup_howl". + * * The restored database's name contains "restored_howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -1114,19 +1087,19 @@ public Builder setFilter(java.lang.String value) { * The following fields in the [Operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1134,20 +1107,20 @@ public Builder setFilter(java.lang.String value) { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - * `(metadata.source_type:BACKUP) AND` \ - * `(metadata.backup_info.backup:backup_howl) AND` \ - * `(metadata.name:restored_howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - * * The database is restored from a backup. - * * The backup name contains "backup_howl". - * * The restored database's name contains "restored_howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + * `(metadata.source_type:BACKUP) AND` \ + * `(metadata.backup_info.backup:backup_howl) AND` \ + * `(metadata.name:restored_howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + * * The database is restored from a backup. + * * The backup name contains "backup_howl". + * * The restored database's name contains "restored_howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -1176,19 +1149,19 @@ public Builder clearFilter() { * The following fields in the [Operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1196,20 +1169,20 @@ public Builder clearFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - * `(metadata.source_type:BACKUP) AND` \ - * `(metadata.backup_info.backup:backup_howl) AND` \ - * `(metadata.name:restored_howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - * * The database is restored from a backup. - * * The backup name contains "backup_howl". - * * The restored database's name contains "restored_howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + * `(metadata.source_type:BACKUP) AND` \ + * `(metadata.backup_info.backup:backup_howl) AND` \ + * `(metadata.name:restored_howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + * * The database is restored from a backup. + * * The backup name contains "backup_howl". + * * The restored database's name contains "restored_howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -1418,17 +1391,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListDatabaseOperationsRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java index 7322a1d008c..d38a285db64 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListDatabaseOperationsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListDatabaseOperationsRequest) @@ -71,19 +73,19 @@ public interface ListDatabaseOperationsRequestOrBuilder * The following fields in the [Operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -91,20 +93,20 @@ public interface ListDatabaseOperationsRequestOrBuilder * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - * `(metadata.source_type:BACKUP) AND` \ - * `(metadata.backup_info.backup:backup_howl) AND` \ - * `(metadata.name:restored_howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - * * The database is restored from a backup. - * * The backup name contains "backup_howl". - * * The restored database's name contains "restored_howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + * `(metadata.source_type:BACKUP) AND` \ + * `(metadata.backup_info.backup:backup_howl) AND` \ + * `(metadata.name:restored_howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + * * The database is restored from a backup. + * * The backup name contains "backup_howl". + * * The restored database's name contains "restored_howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -128,19 +130,19 @@ public interface ListDatabaseOperationsRequestOrBuilder * The following fields in the [Operation][google.longrunning.Operation] * are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] - * is - * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata] + * is + * `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -148,20 +150,20 @@ public interface ListDatabaseOperationsRequestOrBuilder * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - * `(metadata.source_type:BACKUP) AND` \ - * `(metadata.backup_info.backup:backup_howl) AND` \ - * `(metadata.name:restored_howl) AND` \ - * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - * * The database is restored from a backup. - * * The backup name contains "backup_howl". - * * The restored database's name contains "restored_howl". - * * The operation started before 2018-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + * `(metadata.source_type:BACKUP) AND` \ + * `(metadata.backup_info.backup:backup_howl) AND` \ + * `(metadata.name:restored_howl) AND` \ + * `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + * * The database is restored from a backup. + * * The backup name contains "backup_howl". + * * The restored database's name contains "restored_howl". + * * The operation started before 2018-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponse.java index 81c9702e4d3..3b977a7c6e7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,15 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabaseOperationsResponse} */ -public final class ListDatabaseOperationsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListDatabaseOperationsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListDatabaseOperationsResponse) ListDatabaseOperationsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDatabaseOperationsResponse"); + } + // Use ListDatabaseOperationsResponse.newBuilder() to construct. - private ListDatabaseOperationsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListDatabaseOperationsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +57,13 @@ private ListDatabaseOperationsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListDatabaseOperationsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsResponse_fieldAccessorTable @@ -237,8 +242,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < operations_.size(); i++) { output.writeMessage(1, operations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -252,8 +257,8 @@ public int getSerializedSize() { for (int i = 0; i < operations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, operations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -332,39 +337,39 @@ public static com.google.spanner.admin.database.v1.ListDatabaseOperationsRespons public static com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -388,7 +393,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -403,7 +408,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabaseOperationsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListDatabaseOperationsResponse) com.google.spanner.admin.database.v1.ListDatabaseOperationsResponseOrBuilder { @@ -413,7 +418,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsResponse_fieldAccessorTable @@ -426,7 +431,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -500,39 +505,6 @@ private void buildPartial0( } } - @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.admin.database.v1.ListDatabaseOperationsResponse) { @@ -568,8 +540,8 @@ public Builder mergeFrom( operations_ = other.operations_; bitField0_ = (bitField0_ & ~0x00000001); operationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getOperationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetOperationsFieldBuilder() : null; } else { operationsBuilder_.addAllMessages(other.operations_); @@ -654,7 +626,7 @@ private void ensureOperationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> @@ -965,7 +937,7 @@ public Builder removeOperations(int index) { * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder getOperationsBuilder(int index) { - return getOperationsFieldBuilder().getBuilder(index); + return internalGetOperationsFieldBuilder().getBuilder(index); } /** @@ -1025,7 +997,7 @@ public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int inde * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder addOperationsBuilder() { - return getOperationsFieldBuilder() + return internalGetOperationsFieldBuilder() .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); } @@ -1043,7 +1015,7 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder() { * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) { - return getOperationsFieldBuilder() + return internalGetOperationsFieldBuilder() .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); } @@ -1061,17 +1033,17 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) * repeated .google.longrunning.Operation operations = 1; */ public java.util.List getOperationsBuilderList() { - return getOperationsFieldBuilder().getBuilderList(); + return internalGetOperationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> - getOperationsFieldBuilder() { + internalGetOperationsFieldBuilder() { if (operationsBuilder_ == null) { operationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( @@ -1202,17 +1174,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListDatabaseOperationsResponse) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponseOrBuilder.java index 0f76f832092..1b4b32f72f8 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseOperationsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListDatabaseOperationsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListDatabaseOperationsResponse) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequest.java index f68cbcff06c..bea2b96c518 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabaseRolesRequest} */ -public final class ListDatabaseRolesRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListDatabaseRolesRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListDatabaseRolesRequest) ListDatabaseRolesRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDatabaseRolesRequest"); + } + // Use ListDatabaseRolesRequest.newBuilder() to construct. - private ListDatabaseRolesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListDatabaseRolesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListDatabaseRolesRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListDatabaseRolesRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseRolesRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseRolesRequest_fieldAccessorTable @@ -220,14 +226,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } getUnknownFields().writeTo(output); } @@ -238,14 +244,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -325,38 +331,38 @@ public static com.google.spanner.admin.database.v1.ListDatabaseRolesRequest pars public static com.google.spanner.admin.database.v1.ListDatabaseRolesRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -380,7 +386,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -395,7 +401,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabaseRolesRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListDatabaseRolesRequest) com.google.spanner.admin.database.v1.ListDatabaseRolesRequestOrBuilder { @@ -405,7 +411,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseRolesRequest_fieldAccessorTable @@ -417,7 +423,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.ListDatabaseRolesRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -477,39 +483,6 @@ private void buildPartial0( } } - @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.admin.database.v1.ListDatabaseRolesRequest) { @@ -916,17 +889,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListDatabaseRolesRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequestOrBuilder.java index 6207b0eaff7..4b3d05560cb 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListDatabaseRolesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListDatabaseRolesRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponse.java index f1c0d01fcde..b855c53ba83 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabaseRolesResponse} */ -public final class ListDatabaseRolesResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListDatabaseRolesResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListDatabaseRolesResponse) ListDatabaseRolesResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDatabaseRolesResponse"); + } + // Use ListDatabaseRolesResponse.newBuilder() to construct. - private ListDatabaseRolesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListDatabaseRolesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListDatabaseRolesResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListDatabaseRolesResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_fieldAccessorTable @@ -217,8 +223,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < databaseRoles_.size(); i++) { output.writeMessage(1, databaseRoles_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -232,8 +238,8 @@ public int getSerializedSize() { for (int i = 0; i < databaseRoles_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, databaseRoles_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -312,38 +318,38 @@ public static com.google.spanner.admin.database.v1.ListDatabaseRolesResponse par public static com.google.spanner.admin.database.v1.ListDatabaseRolesResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabaseRolesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -367,7 +373,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -382,7 +388,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabaseRolesResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListDatabaseRolesResponse) com.google.spanner.admin.database.v1.ListDatabaseRolesResponseOrBuilder { @@ -392,7 +398,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_fieldAccessorTable @@ -404,7 +410,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.ListDatabaseRolesResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -477,39 +483,6 @@ private void buildPartial0( } } - @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.admin.database.v1.ListDatabaseRolesResponse) { @@ -543,8 +516,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.ListDatabaseRolesR databaseRoles_ = other.databaseRoles_; bitField0_ = (bitField0_ & ~0x00000001); databaseRolesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDatabaseRolesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDatabaseRolesFieldBuilder() : null; } else { databaseRolesBuilder_.addAllMessages(other.databaseRoles_); @@ -633,7 +606,7 @@ private void ensureDatabaseRolesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.DatabaseRole, com.google.spanner.admin.database.v1.DatabaseRole.Builder, com.google.spanner.admin.database.v1.DatabaseRoleOrBuilder> @@ -897,7 +870,7 @@ public Builder removeDatabaseRoles(int index) { */ public com.google.spanner.admin.database.v1.DatabaseRole.Builder getDatabaseRolesBuilder( int index) { - return getDatabaseRolesFieldBuilder().getBuilder(index); + return internalGetDatabaseRolesFieldBuilder().getBuilder(index); } /** @@ -946,7 +919,7 @@ public com.google.spanner.admin.database.v1.DatabaseRoleOrBuilder getDatabaseRol * repeated .google.spanner.admin.database.v1.DatabaseRole database_roles = 1; */ public com.google.spanner.admin.database.v1.DatabaseRole.Builder addDatabaseRolesBuilder() { - return getDatabaseRolesFieldBuilder() + return internalGetDatabaseRolesFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.DatabaseRole.getDefaultInstance()); } @@ -961,7 +934,7 @@ public com.google.spanner.admin.database.v1.DatabaseRole.Builder addDatabaseRole */ public com.google.spanner.admin.database.v1.DatabaseRole.Builder addDatabaseRolesBuilder( int index) { - return getDatabaseRolesFieldBuilder() + return internalGetDatabaseRolesFieldBuilder() .addBuilder( index, com.google.spanner.admin.database.v1.DatabaseRole.getDefaultInstance()); } @@ -977,17 +950,17 @@ public com.google.spanner.admin.database.v1.DatabaseRole.Builder addDatabaseRole */ public java.util.List getDatabaseRolesBuilderList() { - return getDatabaseRolesFieldBuilder().getBuilderList(); + return internalGetDatabaseRolesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.DatabaseRole, com.google.spanner.admin.database.v1.DatabaseRole.Builder, com.google.spanner.admin.database.v1.DatabaseRoleOrBuilder> - getDatabaseRolesFieldBuilder() { + internalGetDatabaseRolesFieldBuilder() { if (databaseRolesBuilder_ == null) { databaseRolesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.DatabaseRole, com.google.spanner.admin.database.v1.DatabaseRole.Builder, com.google.spanner.admin.database.v1.DatabaseRoleOrBuilder>( @@ -1121,17 +1094,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListDatabaseRolesResponse) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponseOrBuilder.java index 5de9cd5a326..f94b22d4bea 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabaseRolesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListDatabaseRolesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListDatabaseRolesResponse) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java index e8f5f5bc730..8334a0103ac 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabasesRequest} */ -public final class ListDatabasesRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListDatabasesRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListDatabasesRequest) ListDatabasesRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDatabasesRequest"); + } + // Use ListDatabasesRequest.newBuilder() to construct. - private ListDatabasesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListDatabasesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListDatabasesRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListDatabasesRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabasesRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabasesRequest_fieldAccessorTable @@ -218,14 +224,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -236,14 +242,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -323,38 +329,38 @@ public static com.google.spanner.admin.database.v1.ListDatabasesRequest parseFro public static com.google.spanner.admin.database.v1.ListDatabasesRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabasesRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabasesRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabasesRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabasesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabasesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -378,7 +384,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -393,7 +399,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabasesRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListDatabasesRequest) com.google.spanner.admin.database.v1.ListDatabasesRequestOrBuilder { @@ -403,7 +409,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabasesRequest_fieldAccessorTable @@ -415,7 +421,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.ListDatabasesRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -473,39 +479,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.ListDatabasesReq } } - @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.admin.database.v1.ListDatabasesRequest) { @@ -906,17 +879,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListDatabasesRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java index c58f42de608..c259ec9d3fd 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListDatabasesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListDatabasesRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java index d529b33f068..eb569c1ffdd 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabasesResponse} */ -public final class ListDatabasesResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListDatabasesResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.ListDatabasesResponse) ListDatabasesResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDatabasesResponse"); + } + // Use ListDatabasesResponse.newBuilder() to construct. - private ListDatabasesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListDatabasesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListDatabasesResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListDatabasesResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabasesResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabasesResponse_fieldAccessorTable @@ -216,8 +222,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < databases_.size(); i++) { output.writeMessage(1, databases_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -231,8 +237,8 @@ public int getSerializedSize() { for (int i = 0; i < databases_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, databases_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -311,38 +317,38 @@ public static com.google.spanner.admin.database.v1.ListDatabasesResponse parseFr public static com.google.spanner.admin.database.v1.ListDatabasesResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabasesResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabasesResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabasesResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.ListDatabasesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.ListDatabasesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -366,7 +372,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -381,7 +387,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.ListDatabasesResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.ListDatabasesResponse) com.google.spanner.admin.database.v1.ListDatabasesResponseOrBuilder { @@ -391,7 +397,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_ListDatabasesResponse_fieldAccessorTable @@ -403,7 +409,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.ListDatabasesResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -474,39 +480,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.ListDatabasesRes } } - @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.admin.database.v1.ListDatabasesResponse) { @@ -539,8 +512,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.ListDatabasesRespo databases_ = other.databases_; bitField0_ = (bitField0_ & ~0x00000001); databasesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDatabasesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDatabasesFieldBuilder() : null; } else { databasesBuilder_.addAllMessages(other.databases_); @@ -627,7 +600,7 @@ private void ensureDatabasesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder> @@ -887,7 +860,7 @@ public Builder removeDatabases(int index) { * repeated .google.spanner.admin.database.v1.Database databases = 1; */ public com.google.spanner.admin.database.v1.Database.Builder getDatabasesBuilder(int index) { - return getDatabasesFieldBuilder().getBuilder(index); + return internalGetDatabasesFieldBuilder().getBuilder(index); } /** @@ -935,7 +908,7 @@ public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabasesOrBuil * repeated .google.spanner.admin.database.v1.Database databases = 1; */ public com.google.spanner.admin.database.v1.Database.Builder addDatabasesBuilder() { - return getDatabasesFieldBuilder() + return internalGetDatabasesFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.Database.getDefaultInstance()); } @@ -949,7 +922,7 @@ public com.google.spanner.admin.database.v1.Database.Builder addDatabasesBuilder * repeated .google.spanner.admin.database.v1.Database databases = 1; */ public com.google.spanner.admin.database.v1.Database.Builder addDatabasesBuilder(int index) { - return getDatabasesFieldBuilder() + return internalGetDatabasesFieldBuilder() .addBuilder(index, com.google.spanner.admin.database.v1.Database.getDefaultInstance()); } @@ -964,17 +937,17 @@ public com.google.spanner.admin.database.v1.Database.Builder addDatabasesBuilder */ public java.util.List getDatabasesBuilderList() { - return getDatabasesFieldBuilder().getBuilderList(); + return internalGetDatabasesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder> - getDatabasesFieldBuilder() { + internalGetDatabasesFieldBuilder() { if (databasesBuilder_ == null) { databasesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder>( @@ -1105,17 +1078,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.ListDatabasesResponse) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java index 92b4e393d80..337dbc2c7f5 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/ListDatabasesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface ListDatabasesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.ListDatabasesResponse) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgress.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgress.java index 28cc66a538e..fb3dd65b048 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgress.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgress.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.database.v1.OperationProgress} */ -public final class OperationProgress extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class OperationProgress extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.OperationProgress) OperationProgressOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationProgress"); + } + // Use OperationProgress.newBuilder() to construct. - private OperationProgress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private OperationProgress(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private OperationProgress() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OperationProgress(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.CommonProto .internal_static_google_spanner_admin_database_v1_OperationProgress_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.CommonProto .internal_static_google_spanner_admin_database_v1_OperationProgress_fieldAccessorTable @@ -314,38 +320,38 @@ public static com.google.spanner.admin.database.v1.OperationProgress parseFrom( public static com.google.spanner.admin.database.v1.OperationProgress parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.OperationProgress parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.OperationProgress parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.OperationProgress parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.OperationProgress parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.OperationProgress parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -369,7 +375,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -384,7 +390,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.OperationProgress} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.OperationProgress) com.google.spanner.admin.database.v1.OperationProgressOrBuilder { @@ -394,7 +400,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.CommonProto .internal_static_google_spanner_admin_database_v1_OperationProgress_fieldAccessorTable @@ -408,15 +414,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStartTimeFieldBuilder(); - getEndTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); } } @@ -486,39 +492,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.OperationProgres 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.admin.database.v1.OperationProgress) { @@ -575,13 +548,14 @@ public Builder mergeFrom( } // case 8 case 18: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -664,7 +638,7 @@ public Builder clearProgressPercent() { } private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -807,7 +781,7 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } /** @@ -836,14 +810,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_time = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { + internalGetStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -854,7 +828,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1004,7 +978,7 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } /** @@ -1035,14 +1009,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * .google.protobuf.Timestamp end_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { + internalGetEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1052,17 +1026,6 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTimeBuilder_; } - @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.admin.database.v1.OperationProgress) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgressOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgressOrBuilder.java index 94977587a88..80a3ca67c21 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgressOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OperationProgressOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface OperationProgressOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.OperationProgress) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadata.java index 1d9902a79be..954c6b25dfc 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -31,15 +32,26 @@ * * Protobuf type {@code google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata} */ -public final class OptimizeRestoredDatabaseMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class OptimizeRestoredDatabaseMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata) OptimizeRestoredDatabaseMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OptimizeRestoredDatabaseMetadata"); + } + // Use OptimizeRestoredDatabaseMetadata.newBuilder() to construct. private OptimizeRestoredDatabaseMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +59,13 @@ private OptimizeRestoredDatabaseMetadata() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OptimizeRestoredDatabaseMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_fieldAccessorTable @@ -189,8 +195,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getProgress()); @@ -204,8 +210,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProgress()); @@ -290,39 +296,39 @@ public static com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetad public static com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -346,7 +352,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -363,7 +369,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata) com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadataOrBuilder { @@ -373,7 +379,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_fieldAccessorTable @@ -388,14 +394,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProgressFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetProgressFieldBuilder(); } } @@ -459,39 +465,6 @@ private void buildPartial0( 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.admin.database.v1.OptimizeRestoredDatabaseMetadata) { @@ -550,7 +523,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -685,7 +659,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> @@ -832,7 +806,7 @@ public Builder clearProgress() { public com.google.spanner.admin.database.v1.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } /** @@ -863,14 +837,14 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre * * .google.spanner.admin.database.v1.OperationProgress progress = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder>( @@ -880,17 +854,6 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre return progressBuilder_; } - @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.admin.database.v1.OptimizeRestoredDatabaseMetadata) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadataOrBuilder.java index a9e20479e9d..b25ba1e0297 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/OptimizeRestoredDatabaseMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface OptimizeRestoredDatabaseMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java index 1d87fffd6de..438b24bf863 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,15 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig} */ -public final class RestoreDatabaseEncryptionConfig extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RestoreDatabaseEncryptionConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig) RestoreDatabaseEncryptionConfigOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RestoreDatabaseEncryptionConfig"); + } + // Use RestoreDatabaseEncryptionConfig.newBuilder() to construct. - private RestoreDatabaseEncryptionConfig( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RestoreDatabaseEncryptionConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +57,13 @@ private RestoreDatabaseEncryptionConfig() { kmsKeyNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreDatabaseEncryptionConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_fieldAccessorTable @@ -124,6 +129,16 @@ public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EncryptionType"); + } + /** * * @@ -231,7 +246,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.getDescriptor() .getEnumTypes() .get(0); @@ -521,11 +536,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, encryptionType_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kmsKeyName_); } for (int i = 0; i < kmsKeyNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kmsKeyNames_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, kmsKeyNames_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -542,8 +557,8 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, encryptionType_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kmsKeyName_); } { int dataSize = 0; @@ -633,39 +648,39 @@ public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConf public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -689,7 +704,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -703,7 +718,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig) com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder { @@ -713,7 +728,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_fieldAccessorTable @@ -726,7 +741,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -788,39 +803,6 @@ private void buildPartial0( } } - @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.admin.database.v1.RestoreDatabaseEncryptionConfig) { @@ -1498,17 +1480,6 @@ public Builder addKmsKeyNamesBytes(com.google.protobuf.ByteString value) { 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.admin.database.v1.RestoreDatabaseEncryptionConfig) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java index f3c8c17ff04..ee21bfaa603 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseEncryptionConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface RestoreDatabaseEncryptionConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java index cc3db47a2f9..8235d556042 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.RestoreDatabaseMetadata} */ -public final class RestoreDatabaseMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RestoreDatabaseMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.RestoreDatabaseMetadata) RestoreDatabaseMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RestoreDatabaseMetadata"); + } + // Use RestoreDatabaseMetadata.newBuilder() to construct. - private RestoreDatabaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RestoreDatabaseMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private RestoreDatabaseMetadata() { optimizeDatabaseOperationName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreDatabaseMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_fieldAccessorTable @@ -489,8 +495,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (sourceType_ != com.google.spanner.admin.database.v1.RestoreSourceType.TYPE_UNSPECIFIED.getNumber()) { @@ -505,8 +511,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(5, getCancelTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizeDatabaseOperationName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, optimizeDatabaseOperationName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizeDatabaseOperationName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, optimizeDatabaseOperationName_); } getUnknownFields().writeTo(output); } @@ -517,8 +523,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (sourceType_ != com.google.spanner.admin.database.v1.RestoreSourceType.TYPE_UNSPECIFIED.getNumber()) { @@ -535,10 +541,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCancelTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizeDatabaseOperationName_)) { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizeDatabaseOperationName_)) { size += - com.google.protobuf.GeneratedMessageV3.computeStringSize( - 6, optimizeDatabaseOperationName_); + com.google.protobuf.GeneratedMessage.computeStringSize(6, optimizeDatabaseOperationName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -651,38 +656,38 @@ public static com.google.spanner.admin.database.v1.RestoreDatabaseMetadata parse public static com.google.spanner.admin.database.v1.RestoreDatabaseMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreDatabaseMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.RestoreDatabaseMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreDatabaseMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.RestoreDatabaseMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreDatabaseMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -706,7 +711,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -721,7 +726,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.RestoreDatabaseMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.RestoreDatabaseMetadata) com.google.spanner.admin.database.v1.RestoreDatabaseMetadataOrBuilder { @@ -731,7 +736,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_fieldAccessorTable @@ -745,15 +750,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProgressFieldBuilder(); - getCancelTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetProgressFieldBuilder(); + internalGetCancelTimeFieldBuilder(); } } @@ -848,39 +853,6 @@ private void buildPartialOneofs( } } - @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.admin.database.v1.RestoreDatabaseMetadata) { @@ -965,19 +937,22 @@ public Builder mergeFrom( } // case 16 case 26: { - input.readMessage(getBackupInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBackupInfoFieldBuilder().getBuilder(), extensionRegistry); sourceInfoCase_ = 3; break; } // case 26 case 34: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -1228,7 +1203,7 @@ public Builder clearSourceType() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupInfo, com.google.spanner.admin.database.v1.BackupInfo.Builder, com.google.spanner.admin.database.v1.BackupInfoOrBuilder> @@ -1390,7 +1365,7 @@ public Builder clearBackupInfo() { * .google.spanner.admin.database.v1.BackupInfo backup_info = 3; */ public com.google.spanner.admin.database.v1.BackupInfo.Builder getBackupInfoBuilder() { - return getBackupInfoFieldBuilder().getBuilder(); + return internalGetBackupInfoFieldBuilder().getBuilder(); } /** @@ -1423,17 +1398,17 @@ public com.google.spanner.admin.database.v1.BackupInfoOrBuilder getBackupInfoOrB * * .google.spanner.admin.database.v1.BackupInfo backup_info = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupInfo, com.google.spanner.admin.database.v1.BackupInfo.Builder, com.google.spanner.admin.database.v1.BackupInfoOrBuilder> - getBackupInfoFieldBuilder() { + internalGetBackupInfoFieldBuilder() { if (backupInfoBuilder_ == null) { if (!(sourceInfoCase_ == 3)) { sourceInfo_ = com.google.spanner.admin.database.v1.BackupInfo.getDefaultInstance(); } backupInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupInfo, com.google.spanner.admin.database.v1.BackupInfo.Builder, com.google.spanner.admin.database.v1.BackupInfoOrBuilder>( @@ -1448,7 +1423,7 @@ public com.google.spanner.admin.database.v1.BackupInfoOrBuilder getBackupInfoOrB } private com.google.spanner.admin.database.v1.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> @@ -1609,7 +1584,7 @@ public Builder clearProgress() { public com.google.spanner.admin.database.v1.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } /** @@ -1644,14 +1619,14 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre * * .google.spanner.admin.database.v1.OperationProgress progress = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder>( @@ -1662,7 +1637,7 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1884,7 +1859,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1937,14 +1912,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2115,17 +2090,6 @@ public Builder setOptimizeDatabaseOperationNameBytes(com.google.protobuf.ByteStr 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.admin.database.v1.RestoreDatabaseMetadata) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java index cb08525d059..2aa59a8775c 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface RestoreDatabaseMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.RestoreDatabaseMetadata) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java index 8c6612f3ee9..310613bb1ac 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.RestoreDatabaseRequest} */ -public final class RestoreDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RestoreDatabaseRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.RestoreDatabaseRequest) RestoreDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RestoreDatabaseRequest"); + } + // Use RestoreDatabaseRequest.newBuilder() to construct. - private RestoreDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RestoreDatabaseRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private RestoreDatabaseRequest() { databaseId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreDatabaseRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_fieldAccessorTable @@ -404,14 +410,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, databaseId_); } if (sourceCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, source_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getEncryptionConfig()); @@ -425,14 +431,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, databaseId_); } if (sourceCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, source_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEncryptionConfig()); @@ -536,38 +542,38 @@ public static com.google.spanner.admin.database.v1.RestoreDatabaseRequest parseF public static com.google.spanner.admin.database.v1.RestoreDatabaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreDatabaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.RestoreDatabaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreDatabaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.RestoreDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -591,7 +597,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -606,7 +612,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.RestoreDatabaseRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.RestoreDatabaseRequest) com.google.spanner.admin.database.v1.RestoreDatabaseRequestOrBuilder { @@ -616,7 +622,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_fieldAccessorTable @@ -630,14 +636,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncryptionConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncryptionConfigFieldBuilder(); } } @@ -712,39 +718,6 @@ private void buildPartialOneofs( result.source_ = this.source_; } - @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.admin.database.v1.RestoreDatabaseRequest) { @@ -832,7 +805,7 @@ public Builder mergeFrom( case 34: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1282,7 +1255,7 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig, com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder, com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder> @@ -1485,7 +1458,7 @@ public Builder clearEncryptionConfig() { getEncryptionConfigBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } /** @@ -1532,14 +1505,14 @@ public Builder clearEncryptionConfig() { * .google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig, com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder, com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig, com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.Builder, com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfigOrBuilder>( @@ -1549,17 +1522,6 @@ public Builder clearEncryptionConfig() { return encryptionConfigBuilder_; } - @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.admin.database.v1.RestoreDatabaseRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java index 31b654e3509..b36a76b8a2a 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface RestoreDatabaseRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.RestoreDatabaseRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfo.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfo.java index 296d924ccd8..a06362fab8a 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfo.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.RestoreInfo} */ -public final class RestoreInfo extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RestoreInfo extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.RestoreInfo) RestoreInfoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RestoreInfo"); + } + // Use RestoreInfo.newBuilder() to construct. - private RestoreInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RestoreInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private RestoreInfo() { sourceType_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreInfo(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreInfo_fieldAccessorTable @@ -334,38 +340,38 @@ public static com.google.spanner.admin.database.v1.RestoreInfo parseFrom( public static com.google.spanner.admin.database.v1.RestoreInfo parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.RestoreInfo parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.RestoreInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.RestoreInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -388,7 +394,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -402,7 +408,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.RestoreInfo} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.RestoreInfo) com.google.spanner.admin.database.v1.RestoreInfoOrBuilder { @@ -412,7 +418,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_RestoreInfo_fieldAccessorTable @@ -424,7 +430,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.RestoreInfo.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -488,39 +494,6 @@ private void buildPartialOneofs(com.google.spanner.admin.database.v1.RestoreInfo } } - @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.admin.database.v1.RestoreInfo) { @@ -582,7 +555,8 @@ public Builder mergeFrom( } // case 8 case 18: { - input.readMessage(getBackupInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBackupInfoFieldBuilder().getBuilder(), extensionRegistry); sourceInfoCase_ = 2; break; } // case 18 @@ -716,7 +690,7 @@ public Builder clearSourceType() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupInfo, com.google.spanner.admin.database.v1.BackupInfo.Builder, com.google.spanner.admin.database.v1.BackupInfoOrBuilder> @@ -885,7 +859,7 @@ public Builder clearBackupInfo() { * .google.spanner.admin.database.v1.BackupInfo backup_info = 2; */ public com.google.spanner.admin.database.v1.BackupInfo.Builder getBackupInfoBuilder() { - return getBackupInfoFieldBuilder().getBuilder(); + return internalGetBackupInfoFieldBuilder().getBuilder(); } /** @@ -920,17 +894,17 @@ public com.google.spanner.admin.database.v1.BackupInfoOrBuilder getBackupInfoOrB * * .google.spanner.admin.database.v1.BackupInfo backup_info = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupInfo, com.google.spanner.admin.database.v1.BackupInfo.Builder, com.google.spanner.admin.database.v1.BackupInfoOrBuilder> - getBackupInfoFieldBuilder() { + internalGetBackupInfoFieldBuilder() { if (backupInfoBuilder_ == null) { if (!(sourceInfoCase_ == 2)) { sourceInfo_ = com.google.spanner.admin.database.v1.BackupInfo.getDefaultInstance(); } backupInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupInfo, com.google.spanner.admin.database.v1.BackupInfo.Builder, com.google.spanner.admin.database.v1.BackupInfoOrBuilder>( @@ -944,17 +918,6 @@ public com.google.spanner.admin.database.v1.BackupInfoOrBuilder getBackupInfoOrB return backupInfoBuilder_; } - @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.admin.database.v1.RestoreInfo) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfoOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfoOrBuilder.java index 2b61c6b7533..1f7c2d94ace 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface RestoreInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.RestoreInfo) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreSourceType.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreSourceType.java index c619ec7e52c..369e284b7fc 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreSourceType.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/RestoreSourceType.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,6 +29,7 @@ * * Protobuf enum {@code google.spanner.admin.database.v1.RestoreSourceType} */ +@com.google.protobuf.Generated public enum RestoreSourceType implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -52,6 +54,16 @@ public enum RestoreSourceType implements com.google.protobuf.ProtocolMessageEnum UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RestoreSourceType"); + } + /** * * @@ -131,7 +143,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto.getDescriptor() .getEnumTypes() .get(0); diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java index 3ede3d5a3fe..b66802a5d79 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SpannerDatabaseAdminProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; -public final class SpannerDatabaseAdminProto { +@com.google.protobuf.Generated +public final class SpannerDatabaseAdminProto extends com.google.protobuf.GeneratedFile { private SpannerDatabaseAdminProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpannerDatabaseAdminProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,123 +42,123 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_RestoreInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_RestoreInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_Database_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_Database_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListDatabasesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListDatabasesRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListDatabasesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListDatabasesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CreateDatabaseRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CreateDatabaseRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_CreateDatabaseMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_CreateDatabaseMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_DdlStatementActionInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_DdlStatementActionInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_DropDatabaseRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_DropDatabaseRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_GetDatabaseDdlRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_GetDatabaseDdlRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_GetDatabaseDdlResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_GetDatabaseDdlResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_DatabaseRole_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_DatabaseRole_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListDatabaseRolesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListDatabaseRolesRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_SplitPoints_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_SplitPoints_Key_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -510,17 +522,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.spanner.admin.database.v1.CommonProto.getDescriptor(), }); internal_static_google_spanner_admin_database_v1_RestoreInfo_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_spanner_admin_database_v1_RestoreInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_RestoreInfo_descriptor, new java.lang.String[] { "SourceType", "BackupInfo", "SourceInfo", }); internal_static_google_spanner_admin_database_v1_Database_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_spanner_admin_database_v1_Database_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_Database_descriptor, new java.lang.String[] { "Name", @@ -537,25 +549,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Reconciling", }); internal_static_google_spanner_admin_database_v1_ListDatabasesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_spanner_admin_database_v1_ListDatabasesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListDatabasesRequest_descriptor, new java.lang.String[] { "Parent", "PageSize", "PageToken", }); internal_static_google_spanner_admin_database_v1_ListDatabasesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_spanner_admin_database_v1_ListDatabasesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListDatabasesResponse_descriptor, new java.lang.String[] { "Databases", "NextPageToken", }); internal_static_google_spanner_admin_database_v1_CreateDatabaseRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_spanner_admin_database_v1_CreateDatabaseRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CreateDatabaseRequest_descriptor, new java.lang.String[] { "Parent", @@ -566,121 +578,121 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProtoDescriptors", }); internal_static_google_spanner_admin_database_v1_CreateDatabaseMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageType(5); internal_static_google_spanner_admin_database_v1_CreateDatabaseMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_CreateDatabaseMetadata_descriptor, new java.lang.String[] { "Database", }); internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageType(6); internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_GetDatabaseRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageType(7); internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_descriptor, new java.lang.String[] { "Database", "UpdateMask", }); internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageType(8); internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_descriptor, new java.lang.String[] { "Request", "Progress", "CancelTime", }); internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageType(9); internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlRequest_descriptor, new java.lang.String[] { "Database", "Statements", "OperationId", "ProtoDescriptors", "ThroughputMode", }); internal_static_google_spanner_admin_database_v1_DdlStatementActionInfo_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageType(10); internal_static_google_spanner_admin_database_v1_DdlStatementActionInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_DdlStatementActionInfo_descriptor, new java.lang.String[] { "Action", "EntityType", "EntityNames", }); internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlMetadata_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageType(11); internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlMetadata_descriptor, new java.lang.String[] { "Database", "Statements", "CommitTimestamps", "Throttled", "Progress", "Actions", }); internal_static_google_spanner_admin_database_v1_DropDatabaseRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageType(12); internal_static_google_spanner_admin_database_v1_DropDatabaseRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_DropDatabaseRequest_descriptor, new java.lang.String[] { "Database", }); internal_static_google_spanner_admin_database_v1_GetDatabaseDdlRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageType(13); internal_static_google_spanner_admin_database_v1_GetDatabaseDdlRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_GetDatabaseDdlRequest_descriptor, new java.lang.String[] { "Database", }); internal_static_google_spanner_admin_database_v1_GetDatabaseDdlResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageType(14); internal_static_google_spanner_admin_database_v1_GetDatabaseDdlResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_GetDatabaseDdlResponse_descriptor, new java.lang.String[] { "Statements", "ProtoDescriptors", }); internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageType(15); internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsRequest_descriptor, new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageType(16); internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListDatabaseOperationsResponse_descriptor, new java.lang.String[] { "Operations", "NextPageToken", }); internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageType(17); internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_RestoreDatabaseRequest_descriptor, new java.lang.String[] { "Parent", "DatabaseId", "Backup", "EncryptionConfig", "Source", }); internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageType(18); internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_RestoreDatabaseEncryptionConfig_descriptor, new java.lang.String[] { "EncryptionType", "KmsKeyName", "KmsKeyNames", }); internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageType(19); internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_RestoreDatabaseMetadata_descriptor, new java.lang.String[] { "Name", @@ -692,96 +704,82 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SourceInfo", }); internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageType(20); internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_OptimizeRestoredDatabaseMetadata_descriptor, new java.lang.String[] { "Name", "Progress", }); internal_static_google_spanner_admin_database_v1_DatabaseRole_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageType(21); internal_static_google_spanner_admin_database_v1_DatabaseRole_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_DatabaseRole_descriptor, new java.lang.String[] { "Name", }); internal_static_google_spanner_admin_database_v1_ListDatabaseRolesRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageType(22); internal_static_google_spanner_admin_database_v1_ListDatabaseRolesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListDatabaseRolesRequest_descriptor, new java.lang.String[] { "Parent", "PageSize", "PageToken", }); internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageType(23); internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_ListDatabaseRolesResponse_descriptor, new java.lang.String[] { "DatabaseRoles", "NextPageToken", }); internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageType(24); internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_AddSplitPointsRequest_descriptor, new java.lang.String[] { "Database", "SplitPoints", "Initiator", }); internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageType(25); internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_AddSplitPointsResponse_descriptor, new java.lang.String[] {}); internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageType(26); internal_static_google_spanner_admin_database_v1_SplitPoints_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor, new java.lang.String[] { "Table", "Index", "Keys", "ExpireTime", }); internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor = - internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor - .getNestedTypes() - .get(0); + internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor.getNestedType(0); internal_static_google_spanner_admin_database_v1_SplitPoints_Key_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor, new java.lang.String[] { "KeyParts", }); internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageType(27); internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationRequest_descriptor, new java.lang.String[] { "Database", "OperationId", "VmIdentityToken", "Progress", "Status", }); internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageType(28); internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_database_v1_InternalUpdateGraphOperationResponse_descriptor, new java.lang.String[] {}); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceDefinition); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); + descriptor.resolveAllFeaturesImmutable(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); @@ -797,6 +795,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.spanner.admin.database.v1.BackupProto.getDescriptor(); com.google.spanner.admin.database.v1.BackupScheduleProto.getDescriptor(); com.google.spanner.admin.database.v1.CommonProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPoints.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPoints.java index af43631d85e..33b5dd6f2c6 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPoints.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPoints.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.SplitPoints} */ -public final class SplitPoints extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SplitPoints extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.SplitPoints) SplitPointsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SplitPoints"); + } + // Use SplitPoints.newBuilder() to construct. - private SplitPoints(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SplitPoints(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private SplitPoints() { keys_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SplitPoints(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_SplitPoints_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_SplitPoints_fieldAccessorTable @@ -121,32 +127,36 @@ public interface KeyOrBuilder * * Protobuf type {@code google.spanner.admin.database.v1.SplitPoints.Key} */ - public static final class Key extends com.google.protobuf.GeneratedMessageV3 + public static final class Key extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.SplitPoints.Key) KeyOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Key"); + } + // Use Key.newBuilder() to construct. - private Key(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Key(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Key() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Key(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_SplitPoints_Key_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_SplitPoints_Key_fieldAccessorTable @@ -314,38 +324,38 @@ public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.SplitPoints.Key parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.SplitPoints.Key parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.SplitPoints.Key parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -369,8 +379,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -384,8 +393,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.admin.database.v1.SplitPoints.Key} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.SplitPoints.Key) com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder { @@ -395,7 +403,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_SplitPoints_Key_fieldAccessorTable @@ -409,14 +417,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getKeyPartsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeyPartsFieldBuilder(); } } @@ -473,41 +481,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.SplitPoints.Key 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.admin.database.v1.SplitPoints.Key) { @@ -552,7 +525,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getKeyPartsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetKeyPartsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -576,7 +550,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ListValue keyParts_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> @@ -726,7 +700,7 @@ public Builder clearKeyParts() { public com.google.protobuf.ListValue.Builder getKeyPartsBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getKeyPartsFieldBuilder().getBuilder(); + return internalGetKeyPartsFieldBuilder().getBuilder(); } /** @@ -757,14 +731,14 @@ public com.google.protobuf.ListValueOrBuilder getKeyPartsOrBuilder() { * .google.protobuf.ListValue key_parts = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> - getKeyPartsFieldBuilder() { + internalGetKeyPartsFieldBuilder() { if (keyPartsBuilder_ == null) { keyPartsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder>( @@ -774,18 +748,6 @@ public com.google.protobuf.ListValueOrBuilder getKeyPartsOrBuilder() { return keyPartsBuilder_; } - @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.admin.database.v1.SplitPoints.Key) } @@ -1108,11 +1070,11 @@ public final boolean isInitialized() { @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, table_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, index_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, index_); } for (int i = 0; i < keys_.size(); i++) { output.writeMessage(3, keys_.get(i)); @@ -1129,11 +1091,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, table_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, index_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(index_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, index_); } for (int i = 0; i < keys_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, keys_.get(i)); @@ -1229,38 +1191,38 @@ public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.SplitPoints parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.SplitPoints parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.SplitPoints parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1283,7 +1245,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1297,7 +1259,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.SplitPoints} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.SplitPoints) com.google.spanner.admin.database.v1.SplitPointsOrBuilder { @@ -1307,7 +1269,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_SplitPoints_fieldAccessorTable @@ -1321,15 +1283,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getKeysFieldBuilder(); - getExpireTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeysFieldBuilder(); + internalGetExpireTimeFieldBuilder(); } } @@ -1415,39 +1377,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.SplitPoints resu 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.admin.database.v1.SplitPoints) { @@ -1490,8 +1419,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.SplitPoints other) keys_ = other.keys_; bitField0_ = (bitField0_ & ~0x00000004); keysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getKeysFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetKeysFieldBuilder() : null; } else { keysBuilder_.addAllMessages(other.keys_); @@ -1555,7 +1484,8 @@ public Builder mergeFrom( } // case 26 case 42: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 42 @@ -1816,7 +1746,7 @@ private void ensureKeysIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.SplitPoints.Key, com.google.spanner.admin.database.v1.SplitPoints.Key.Builder, com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder> @@ -2102,7 +2032,7 @@ public Builder removeKeys(int index) { * */ public com.google.spanner.admin.database.v1.SplitPoints.Key.Builder getKeysBuilder(int index) { - return getKeysFieldBuilder().getBuilder(index); + return internalGetKeysFieldBuilder().getBuilder(index); } /** @@ -2157,7 +2087,7 @@ public com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder getKeysOrBu * */ public com.google.spanner.admin.database.v1.SplitPoints.Key.Builder addKeysBuilder() { - return getKeysFieldBuilder() + return internalGetKeysFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.SplitPoints.Key.getDefaultInstance()); } @@ -2173,7 +2103,7 @@ public com.google.spanner.admin.database.v1.SplitPoints.Key.Builder addKeysBuild * */ public com.google.spanner.admin.database.v1.SplitPoints.Key.Builder addKeysBuilder(int index) { - return getKeysFieldBuilder() + return internalGetKeysFieldBuilder() .addBuilder( index, com.google.spanner.admin.database.v1.SplitPoints.Key.getDefaultInstance()); } @@ -2191,17 +2121,17 @@ public com.google.spanner.admin.database.v1.SplitPoints.Key.Builder addKeysBuild */ public java.util.List getKeysBuilderList() { - return getKeysFieldBuilder().getBuilderList(); + return internalGetKeysFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.SplitPoints.Key, com.google.spanner.admin.database.v1.SplitPoints.Key.Builder, com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder> - getKeysFieldBuilder() { + internalGetKeysFieldBuilder() { if (keysBuilder_ == null) { keysBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.SplitPoints.Key, com.google.spanner.admin.database.v1.SplitPoints.Key.Builder, com.google.spanner.admin.database.v1.SplitPoints.KeyOrBuilder>( @@ -2212,7 +2142,7 @@ public com.google.spanner.admin.database.v1.SplitPoints.Key.Builder addKeysBuild } private com.google.protobuf.Timestamp expireTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -2385,7 +2315,7 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } /** @@ -2424,14 +2354,14 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpireTimeFieldBuilder() { + internalGetExpireTimeFieldBuilder() { if (expireTimeBuilder_ == null) { expireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2441,17 +2371,6 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { 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.admin.database.v1.SplitPoints) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPointsOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPointsOrBuilder.java index 1fb9b0c0804..88720dd4b4b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPointsOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/SplitPointsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface SplitPointsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.SplitPoints) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java index e8defee4d7b..ddc07036320 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.database.v1.UpdateBackupRequest} */ -public final class UpdateBackupRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateBackupRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.UpdateBackupRequest) UpdateBackupRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateBackupRequest"); + } + // Use UpdateBackupRequest.newBuilder() to construct. - private UpdateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateBackupRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateBackupRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_fieldAccessorTable @@ -74,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -95,7 +101,7 @@ public boolean hasBackup() { * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -118,7 +124,7 @@ public com.google.spanner.admin.database.v1.Backup getBackup() { * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -316,38 +322,38 @@ public static com.google.spanner.admin.database.v1.UpdateBackupRequest parseFrom public static com.google.spanner.admin.database.v1.UpdateBackupRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateBackupRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateBackupRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateBackupRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateBackupRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateBackupRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -371,7 +377,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -386,7 +392,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.UpdateBackupRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.UpdateBackupRequest) com.google.spanner.admin.database.v1.UpdateBackupRequestOrBuilder { @@ -396,7 +402,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupProto .internal_static_google_spanner_admin_database_v1_UpdateBackupRequest_fieldAccessorTable @@ -410,15 +416,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBackupFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -484,39 +490,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.UpdateBackupRequ 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.admin.database.v1.UpdateBackupRequest) { @@ -564,13 +537,14 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetBackupFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -594,7 +568,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.database.v1.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> @@ -607,7 +581,7 @@ public Builder mergeFrom( * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -627,7 +601,7 @@ public boolean hasBackup() { * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -653,7 +627,7 @@ public com.google.spanner.admin.database.v1.Backup getBackup() { * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -681,7 +655,7 @@ public Builder setBackup(com.google.spanner.admin.database.v1.Backup value) { * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -706,7 +680,7 @@ public Builder setBackup(com.google.spanner.admin.database.v1.Backup.Builder bui * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -739,7 +713,7 @@ public Builder mergeBackup(com.google.spanner.admin.database.v1.Backup value) { * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -764,7 +738,7 @@ public Builder clearBackup() { * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -774,7 +748,7 @@ public Builder clearBackup() { public com.google.spanner.admin.database.v1.Backup.Builder getBackupBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getBackupFieldBuilder().getBuilder(); + return internalGetBackupFieldBuilder().getBuilder(); } /** @@ -784,7 +758,7 @@ public com.google.spanner.admin.database.v1.Backup.Builder getBackupBuilder() { * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -808,21 +782,21 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * * .google.spanner.admin.database.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> - getBackupFieldBuilder() { + internalGetBackupFieldBuilder() { if (backupBuilder_ == null) { backupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder>( @@ -833,7 +807,7 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() } private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> @@ -1013,7 +987,7 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } /** @@ -1054,14 +1028,14 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { + internalGetUpdateMaskFieldBuilder() { if (updateMaskBuilder_ == null) { updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -1071,17 +1045,6 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return updateMaskBuilder_; } - @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.admin.database.v1.UpdateBackupRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequestOrBuilder.java index e2670913f2c..a2da879952b 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface UpdateBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.UpdateBackupRequest) @@ -31,7 +33,7 @@ public interface UpdateBackupRequestOrBuilder * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -49,7 +51,7 @@ public interface UpdateBackupRequestOrBuilder * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * @@ -67,7 +69,7 @@ public interface UpdateBackupRequestOrBuilder * Required. The backup to update. `backup.name`, and the fields to be updated * as specified by `update_mask` are required. Other fields are ignored. * Update is only supported for the following fields: - * * `backup.expire_time`. + * * `backup.expire_time`. * * * diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupScheduleRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupScheduleRequest.java index ad97c05f920..3bf7251dba3 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupScheduleRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupScheduleRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.database.v1.UpdateBackupScheduleRequest} */ -public final class UpdateBackupScheduleRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateBackupScheduleRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.UpdateBackupScheduleRequest) UpdateBackupScheduleRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateBackupScheduleRequest"); + } + // Use UpdateBackupScheduleRequest.newBuilder() to construct. - private UpdateBackupScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateBackupScheduleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateBackupScheduleRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateBackupScheduleRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_UpdateBackupScheduleRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_UpdateBackupScheduleRequest_fieldAccessorTable @@ -313,38 +319,38 @@ public static com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest p public static com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateBackupScheduleRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -368,7 +374,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -383,7 +389,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.UpdateBackupScheduleRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.UpdateBackupScheduleRequest) com.google.spanner.admin.database.v1.UpdateBackupScheduleRequestOrBuilder { @@ -393,7 +399,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.BackupScheduleProto .internal_static_google_spanner_admin_database_v1_UpdateBackupScheduleRequest_fieldAccessorTable @@ -407,15 +413,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBackupScheduleFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupScheduleFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -484,39 +490,6 @@ private void buildPartial0( 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.admin.database.v1.UpdateBackupScheduleRequest) { @@ -566,13 +539,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getBackupScheduleFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBackupScheduleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -596,7 +571,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.database.v1.BackupSchedule backupSchedule_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupSchedule, com.google.spanner.admin.database.v1.BackupSchedule.Builder, com.google.spanner.admin.database.v1.BackupScheduleOrBuilder> @@ -771,7 +746,7 @@ public Builder clearBackupSchedule() { public com.google.spanner.admin.database.v1.BackupSchedule.Builder getBackupScheduleBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getBackupScheduleFieldBuilder().getBuilder(); + return internalGetBackupScheduleFieldBuilder().getBuilder(); } /** @@ -811,14 +786,14 @@ public com.google.spanner.admin.database.v1.BackupSchedule.Builder getBackupSche * .google.spanner.admin.database.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupSchedule, com.google.spanner.admin.database.v1.BackupSchedule.Builder, com.google.spanner.admin.database.v1.BackupScheduleOrBuilder> - getBackupScheduleFieldBuilder() { + internalGetBackupScheduleFieldBuilder() { if (backupScheduleBuilder_ == null) { backupScheduleBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.BackupSchedule, com.google.spanner.admin.database.v1.BackupSchedule.Builder, com.google.spanner.admin.database.v1.BackupScheduleOrBuilder>( @@ -829,7 +804,7 @@ public com.google.spanner.admin.database.v1.BackupSchedule.Builder getBackupSche } private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> @@ -1009,7 +984,7 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } /** @@ -1050,14 +1025,14 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { + internalGetUpdateMaskFieldBuilder() { if (updateMaskBuilder_ == null) { updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -1067,17 +1042,6 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return updateMaskBuilder_; } - @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.admin.database.v1.UpdateBackupScheduleRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupScheduleRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupScheduleRequestOrBuilder.java index 1d75814b571..5c5a21cfb35 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupScheduleRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateBackupScheduleRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/backup_schedule.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface UpdateBackupScheduleRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.UpdateBackupScheduleRequest) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadata.java index 64967052c71..03acaaf5a75 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata} */ -public final class UpdateDatabaseDdlMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateDatabaseDdlMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata) UpdateDatabaseDdlMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateDatabaseDdlMetadata"); + } + // Use UpdateDatabaseDdlMetadata.newBuilder() to construct. - private UpdateDatabaseDdlMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateDatabaseDdlMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +60,13 @@ private UpdateDatabaseDdlMetadata() { actions_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateDatabaseDdlMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlMetadata_fieldAccessorTable @@ -506,11 +512,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } for (int i = 0; i < statements_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, statements_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, statements_.getRaw(i)); } for (int i = 0; i < commitTimestamps_.size(); i++) { output.writeMessage(3, commitTimestamps_.get(i)); @@ -533,8 +539,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } { int dataSize = 0; @@ -651,38 +657,38 @@ public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata par public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -706,7 +712,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -721,7 +727,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata) com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadataOrBuilder { @@ -731,7 +737,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlMetadata_fieldAccessorTable @@ -743,7 +749,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -857,39 +863,6 @@ private void buildPartial0( } } - @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.admin.database.v1.UpdateDatabaseDdlMetadata) { @@ -938,8 +911,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.UpdateDatabaseDdlM commitTimestamps_ = other.commitTimestamps_; bitField0_ = (bitField0_ & ~0x00000004); commitTimestampsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getCommitTimestampsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCommitTimestampsFieldBuilder() : null; } else { commitTimestampsBuilder_.addAllMessages(other.commitTimestamps_); @@ -968,8 +941,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.UpdateDatabaseDdlM progress_ = other.progress_; bitField0_ = (bitField0_ & ~0x00000010); progressBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getProgressFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetProgressFieldBuilder() : null; } else { progressBuilder_.addAllMessages(other.progress_); @@ -995,8 +968,8 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.UpdateDatabaseDdlM actions_ = other.actions_; bitField0_ = (bitField0_ & ~0x00000020); actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getActionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetActionsFieldBuilder() : null; } else { actionsBuilder_.addAllMessages(other.actions_); @@ -1421,7 +1394,7 @@ private void ensureCommitTimestampsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1706,7 +1679,7 @@ public Builder removeCommitTimestamps(int index) { * repeated .google.protobuf.Timestamp commit_timestamps = 3; */ public com.google.protobuf.Timestamp.Builder getCommitTimestampsBuilder(int index) { - return getCommitTimestampsFieldBuilder().getBuilder(index); + return internalGetCommitTimestampsFieldBuilder().getBuilder(index); } /** @@ -1760,7 +1733,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampsOrBuilder(int i * repeated .google.protobuf.Timestamp commit_timestamps = 3; */ public com.google.protobuf.Timestamp.Builder addCommitTimestampsBuilder() { - return getCommitTimestampsFieldBuilder() + return internalGetCommitTimestampsFieldBuilder() .addBuilder(com.google.protobuf.Timestamp.getDefaultInstance()); } @@ -1776,7 +1749,7 @@ public com.google.protobuf.Timestamp.Builder addCommitTimestampsBuilder() { * repeated .google.protobuf.Timestamp commit_timestamps = 3; */ public com.google.protobuf.Timestamp.Builder addCommitTimestampsBuilder(int index) { - return getCommitTimestampsFieldBuilder() + return internalGetCommitTimestampsFieldBuilder() .addBuilder(index, com.google.protobuf.Timestamp.getDefaultInstance()); } @@ -1792,17 +1765,17 @@ public com.google.protobuf.Timestamp.Builder addCommitTimestampsBuilder(int inde * repeated .google.protobuf.Timestamp commit_timestamps = 3; */ public java.util.List getCommitTimestampsBuilderList() { - return getCommitTimestampsFieldBuilder().getBuilderList(); + return internalGetCommitTimestampsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCommitTimestampsFieldBuilder() { + internalGetCommitTimestampsFieldBuilder() { if (commitTimestampsBuilder_ == null) { commitTimestampsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1889,7 +1862,7 @@ private void ensureProgressIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> @@ -2232,7 +2205,7 @@ public Builder removeProgress(int index) { */ public com.google.spanner.admin.database.v1.OperationProgress.Builder getProgressBuilder( int index) { - return getProgressFieldBuilder().getBuilder(index); + return internalGetProgressFieldBuilder().getBuilder(index); } /** @@ -2299,7 +2272,7 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre * repeated .google.spanner.admin.database.v1.OperationProgress progress = 5; */ public com.google.spanner.admin.database.v1.OperationProgress.Builder addProgressBuilder() { - return getProgressFieldBuilder() + return internalGetProgressFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.OperationProgress.getDefaultInstance()); } @@ -2320,7 +2293,7 @@ public com.google.spanner.admin.database.v1.OperationProgress.Builder addProgres */ public com.google.spanner.admin.database.v1.OperationProgress.Builder addProgressBuilder( int index) { - return getProgressFieldBuilder() + return internalGetProgressFieldBuilder() .addBuilder( index, com.google.spanner.admin.database.v1.OperationProgress.getDefaultInstance()); } @@ -2342,17 +2315,17 @@ public com.google.spanner.admin.database.v1.OperationProgress.Builder addProgres */ public java.util.List getProgressBuilderList() { - return getProgressFieldBuilder().getBuilderList(); + return internalGetProgressFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder>( @@ -2374,7 +2347,7 @@ private void ensureActionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.DdlStatementActionInfo, com.google.spanner.admin.database.v1.DdlStatementActionInfo.Builder, com.google.spanner.admin.database.v1.DdlStatementActionInfoOrBuilder> @@ -2654,7 +2627,7 @@ public Builder removeActions(int index) { */ public com.google.spanner.admin.database.v1.DdlStatementActionInfo.Builder getActionsBuilder( int index) { - return getActionsFieldBuilder().getBuilder(index); + return internalGetActionsFieldBuilder().getBuilder(index); } /** @@ -2707,7 +2680,7 @@ public com.google.spanner.admin.database.v1.DdlStatementActionInfoOrBuilder getA * repeated .google.spanner.admin.database.v1.DdlStatementActionInfo actions = 6; */ public com.google.spanner.admin.database.v1.DdlStatementActionInfo.Builder addActionsBuilder() { - return getActionsFieldBuilder() + return internalGetActionsFieldBuilder() .addBuilder( com.google.spanner.admin.database.v1.DdlStatementActionInfo.getDefaultInstance()); } @@ -2724,7 +2697,7 @@ public com.google.spanner.admin.database.v1.DdlStatementActionInfo.Builder addAc */ public com.google.spanner.admin.database.v1.DdlStatementActionInfo.Builder addActionsBuilder( int index) { - return getActionsFieldBuilder() + return internalGetActionsFieldBuilder() .addBuilder( index, com.google.spanner.admin.database.v1.DdlStatementActionInfo.getDefaultInstance()); @@ -2742,17 +2715,17 @@ public com.google.spanner.admin.database.v1.DdlStatementActionInfo.Builder addAc */ public java.util.List getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); + return internalGetActionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.DdlStatementActionInfo, com.google.spanner.admin.database.v1.DdlStatementActionInfo.Builder, com.google.spanner.admin.database.v1.DdlStatementActionInfoOrBuilder> - getActionsFieldBuilder() { + internalGetActionsFieldBuilder() { if (actionsBuilder_ == null) { actionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.DdlStatementActionInfo, com.google.spanner.admin.database.v1.DdlStatementActionInfo.Builder, com.google.spanner.admin.database.v1.DdlStatementActionInfoOrBuilder>( @@ -2762,17 +2735,6 @@ public com.google.spanner.admin.database.v1.DdlStatementActionInfo.Builder addAc return actionsBuilder_; } - @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.admin.database.v1.UpdateDatabaseDdlMetadata) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadataOrBuilder.java index 026273ff43d..fa89da04418 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface UpdateDatabaseDdlMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java index b278ec85754..f93eacb8c0f 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -43,14 +44,25 @@ * * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseDdlRequest} */ -public final class UpdateDatabaseDdlRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateDatabaseDdlRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest) UpdateDatabaseDdlRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateDatabaseDdlRequest"); + } + // Use UpdateDatabaseDdlRequest.newBuilder() to construct. - private UpdateDatabaseDdlRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateDatabaseDdlRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -61,19 +73,13 @@ private UpdateDatabaseDdlRequest() { protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateDatabaseDdlRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlRequest_fieldAccessorTable @@ -315,9 +321,9 @@ public com.google.protobuf.ByteString getOperationIdBytes() { * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). @@ -367,14 +373,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } for (int i = 0; i < statements_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, statements_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, statements_.getRaw(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, operationId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, operationId_); } if (!protoDescriptors_.isEmpty()) { output.writeBytes(4, protoDescriptors_); @@ -391,8 +397,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } { int dataSize = 0; @@ -402,8 +408,8 @@ public int getSerializedSize() { size += dataSize; size += 1 * getStatementsList().size(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, operationId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operationId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, operationId_); } if (!protoDescriptors_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, protoDescriptors_); @@ -497,38 +503,38 @@ public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest pars public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -552,7 +558,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -581,7 +587,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseDdlRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest) com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequestOrBuilder { @@ -591,7 +597,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseDdlRequest_fieldAccessorTable @@ -603,7 +609,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -672,39 +678,6 @@ private void buildPartial0( } } - @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.admin.database.v1.UpdateDatabaseDdlRequest) { @@ -739,7 +712,7 @@ public Builder mergeFrom(com.google.spanner.admin.database.v1.UpdateDatabaseDdlR bitField0_ |= 0x00000004; onChanged(); } - if (other.getProtoDescriptors() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getProtoDescriptors().isEmpty()) { setProtoDescriptors(other.getProtoDescriptors()); } if (other.getThroughputMode() != false) { @@ -1350,9 +1323,9 @@ public Builder setOperationIdBytes(com.google.protobuf.ByteString value) { * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). @@ -1379,9 +1352,9 @@ public com.google.protobuf.ByteString getProtoDescriptors() { * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). @@ -1414,9 +1387,9 @@ public Builder setProtoDescriptors(com.google.protobuf.ByteString value) { * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). @@ -1495,17 +1468,6 @@ public Builder clearThroughputMode() { 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.admin.database.v1.UpdateDatabaseDdlRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java index 62a9784dac3..c73ee6b7d80 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseDdlRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface UpdateDatabaseDdlRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.UpdateDatabaseDdlRequest) @@ -186,9 +188,9 @@ public interface UpdateDatabaseDdlRequestOrBuilder * to generate for moon/shot/app.proto, run * ``` * $protoc --proto_path=/app_path --proto_path=/lib_path \ - * --include_imports \ - * --descriptor_set_out=descriptors.data \ - * moon/shot/app.proto + * --include_imports \ + * --descriptor_set_out=descriptors.data \ + * moon/shot/app.proto * ``` * For more details, see protobuffer [self * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadata.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadata.java index 827ca8cc45a..a9b17bd93f7 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadata.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseMetadata} */ -public final class UpdateDatabaseMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateDatabaseMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.UpdateDatabaseMetadata) UpdateDatabaseMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateDatabaseMetadata"); + } + // Use UpdateDatabaseMetadata.newBuilder() to construct. - private UpdateDatabaseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateDatabaseMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateDatabaseMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateDatabaseMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_fieldAccessorTable @@ -365,38 +371,38 @@ public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseF public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -420,7 +426,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -435,7 +441,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.UpdateDatabaseMetadata) com.google.spanner.admin.database.v1.UpdateDatabaseMetadataOrBuilder { @@ -445,7 +451,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseMetadata_fieldAccessorTable @@ -459,16 +465,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRequestFieldBuilder(); - getProgressFieldBuilder(); - getCancelTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRequestFieldBuilder(); + internalGetProgressFieldBuilder(); + internalGetCancelTimeFieldBuilder(); } } @@ -543,39 +549,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.UpdateDatabaseMe 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.admin.database.v1.UpdateDatabaseMetadata) { @@ -626,19 +599,21 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -662,7 +637,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.database.v1.UpdateDatabaseRequest request_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.UpdateDatabaseRequest, com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder, com.google.spanner.admin.database.v1.UpdateDatabaseRequestOrBuilder> @@ -817,7 +792,7 @@ public Builder clearRequest() { public com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder getRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getRequestFieldBuilder().getBuilder(); + return internalGetRequestFieldBuilder().getBuilder(); } /** @@ -851,14 +826,14 @@ public com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder getReq * * .google.spanner.admin.database.v1.UpdateDatabaseRequest request = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.UpdateDatabaseRequest, com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder, com.google.spanner.admin.database.v1.UpdateDatabaseRequestOrBuilder> - getRequestFieldBuilder() { + internalGetRequestFieldBuilder() { if (requestBuilder_ == null) { requestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.UpdateDatabaseRequest, com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder, com.google.spanner.admin.database.v1.UpdateDatabaseRequestOrBuilder>( @@ -869,7 +844,7 @@ public com.google.spanner.admin.database.v1.UpdateDatabaseRequest.Builder getReq } private com.google.spanner.admin.database.v1.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> @@ -1030,7 +1005,7 @@ public Builder clearProgress() { public com.google.spanner.admin.database.v1.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } /** @@ -1065,14 +1040,14 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre * * .google.spanner.admin.database.v1.OperationProgress progress = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.OperationProgress, com.google.spanner.admin.database.v1.OperationProgress.Builder, com.google.spanner.admin.database.v1.OperationProgressOrBuilder>( @@ -1083,7 +1058,7 @@ public com.google.spanner.admin.database.v1.OperationProgressOrBuilder getProgre } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1235,7 +1210,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1268,14 +1243,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1285,17 +1260,6 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { return cancelTimeBuilder_; } - @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.admin.database.v1.UpdateDatabaseMetadata) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadataOrBuilder.java index 8b3529821cb..671e4cf94f5 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface UpdateDatabaseMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.UpdateDatabaseMetadata) diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java index 4de08376235..a0d0ea155f5 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseRequest} */ -public final class UpdateDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateDatabaseRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.database.v1.UpdateDatabaseRequest) UpdateDatabaseRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateDatabaseRequest"); + } + // Use UpdateDatabaseRequest.newBuilder() to construct. - private UpdateDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateDatabaseRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateDatabaseRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateDatabaseRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_fieldAccessorTable @@ -304,38 +310,38 @@ public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFr public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.database.v1.UpdateDatabaseRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -359,7 +365,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -374,7 +380,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.database.v1.UpdateDatabaseRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.database.v1.UpdateDatabaseRequest) com.google.spanner.admin.database.v1.UpdateDatabaseRequestOrBuilder { @@ -384,7 +390,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto .internal_static_google_spanner_admin_database_v1_UpdateDatabaseRequest_fieldAccessorTable @@ -398,15 +404,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDatabaseFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDatabaseFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -472,39 +478,6 @@ private void buildPartial0(com.google.spanner.admin.database.v1.UpdateDatabaseRe 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.admin.database.v1.UpdateDatabaseRequest) { @@ -552,13 +525,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getDatabaseFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetDatabaseFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -582,7 +557,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.database.v1.Database database_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder> @@ -756,7 +731,7 @@ public Builder clearDatabase() { public com.google.spanner.admin.database.v1.Database.Builder getDatabaseBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getDatabaseFieldBuilder().getBuilder(); + return internalGetDatabaseFieldBuilder().getBuilder(); } /** @@ -795,14 +770,14 @@ public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuild * .google.spanner.admin.database.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder> - getDatabaseFieldBuilder() { + internalGetDatabaseFieldBuilder() { if (databaseBuilder_ == null) { databaseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder>( @@ -813,7 +788,7 @@ public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuild } private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> @@ -972,7 +947,7 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } /** @@ -1007,14 +982,14 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { + internalGetUpdateMaskFieldBuilder() { if (updateMaskBuilder_ == null) { updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -1024,17 +999,6 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return updateMaskBuilder_; } - @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.admin.database.v1.UpdateDatabaseRequest) } diff --git a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequestOrBuilder.java b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequestOrBuilder.java index 77c5cccf744..1fe594d8c05 100644 --- a/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-database-v1/src/main/java/com/google/spanner/admin/database/v1/UpdateDatabaseRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/database/v1/spanner_database_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.database.v1; +@com.google.protobuf.Generated public interface UpdateDatabaseRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.database.v1.UpdateDatabaseRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/clirr-ignored-differences.xml b/proto-google-cloud-spanner-admin-instance-v1/clirr-ignored-differences.xml index fa9181b755b..7236471b371 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/clirr-ignored-differences.xml +++ b/proto-google-cloud-spanner-admin-instance-v1/clirr-ignored-differences.xml @@ -17,7 +17,63 @@ boolean has*(*) - + + + + 5001 + com/google/spanner/admin/instance/v1/* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/admin/instance/v1/*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/admin/instance/v1/*$* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/admin/instance/v1/*$*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/admin/instance/v1/*$*$* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/admin/instance/v1/*$*$*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/admin/instance/v1/*Proto + com/google/protobuf/GeneratedFile + + + + 7005 + com/google/spanner/admin/instance/v1/** + * newBuilderForType(*) + ** + + + + 7006 + com/google/spanner/admin/instance/v1/** + * internalGetFieldAccessorTable() + ** + + + + 7014 + com/google/spanner/admin/instance/v1/** + * getDescriptor() + 7006 com/google/spanner/admin/instance/v1/** diff --git a/proto-google-cloud-spanner-admin-instance-v1/pom.xml b/proto-google-cloud-spanner-admin-instance-v1/pom.xml index db7dfb3a20d..b921024b950 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/pom.xml +++ b/proto-google-cloud-spanner-admin-instance-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-spanner-admin-instance-v1 - 6.102.1 + 6.113.1-SNAPSHOT proto-google-cloud-spanner-admin-instance-v1 PROTO library for proto-google-cloud-spanner-admin-instance-v1 com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfig.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfig.java index f7ef3d62bea..01e307104c7 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfig.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig} */ -public final class AutoscalingConfig extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AutoscalingConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig) AutoscalingConfigOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AutoscalingConfig"); + } + // Use AutoscalingConfig.newBuilder() to construct. - private AutoscalingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AutoscalingConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private AutoscalingConfig() { asymmetricAutoscalingOptions_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AutoscalingConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_fieldAccessorTable @@ -203,32 +209,36 @@ public interface AutoscalingLimitsOrBuilder * * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits} */ - public static final class AutoscalingLimits extends com.google.protobuf.GeneratedMessageV3 + public static final class AutoscalingLimits extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) AutoscalingLimitsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AutoscalingLimits"); + } + // Use AutoscalingLimits.newBuilder() to construct. - private AutoscalingLimits(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AutoscalingLimits(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AutoscalingLimits() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AutoscalingLimits(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_fieldAccessorTable @@ -670,33 +680,33 @@ public int hashCode() { public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits @@ -704,7 +714,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -728,8 +738,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -747,8 +756,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder { @@ -758,7 +766,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_fieldAccessorTable @@ -772,7 +780,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -836,41 +844,6 @@ private void buildPartialOneofs( result.maxLimit_ = this.maxLimit_; } - @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 @@ -1329,18 +1302,6 @@ public Builder clearMaxProcessingUnits() { 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.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) } @@ -1406,20 +1367,43 @@ public interface AutoscalingTargetsOrBuilder * * *

-     * Required. The target high priority cpu utilization percentage that the
+     * Optional. The target high priority cpu utilization percentage that the
      * autoscaler should be trying to achieve for the instance. This number is
      * on a scale from 0 (no utilization) to 100 (full utilization). The valid
-     * range is [10, 90] inclusive.
+     * range is [10, 90] inclusive. If not specified or set to 0, the autoscaler
+     * skips scaling based on high priority CPU utilization.
      * 
* * - * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = REQUIRED]; + * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The highPriorityCpuUtilizationPercent. */ int getHighPriorityCpuUtilizationPercent(); + /** + * + * + *
+     * Optional. The target total CPU utilization percentage that the autoscaler
+     * should be trying to achieve for the instance. This number is on a scale
+     * from 0 (no utilization) to 100 (full utilization). The valid range is
+     * [10, 90] inclusive. If not specified or set to 0, the autoscaler skips
+     * scaling based on total CPU utilization. If both
+     * `high_priority_cpu_utilization_percent` and
+     * `total_cpu_utilization_percent` are specified, the autoscaler provisions
+     * the larger of the two required compute capacities to satisfy both
+     * targets.
+     * 
+ * + * int32 total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The totalCpuUtilizationPercent. + */ + int getTotalCpuUtilizationPercent(); + /** * * @@ -1446,32 +1430,36 @@ public interface AutoscalingTargetsOrBuilder * * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets} */ - public static final class AutoscalingTargets extends com.google.protobuf.GeneratedMessageV3 + public static final class AutoscalingTargets extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) AutoscalingTargetsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AutoscalingTargets"); + } + // Use AutoscalingTargets.newBuilder() to construct. - private AutoscalingTargets(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AutoscalingTargets(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AutoscalingTargets() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AutoscalingTargets(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_fieldAccessorTable @@ -1488,14 +1476,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * Required. The target high priority cpu utilization percentage that the
+     * Optional. The target high priority cpu utilization percentage that the
      * autoscaler should be trying to achieve for the instance. This number is
      * on a scale from 0 (no utilization) to 100 (full utilization). The valid
-     * range is [10, 90] inclusive.
+     * range is [10, 90] inclusive. If not specified or set to 0, the autoscaler
+     * skips scaling based on high priority CPU utilization.
      * 
* * - * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = REQUIRED]; + * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The highPriorityCpuUtilizationPercent. @@ -1505,6 +1494,34 @@ public int getHighPriorityCpuUtilizationPercent() { return highPriorityCpuUtilizationPercent_; } + public static final int TOTAL_CPU_UTILIZATION_PERCENT_FIELD_NUMBER = 4; + private int totalCpuUtilizationPercent_ = 0; + + /** + * + * + *
+     * Optional. The target total CPU utilization percentage that the autoscaler
+     * should be trying to achieve for the instance. This number is on a scale
+     * from 0 (no utilization) to 100 (full utilization). The valid range is
+     * [10, 90] inclusive. If not specified or set to 0, the autoscaler skips
+     * scaling based on total CPU utilization. If both
+     * `high_priority_cpu_utilization_percent` and
+     * `total_cpu_utilization_percent` are specified, the autoscaler provisions
+     * the larger of the two required compute capacities to satisfy both
+     * targets.
+     * 
+ * + * int32 total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The totalCpuUtilizationPercent. + */ + @java.lang.Override + public int getTotalCpuUtilizationPercent() { + return totalCpuUtilizationPercent_; + } + public static final int STORAGE_UTILIZATION_PERCENT_FIELD_NUMBER = 2; private int storageUtilizationPercent_ = 0; @@ -1547,6 +1564,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (storageUtilizationPercent_ != 0) { output.writeInt32(2, storageUtilizationPercent_); } + if (totalCpuUtilizationPercent_ != 0) { + output.writeInt32(4, totalCpuUtilizationPercent_); + } getUnknownFields().writeTo(output); } @@ -1565,6 +1585,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, storageUtilizationPercent_); } + if (totalCpuUtilizationPercent_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(4, totalCpuUtilizationPercent_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1584,6 +1608,7 @@ public boolean equals(final java.lang.Object obj) { if (getHighPriorityCpuUtilizationPercent() != other.getHighPriorityCpuUtilizationPercent()) return false; + if (getTotalCpuUtilizationPercent() != other.getTotalCpuUtilizationPercent()) return false; if (getStorageUtilizationPercent() != other.getStorageUtilizationPercent()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -1598,6 +1623,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + HIGH_PRIORITY_CPU_UTILIZATION_PERCENT_FIELD_NUMBER; hash = (53 * hash) + getHighPriorityCpuUtilizationPercent(); + hash = (37 * hash) + TOTAL_CPU_UTILIZATION_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getTotalCpuUtilizationPercent(); hash = (37 * hash) + STORAGE_UTILIZATION_PERCENT_FIELD_NUMBER; hash = (53 * hash) + getStorageUtilizationPercent(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -1645,33 +1672,33 @@ public int hashCode() { public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets @@ -1679,7 +1706,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1703,8 +1730,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1718,8 +1744,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder { @@ -1729,7 +1754,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_fieldAccessorTable @@ -1743,7 +1768,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1752,6 +1777,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; highPriorityCpuUtilizationPercent_ = 0; + totalCpuUtilizationPercent_ = 0; storageUtilizationPercent_ = 0; return this; } @@ -1798,45 +1824,13 @@ private void buildPartial0( result.highPriorityCpuUtilizationPercent_ = highPriorityCpuUtilizationPercent_; } if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalCpuUtilizationPercent_ = totalCpuUtilizationPercent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { result.storageUtilizationPercent_ = storageUtilizationPercent_; } } - @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 @@ -1857,6 +1851,9 @@ public Builder mergeFrom( if (other.getHighPriorityCpuUtilizationPercent() != 0) { setHighPriorityCpuUtilizationPercent(other.getHighPriorityCpuUtilizationPercent()); } + if (other.getTotalCpuUtilizationPercent() != 0) { + setTotalCpuUtilizationPercent(other.getTotalCpuUtilizationPercent()); + } if (other.getStorageUtilizationPercent() != 0) { setStorageUtilizationPercent(other.getStorageUtilizationPercent()); } @@ -1895,9 +1892,15 @@ public Builder mergeFrom( case 16: { storageUtilizationPercent_ = input.readInt32(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 16 + case 32: + { + totalCpuUtilizationPercent_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1923,14 +1926,15 @@ public Builder mergeFrom( * * *
-       * Required. The target high priority cpu utilization percentage that the
+       * Optional. The target high priority cpu utilization percentage that the
        * autoscaler should be trying to achieve for the instance. This number is
        * on a scale from 0 (no utilization) to 100 (full utilization). The valid
-       * range is [10, 90] inclusive.
+       * range is [10, 90] inclusive. If not specified or set to 0, the autoscaler
+       * skips scaling based on high priority CPU utilization.
        * 
* * - * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = REQUIRED]; + * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The highPriorityCpuUtilizationPercent. @@ -1944,14 +1948,15 @@ public int getHighPriorityCpuUtilizationPercent() { * * *
-       * Required. The target high priority cpu utilization percentage that the
+       * Optional. The target high priority cpu utilization percentage that the
        * autoscaler should be trying to achieve for the instance. This number is
        * on a scale from 0 (no utilization) to 100 (full utilization). The valid
-       * range is [10, 90] inclusive.
+       * range is [10, 90] inclusive. If not specified or set to 0, the autoscaler
+       * skips scaling based on high priority CPU utilization.
        * 
* * - * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = REQUIRED]; + * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The highPriorityCpuUtilizationPercent to set. @@ -1969,14 +1974,15 @@ public Builder setHighPriorityCpuUtilizationPercent(int value) { * * *
-       * Required. The target high priority cpu utilization percentage that the
+       * Optional. The target high priority cpu utilization percentage that the
        * autoscaler should be trying to achieve for the instance. This number is
        * on a scale from 0 (no utilization) to 100 (full utilization). The valid
-       * range is [10, 90] inclusive.
+       * range is [10, 90] inclusive. If not specified or set to 0, the autoscaler
+       * skips scaling based on high priority CPU utilization.
        * 
* * - * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = REQUIRED]; + * int32 high_priority_cpu_utilization_percent = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. @@ -1988,6 +1994,89 @@ public Builder clearHighPriorityCpuUtilizationPercent() { return this; } + private int totalCpuUtilizationPercent_; + + /** + * + * + *
+       * Optional. The target total CPU utilization percentage that the autoscaler
+       * should be trying to achieve for the instance. This number is on a scale
+       * from 0 (no utilization) to 100 (full utilization). The valid range is
+       * [10, 90] inclusive. If not specified or set to 0, the autoscaler skips
+       * scaling based on total CPU utilization. If both
+       * `high_priority_cpu_utilization_percent` and
+       * `total_cpu_utilization_percent` are specified, the autoscaler provisions
+       * the larger of the two required compute capacities to satisfy both
+       * targets.
+       * 
+ * + * int32 total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The totalCpuUtilizationPercent. + */ + @java.lang.Override + public int getTotalCpuUtilizationPercent() { + return totalCpuUtilizationPercent_; + } + + /** + * + * + *
+       * Optional. The target total CPU utilization percentage that the autoscaler
+       * should be trying to achieve for the instance. This number is on a scale
+       * from 0 (no utilization) to 100 (full utilization). The valid range is
+       * [10, 90] inclusive. If not specified or set to 0, the autoscaler skips
+       * scaling based on total CPU utilization. If both
+       * `high_priority_cpu_utilization_percent` and
+       * `total_cpu_utilization_percent` are specified, the autoscaler provisions
+       * the larger of the two required compute capacities to satisfy both
+       * targets.
+       * 
+ * + * int32 total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The totalCpuUtilizationPercent to set. + * @return This builder for chaining. + */ + public Builder setTotalCpuUtilizationPercent(int value) { + + totalCpuUtilizationPercent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The target total CPU utilization percentage that the autoscaler
+       * should be trying to achieve for the instance. This number is on a scale
+       * from 0 (no utilization) to 100 (full utilization). The valid range is
+       * [10, 90] inclusive. If not specified or set to 0, the autoscaler skips
+       * scaling based on total CPU utilization. If both
+       * `high_priority_cpu_utilization_percent` and
+       * `total_cpu_utilization_percent` are specified, the autoscaler provisions
+       * the larger of the two required compute capacities to satisfy both
+       * targets.
+       * 
+ * + * int32 total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTotalCpuUtilizationPercent() { + bitField0_ = (bitField0_ & ~0x00000002); + totalCpuUtilizationPercent_ = 0; + onChanged(); + return this; + } + private int storageUtilizationPercent_; /** @@ -2029,7 +2118,7 @@ public int getStorageUtilizationPercent() { public Builder setStorageUtilizationPercent(int value) { storageUtilizationPercent_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2050,24 +2139,12 @@ public Builder setStorageUtilizationPercent(int value) { * @return This builder for chaining. */ public Builder clearStorageUtilizationPercent() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); storageUtilizationPercent_ = 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.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) } @@ -2237,33 +2314,36 @@ public interface AsymmetricAutoscalingOptionOrBuilder * Protobuf type {@code * google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption} */ - public static final class AsymmetricAutoscalingOption - extends com.google.protobuf.GeneratedMessageV3 + public static final class AsymmetricAutoscalingOption extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) AsymmetricAutoscalingOptionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AsymmetricAutoscalingOption"); + } + // Use AsymmetricAutoscalingOption.newBuilder() to construct. - private AsymmetricAutoscalingOption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AsymmetricAutoscalingOption(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AsymmetricAutoscalingOption() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AsymmetricAutoscalingOption(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_fieldAccessorTable @@ -2343,6 +2423,92 @@ public interface AutoscalingConfigOverridesOrBuilder * @return The autoscalingTargetHighPriorityCpuUtilizationPercent. */ int getAutoscalingTargetHighPriorityCpuUtilizationPercent(); + + /** + * + * + *
+       * Optional. If specified, overrides the
+       * autoscaling target `total_cpu_utilization_percent`
+       * in the top-level autoscaling configuration for the selected replicas.
+       * 
+ * + * + * int32 autoscaling_target_total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingTargetTotalCpuUtilizationPercent. + */ + int getAutoscalingTargetTotalCpuUtilizationPercent(); + + /** + * + * + *
+       * Optional. If true, disables high priority CPU autoscaling for the
+       * selected replicas and ignores
+       * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+       * in the top-level autoscaling configuration.
+       *
+       * When setting this field to true, setting
+       * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+       * field to a non-zero value for the same replica is not supported.
+       *
+       * If false, the
+       * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+       * field in the replica will be used if set to a non-zero value.
+       * Otherwise, the
+       * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+       * field in the top-level autoscaling configuration will be used.
+       *
+       * Setting both
+       * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+       * and
+       * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+       * to true for the same replica is not supported.
+       * 
+ * + * + * bool disable_high_priority_cpu_autoscaling = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableHighPriorityCpuAutoscaling. + */ + boolean getDisableHighPriorityCpuAutoscaling(); + + /** + * + * + *
+       * Optional. If true, disables total CPU autoscaling for the selected
+       * replicas and ignores
+       * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+       * in the top-level autoscaling configuration.
+       *
+       * When setting this field to true, setting
+       * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+       * field to a non-zero value for the same replica is not supported.
+       *
+       * If false, the
+       * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+       * field in the replica will be used if set to a non-zero value.
+       * Otherwise, the
+       * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+       * field in the top-level autoscaling configuration will be used.
+       *
+       * Setting both
+       * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+       * and
+       * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+       * to true for the same replica is not supported.
+       * 
+ * + * bool disable_total_cpu_autoscaling = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableTotalCpuAutoscaling. + */ + boolean getDisableTotalCpuAutoscaling(); } /** @@ -2359,33 +2525,36 @@ public interface AutoscalingConfigOverridesOrBuilder * google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides} */ public static final class AutoscalingConfigOverrides - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides) AutoscalingConfigOverridesOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AutoscalingConfigOverrides"); + } + // Use AutoscalingConfigOverrides.newBuilder() to construct. - private AutoscalingConfigOverrides( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AutoscalingConfigOverrides(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AutoscalingConfigOverrides() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AutoscalingConfigOverrides(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_fieldAccessorTable @@ -2488,6 +2657,110 @@ public int getAutoscalingTargetHighPriorityCpuUtilizationPercent() { return autoscalingTargetHighPriorityCpuUtilizationPercent_; } + public static final int AUTOSCALING_TARGET_TOTAL_CPU_UTILIZATION_PERCENT_FIELD_NUMBER = 4; + private int autoscalingTargetTotalCpuUtilizationPercent_ = 0; + + /** + * + * + *
+       * Optional. If specified, overrides the
+       * autoscaling target `total_cpu_utilization_percent`
+       * in the top-level autoscaling configuration for the selected replicas.
+       * 
+ * + * + * int32 autoscaling_target_total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingTargetTotalCpuUtilizationPercent. + */ + @java.lang.Override + public int getAutoscalingTargetTotalCpuUtilizationPercent() { + return autoscalingTargetTotalCpuUtilizationPercent_; + } + + public static final int DISABLE_HIGH_PRIORITY_CPU_AUTOSCALING_FIELD_NUMBER = 5; + private boolean disableHighPriorityCpuAutoscaling_ = false; + + /** + * + * + *
+       * Optional. If true, disables high priority CPU autoscaling for the
+       * selected replicas and ignores
+       * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+       * in the top-level autoscaling configuration.
+       *
+       * When setting this field to true, setting
+       * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+       * field to a non-zero value for the same replica is not supported.
+       *
+       * If false, the
+       * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+       * field in the replica will be used if set to a non-zero value.
+       * Otherwise, the
+       * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+       * field in the top-level autoscaling configuration will be used.
+       *
+       * Setting both
+       * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+       * and
+       * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+       * to true for the same replica is not supported.
+       * 
+ * + * + * bool disable_high_priority_cpu_autoscaling = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableHighPriorityCpuAutoscaling. + */ + @java.lang.Override + public boolean getDisableHighPriorityCpuAutoscaling() { + return disableHighPriorityCpuAutoscaling_; + } + + public static final int DISABLE_TOTAL_CPU_AUTOSCALING_FIELD_NUMBER = 6; + private boolean disableTotalCpuAutoscaling_ = false; + + /** + * + * + *
+       * Optional. If true, disables total CPU autoscaling for the selected
+       * replicas and ignores
+       * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+       * in the top-level autoscaling configuration.
+       *
+       * When setting this field to true, setting
+       * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+       * field to a non-zero value for the same replica is not supported.
+       *
+       * If false, the
+       * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+       * field in the replica will be used if set to a non-zero value.
+       * Otherwise, the
+       * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+       * field in the top-level autoscaling configuration will be used.
+       *
+       * Setting both
+       * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+       * and
+       * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+       * to true for the same replica is not supported.
+       * 
+ * + * bool disable_total_cpu_autoscaling = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableTotalCpuAutoscaling. + */ + @java.lang.Override + public boolean getDisableTotalCpuAutoscaling() { + return disableTotalCpuAutoscaling_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2508,6 +2781,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (autoscalingTargetHighPriorityCpuUtilizationPercent_ != 0) { output.writeInt32(2, autoscalingTargetHighPriorityCpuUtilizationPercent_); } + if (autoscalingTargetTotalCpuUtilizationPercent_ != 0) { + output.writeInt32(4, autoscalingTargetTotalCpuUtilizationPercent_); + } + if (disableHighPriorityCpuAutoscaling_ != false) { + output.writeBool(5, disableHighPriorityCpuAutoscaling_); + } + if (disableTotalCpuAutoscaling_ != false) { + output.writeBool(6, disableTotalCpuAutoscaling_); + } getUnknownFields().writeTo(output); } @@ -2526,6 +2808,20 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 2, autoscalingTargetHighPriorityCpuUtilizationPercent_); } + if (autoscalingTargetTotalCpuUtilizationPercent_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 4, autoscalingTargetTotalCpuUtilizationPercent_); + } + if (disableHighPriorityCpuAutoscaling_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 5, disableHighPriorityCpuAutoscaling_); + } + if (disableTotalCpuAutoscaling_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(6, disableTotalCpuAutoscaling_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2555,6 +2851,11 @@ public boolean equals(final java.lang.Object obj) { } if (getAutoscalingTargetHighPriorityCpuUtilizationPercent() != other.getAutoscalingTargetHighPriorityCpuUtilizationPercent()) return false; + if (getAutoscalingTargetTotalCpuUtilizationPercent() + != other.getAutoscalingTargetTotalCpuUtilizationPercent()) return false; + if (getDisableHighPriorityCpuAutoscaling() != other.getDisableHighPriorityCpuAutoscaling()) + return false; + if (getDisableTotalCpuAutoscaling() != other.getDisableTotalCpuAutoscaling()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2572,6 +2873,15 @@ public int hashCode() { } hash = (37 * hash) + AUTOSCALING_TARGET_HIGH_PRIORITY_CPU_UTILIZATION_PERCENT_FIELD_NUMBER; hash = (53 * hash) + getAutoscalingTargetHighPriorityCpuUtilizationPercent(); + hash = (37 * hash) + AUTOSCALING_TARGET_TOTAL_CPU_UTILIZATION_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getAutoscalingTargetTotalCpuUtilizationPercent(); + hash = (37 * hash) + DISABLE_HIGH_PRIORITY_CPU_AUTOSCALING_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getDisableHighPriorityCpuAutoscaling()); + hash = (37 * hash) + DISABLE_TOTAL_CPU_AUTOSCALING_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableTotalCpuAutoscaling()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2624,7 +2934,7 @@ public int hashCode() { public static com.google.spanner.admin.instance.v1.AutoscalingConfig .AsymmetricAutoscalingOption.AutoscalingConfigOverrides parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig @@ -2633,14 +2943,14 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig .AsymmetricAutoscalingOption.AutoscalingConfigOverrides parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig @@ -2649,14 +2959,14 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig .AsymmetricAutoscalingOption.AutoscalingConfigOverrides parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig @@ -2665,7 +2975,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2692,7 +3002,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2711,7 +3021,7 @@ protected Builder newBuilderForType( * google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides) com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption @@ -2722,7 +3032,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_fieldAccessorTable @@ -2739,14 +3049,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAutoscalingLimitsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAutoscalingLimitsFieldBuilder(); } } @@ -2760,6 +3070,9 @@ public Builder clear() { autoscalingLimitsBuilder_ = null; } autoscalingTargetHighPriorityCpuUtilizationPercent_ = 0; + autoscalingTargetTotalCpuUtilizationPercent_ = 0; + disableHighPriorityCpuAutoscaling_ = false; + disableTotalCpuAutoscaling_ = false; return this; } @@ -2823,44 +3136,19 @@ private void buildPartial0( result.autoscalingTargetHighPriorityCpuUtilizationPercent_ = autoscalingTargetHighPriorityCpuUtilizationPercent_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.autoscalingTargetTotalCpuUtilizationPercent_ = + autoscalingTargetTotalCpuUtilizationPercent_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.disableHighPriorityCpuAutoscaling_ = disableHighPriorityCpuAutoscaling_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.disableTotalCpuAutoscaling_ = disableTotalCpuAutoscaling_; + } 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 @@ -2891,6 +3179,16 @@ public Builder mergeFrom( setAutoscalingTargetHighPriorityCpuUtilizationPercent( other.getAutoscalingTargetHighPriorityCpuUtilizationPercent()); } + if (other.getAutoscalingTargetTotalCpuUtilizationPercent() != 0) { + setAutoscalingTargetTotalCpuUtilizationPercent( + other.getAutoscalingTargetTotalCpuUtilizationPercent()); + } + if (other.getDisableHighPriorityCpuAutoscaling() != false) { + setDisableHighPriorityCpuAutoscaling(other.getDisableHighPriorityCpuAutoscaling()); + } + if (other.getDisableTotalCpuAutoscaling() != false) { + setDisableTotalCpuAutoscaling(other.getDisableTotalCpuAutoscaling()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2920,7 +3218,7 @@ public Builder mergeFrom( case 10: { input.readMessage( - getAutoscalingLimitsFieldBuilder().getBuilder(), extensionRegistry); + internalGetAutoscalingLimitsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -2930,6 +3228,24 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 32: + { + autoscalingTargetTotalCpuUtilizationPercent_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 40: + { + disableHighPriorityCpuAutoscaling_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 40 + case 48: + { + disableTotalCpuAutoscaling_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2951,7 +3267,7 @@ public Builder mergeFrom( private com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscalingLimits_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder> @@ -3126,7 +3442,7 @@ public Builder clearAutoscalingLimits() { getAutoscalingLimitsBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getAutoscalingLimitsFieldBuilder().getBuilder(); + return internalGetAutoscalingLimitsFieldBuilder().getBuilder(); } /** @@ -3165,14 +3481,14 @@ public Builder clearAutoscalingLimits() { * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; *
*/ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder> - getAutoscalingLimitsFieldBuilder() { + internalGetAutoscalingLimitsFieldBuilder() { if (autoscalingLimitsBuilder_ == null) { autoscalingLimitsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits .Builder, @@ -3252,16 +3568,313 @@ public Builder clearAutoscalingTargetHighPriorityCpuUtilizationPercent() { return this; } + private int autoscalingTargetTotalCpuUtilizationPercent_; + + /** + * + * + *
+         * Optional. If specified, overrides the
+         * autoscaling target `total_cpu_utilization_percent`
+         * in the top-level autoscaling configuration for the selected replicas.
+         * 
+ * + * + * int32 autoscaling_target_total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingTargetTotalCpuUtilizationPercent. + */ @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public int getAutoscalingTargetTotalCpuUtilizationPercent() { + return autoscalingTargetTotalCpuUtilizationPercent_; + } + + /** + * + * + *
+         * Optional. If specified, overrides the
+         * autoscaling target `total_cpu_utilization_percent`
+         * in the top-level autoscaling configuration for the selected replicas.
+         * 
+ * + * + * int32 autoscaling_target_total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The autoscalingTargetTotalCpuUtilizationPercent to set. + * @return This builder for chaining. + */ + public Builder setAutoscalingTargetTotalCpuUtilizationPercent(int value) { + + autoscalingTargetTotalCpuUtilizationPercent_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. If specified, overrides the
+         * autoscaling target `total_cpu_utilization_percent`
+         * in the top-level autoscaling configuration for the selected replicas.
+         * 
+ * + * + * int32 autoscaling_target_total_cpu_utilization_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAutoscalingTargetTotalCpuUtilizationPercent() { + bitField0_ = (bitField0_ & ~0x00000004); + autoscalingTargetTotalCpuUtilizationPercent_ = 0; + onChanged(); + return this; + } + + private boolean disableHighPriorityCpuAutoscaling_; + + /** + * + * + *
+         * Optional. If true, disables high priority CPU autoscaling for the
+         * selected replicas and ignores
+         * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+         * in the top-level autoscaling configuration.
+         *
+         * When setting this field to true, setting
+         * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+         * field to a non-zero value for the same replica is not supported.
+         *
+         * If false, the
+         * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+         * field in the replica will be used if set to a non-zero value.
+         * Otherwise, the
+         * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+         * field in the top-level autoscaling configuration will be used.
+         *
+         * Setting both
+         * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+         * and
+         * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+         * to true for the same replica is not supported.
+         * 
+ * + * + * bool disable_high_priority_cpu_autoscaling = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableHighPriorityCpuAutoscaling. + */ + @java.lang.Override + public boolean getDisableHighPriorityCpuAutoscaling() { + return disableHighPriorityCpuAutoscaling_; + } + + /** + * + * + *
+         * Optional. If true, disables high priority CPU autoscaling for the
+         * selected replicas and ignores
+         * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+         * in the top-level autoscaling configuration.
+         *
+         * When setting this field to true, setting
+         * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+         * field to a non-zero value for the same replica is not supported.
+         *
+         * If false, the
+         * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+         * field in the replica will be used if set to a non-zero value.
+         * Otherwise, the
+         * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+         * field in the top-level autoscaling configuration will be used.
+         *
+         * Setting both
+         * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+         * and
+         * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+         * to true for the same replica is not supported.
+         * 
+ * + * + * bool disable_high_priority_cpu_autoscaling = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The disableHighPriorityCpuAutoscaling to set. + * @return This builder for chaining. + */ + public Builder setDisableHighPriorityCpuAutoscaling(boolean value) { + + disableHighPriorityCpuAutoscaling_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. If true, disables high priority CPU autoscaling for the
+         * selected replicas and ignores
+         * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+         * in the top-level autoscaling configuration.
+         *
+         * When setting this field to true, setting
+         * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+         * field to a non-zero value for the same replica is not supported.
+         *
+         * If false, the
+         * [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
+         * field in the replica will be used if set to a non-zero value.
+         * Otherwise, the
+         * [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
+         * field in the top-level autoscaling configuration will be used.
+         *
+         * Setting both
+         * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+         * and
+         * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+         * to true for the same replica is not supported.
+         * 
+ * + * + * bool disable_high_priority_cpu_autoscaling = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDisableHighPriorityCpuAutoscaling() { + bitField0_ = (bitField0_ & ~0x00000008); + disableHighPriorityCpuAutoscaling_ = false; + onChanged(); + return this; } + private boolean disableTotalCpuAutoscaling_; + + /** + * + * + *
+         * Optional. If true, disables total CPU autoscaling for the selected
+         * replicas and ignores
+         * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+         * in the top-level autoscaling configuration.
+         *
+         * When setting this field to true, setting
+         * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+         * field to a non-zero value for the same replica is not supported.
+         *
+         * If false, the
+         * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+         * field in the replica will be used if set to a non-zero value.
+         * Otherwise, the
+         * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+         * field in the top-level autoscaling configuration will be used.
+         *
+         * Setting both
+         * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+         * and
+         * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+         * to true for the same replica is not supported.
+         * 
+ * + * bool disable_total_cpu_autoscaling = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableTotalCpuAutoscaling. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public boolean getDisableTotalCpuAutoscaling() { + return disableTotalCpuAutoscaling_; + } + + /** + * + * + *
+         * Optional. If true, disables total CPU autoscaling for the selected
+         * replicas and ignores
+         * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+         * in the top-level autoscaling configuration.
+         *
+         * When setting this field to true, setting
+         * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+         * field to a non-zero value for the same replica is not supported.
+         *
+         * If false, the
+         * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+         * field in the replica will be used if set to a non-zero value.
+         * Otherwise, the
+         * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+         * field in the top-level autoscaling configuration will be used.
+         *
+         * Setting both
+         * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+         * and
+         * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+         * to true for the same replica is not supported.
+         * 
+ * + * bool disable_total_cpu_autoscaling = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The disableTotalCpuAutoscaling to set. + * @return This builder for chaining. + */ + public Builder setDisableTotalCpuAutoscaling(boolean value) { + + disableTotalCpuAutoscaling_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. If true, disables total CPU autoscaling for the selected
+         * replicas and ignores
+         * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+         * in the top-level autoscaling configuration.
+         *
+         * When setting this field to true, setting
+         * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+         * field to a non-zero value for the same replica is not supported.
+         *
+         * If false, the
+         * [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
+         * field in the replica will be used if set to a non-zero value.
+         * Otherwise, the
+         * [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
+         * field in the top-level autoscaling configuration will be used.
+         *
+         * Setting both
+         * [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
+         * and
+         * [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
+         * to true for the same replica is not supported.
+         * 
+ * + * bool disable_total_cpu_autoscaling = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDisableTotalCpuAutoscaling() { + bitField0_ = (bitField0_ & ~0x00000010); + disableTotalCpuAutoscaling_ = false; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides) @@ -3583,33 +4196,33 @@ public int hashCode() { public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption @@ -3617,7 +4230,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -3642,8 +4255,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3659,8 +4271,7 @@ protected Builder newBuilderForType( * Protobuf type {@code * google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) com.google.spanner.admin.instance.v1.AutoscalingConfig @@ -3671,7 +4282,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_fieldAccessorTable @@ -3688,15 +4299,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getReplicaSelectionFieldBuilder(); - getOverridesFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetReplicaSelectionFieldBuilder(); + internalGetOverridesFieldBuilder(); } } @@ -3773,41 +4384,6 @@ private void buildPartial0( 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 @@ -3863,13 +4439,14 @@ public Builder mergeFrom( case 10: { input.readMessage( - getReplicaSelectionFieldBuilder().getBuilder(), extensionRegistry); + internalGetReplicaSelectionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getOverridesFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOverridesFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -3893,7 +4470,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.ReplicaSelection replicaSelection_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaSelection, com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder> @@ -4064,7 +4641,7 @@ public Builder clearReplicaSelection() { getReplicaSelectionBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getReplicaSelectionFieldBuilder().getBuilder(); + return internalGetReplicaSelectionFieldBuilder().getBuilder(); } /** @@ -4102,14 +4679,14 @@ public Builder clearReplicaSelection() { * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaSelection, com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder> - getReplicaSelectionFieldBuilder() { + internalGetReplicaSelectionFieldBuilder() { if (replicaSelectionBuilder_ == null) { replicaSelectionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaSelection, com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder>( @@ -4122,7 +4699,7 @@ public Builder clearReplicaSelection() { private com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .AutoscalingConfigOverrides overrides_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .AutoscalingConfigOverrides, com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption @@ -4308,7 +4885,7 @@ public Builder clearOverrides() { getOverridesBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getOverridesFieldBuilder().getBuilder(); + return internalGetOverridesFieldBuilder().getBuilder(); } /** @@ -4348,17 +4925,17 @@ public Builder clearOverrides() { * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .AutoscalingConfigOverrides, com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .AutoscalingConfigOverrides.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .AutoscalingConfigOverridesOrBuilder> - getOverridesFieldBuilder() { + internalGetOverridesFieldBuilder() { if (overridesBuilder_ == null) { overridesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .AutoscalingConfigOverrides, com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption @@ -4371,18 +4948,6 @@ public Builder clearOverrides() { return overridesBuilder_; } - @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.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) } @@ -4838,38 +5403,38 @@ public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -4893,7 +5458,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -4907,7 +5472,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig) com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder { @@ -4917,7 +5482,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_fieldAccessorTable @@ -4931,16 +5496,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAutoscalingLimitsFieldBuilder(); - getAutoscalingTargetsFieldBuilder(); - getAsymmetricAutoscalingOptionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAutoscalingLimitsFieldBuilder(); + internalGetAutoscalingTargetsFieldBuilder(); + internalGetAsymmetricAutoscalingOptionsFieldBuilder(); } } @@ -5034,39 +5599,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.AutoscalingConfi 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.admin.instance.v1.AutoscalingConfig) { @@ -5105,8 +5637,8 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.AutoscalingConfig asymmetricAutoscalingOptions_ = other.asymmetricAutoscalingOptions_; bitField0_ = (bitField0_ & ~0x00000004); asymmetricAutoscalingOptionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAsymmetricAutoscalingOptionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAsymmetricAutoscalingOptionsFieldBuilder() : null; } else { asymmetricAutoscalingOptionsBuilder_.addAllMessages( @@ -5143,14 +5675,14 @@ public Builder mergeFrom( case 10: { input.readMessage( - getAutoscalingLimitsFieldBuilder().getBuilder(), extensionRegistry); + internalGetAutoscalingLimitsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( - getAutoscalingTargetsFieldBuilder().getBuilder(), extensionRegistry); + internalGetAutoscalingTargetsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -5191,7 +5723,7 @@ public Builder mergeFrom( private com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscalingLimits_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder> @@ -5359,7 +5891,7 @@ public Builder clearAutoscalingLimits() { getAutoscalingLimitsBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getAutoscalingLimitsFieldBuilder().getBuilder(); + return internalGetAutoscalingLimitsFieldBuilder().getBuilder(); } /** @@ -5396,14 +5928,14 @@ public Builder clearAutoscalingLimits() { * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder> - getAutoscalingLimitsFieldBuilder() { + internalGetAutoscalingLimitsFieldBuilder() { if (autoscalingLimitsBuilder_ == null) { autoscalingLimitsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder>( @@ -5415,7 +5947,7 @@ public Builder clearAutoscalingLimits() { private com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscalingTargets_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder> @@ -5583,7 +6115,7 @@ public Builder clearAutoscalingTargets() { getAutoscalingTargetsBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getAutoscalingTargetsFieldBuilder().getBuilder(); + return internalGetAutoscalingTargetsFieldBuilder().getBuilder(); } /** @@ -5620,14 +6152,14 @@ public Builder clearAutoscalingTargets() { * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder> - getAutoscalingTargetsFieldBuilder() { + internalGetAutoscalingTargetsFieldBuilder() { if (autoscalingTargetsBuilder_ == null) { autoscalingTargetsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder>( @@ -5651,7 +6183,7 @@ private void ensureAsymmetricAutoscalingOptionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption, com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .Builder, @@ -6063,7 +6595,7 @@ public Builder removeAsymmetricAutoscalingOptions(int index) { public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .Builder getAsymmetricAutoscalingOptionsBuilder(int index) { - return getAsymmetricAutoscalingOptionsFieldBuilder().getBuilder(index); + return internalGetAsymmetricAutoscalingOptionsFieldBuilder().getBuilder(index); } /** @@ -6148,7 +6680,7 @@ public Builder removeAsymmetricAutoscalingOptions(int index) { public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .Builder addAsymmetricAutoscalingOptionsBuilder() { - return getAsymmetricAutoscalingOptionsFieldBuilder() + return internalGetAsymmetricAutoscalingOptionsFieldBuilder() .addBuilder( com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .getDefaultInstance()); @@ -6176,7 +6708,7 @@ public Builder removeAsymmetricAutoscalingOptions(int index) { public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .Builder addAsymmetricAutoscalingOptionsBuilder(int index) { - return getAsymmetricAutoscalingOptionsFieldBuilder() + return internalGetAsymmetricAutoscalingOptionsFieldBuilder() .addBuilder( index, com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption @@ -6206,19 +6738,19 @@ public Builder removeAsymmetricAutoscalingOptions(int index) { com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .Builder> getAsymmetricAutoscalingOptionsBuilderList() { - return getAsymmetricAutoscalingOptionsFieldBuilder().getBuilderList(); + return internalGetAsymmetricAutoscalingOptionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption, com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .Builder, com.google.spanner.admin.instance.v1.AutoscalingConfig .AsymmetricAutoscalingOptionOrBuilder> - getAsymmetricAutoscalingOptionsFieldBuilder() { + internalGetAsymmetricAutoscalingOptionsFieldBuilder() { if (asymmetricAutoscalingOptionsBuilder_ == null) { asymmetricAutoscalingOptionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption, com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption .Builder, @@ -6233,17 +6765,6 @@ public Builder removeAsymmetricAutoscalingOptions(int index) { return asymmetricAutoscalingOptionsBuilder_; } - @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.admin.instance.v1.AutoscalingConfig) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfigOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfigOrBuilder.java index 6a30c6358bf..64c4f60dc52 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface AutoscalingConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.AutoscalingConfig) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java index b37c43d36c3..69f300942ee 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; -public final class CommonProto { +@com.google.protobuf.Generated +public final class CommonProto extends com.google.protobuf.GeneratedFile { private CommonProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CommonProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,11 +42,11 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_OperationProgress_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_OperationProgress_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ReplicaSelection_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -74,29 +86,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_spanner_admin_instance_v1_OperationProgress_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_spanner_admin_instance_v1_OperationProgress_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_OperationProgress_descriptor, new java.lang.String[] { "ProgressPercent", "StartTime", "EndTime", }); internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_spanner_admin_instance_v1_ReplicaSelection_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor, new java.lang.String[] { "Location", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadata.java index 7ba1fb709d1..c5be9e5a412 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstanceConfigMetadata} */ -public final class CreateInstanceConfigMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateInstanceConfigMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) CreateInstanceConfigMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateInstanceConfigMetadata"); + } + // Use CreateInstanceConfigMetadata.newBuilder() to construct. - private CreateInstanceConfigMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateInstanceConfigMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CreateInstanceConfigMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateInstanceConfigMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_fieldAccessorTable @@ -359,39 +365,39 @@ public static com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata public static com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -415,7 +421,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -430,7 +436,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstanceConfigMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadataOrBuilder { @@ -440,7 +446,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_fieldAccessorTable @@ -455,16 +461,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstanceConfigFieldBuilder(); - getProgressFieldBuilder(); - getCancelTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceConfigFieldBuilder(); + internalGetProgressFieldBuilder(); + internalGetCancelTimeFieldBuilder(); } } @@ -542,39 +548,6 @@ private void buildPartial0( 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.admin.instance.v1.CreateInstanceConfigMetadata) { @@ -627,19 +600,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -663,7 +639,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.InstanceConfig instanceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> @@ -810,7 +786,7 @@ public Builder clearInstanceConfig() { public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceConfigBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstanceConfigFieldBuilder().getBuilder(); + return internalGetInstanceConfigFieldBuilder().getBuilder(); } /** @@ -842,14 +818,14 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceCo * * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> - getInstanceConfigFieldBuilder() { + internalGetInstanceConfigFieldBuilder() { if (instanceConfigBuilder_ == null) { instanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder>( @@ -860,7 +836,7 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceCo } private com.google.spanner.admin.instance.v1.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.OperationProgress, com.google.spanner.admin.instance.v1.OperationProgress.Builder, com.google.spanner.admin.instance.v1.OperationProgressOrBuilder> @@ -1021,7 +997,7 @@ public Builder clearProgress() { public com.google.spanner.admin.instance.v1.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } /** @@ -1056,14 +1032,14 @@ public com.google.spanner.admin.instance.v1.OperationProgressOrBuilder getProgre * * .google.spanner.admin.instance.v1.OperationProgress progress = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.OperationProgress, com.google.spanner.admin.instance.v1.OperationProgress.Builder, com.google.spanner.admin.instance.v1.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.OperationProgress, com.google.spanner.admin.instance.v1.OperationProgress.Builder, com.google.spanner.admin.instance.v1.OperationProgressOrBuilder>( @@ -1074,7 +1050,7 @@ public com.google.spanner.admin.instance.v1.OperationProgressOrBuilder getProgre } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1219,7 +1195,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1250,14 +1226,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1267,17 +1243,6 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { return cancelTimeBuilder_; } - @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.admin.instance.v1.CreateInstanceConfigMetadata) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadataOrBuilder.java index 00ffeb7f969..fb321d38dce 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface CreateInstanceConfigMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequest.java index 8f30d13fd2a..c72ee75224b 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstanceConfigRequest} */ -public final class CreateInstanceConfigRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateInstanceConfigRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.CreateInstanceConfigRequest) CreateInstanceConfigRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateInstanceConfigRequest"); + } + // Use CreateInstanceConfigRequest.newBuilder() to construct. - private CreateInstanceConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateInstanceConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CreateInstanceConfigRequest() { instanceConfigId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateInstanceConfigRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_fieldAccessorTable @@ -290,11 +296,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceConfigId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceConfigId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceConfigId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getInstanceConfig()); @@ -311,11 +317,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceConfigId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceConfigId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceConfigId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstanceConfig()); @@ -409,38 +415,38 @@ public static com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest p public static com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -464,7 +470,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -479,7 +485,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstanceConfigRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.CreateInstanceConfigRequest) com.google.spanner.admin.instance.v1.CreateInstanceConfigRequestOrBuilder { @@ -489,7 +495,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_fieldAccessorTable @@ -503,14 +509,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstanceConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceConfigFieldBuilder(); } } @@ -582,39 +588,6 @@ private void buildPartial0( 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.admin.instance.v1.CreateInstanceConfigRequest) { @@ -686,7 +659,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -968,7 +942,7 @@ public Builder setInstanceConfigIdBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.instance.v1.InstanceConfig instanceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> @@ -1157,7 +1131,7 @@ public Builder clearInstanceConfig() { public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceConfigBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getInstanceConfigFieldBuilder().getBuilder(); + return internalGetInstanceConfigFieldBuilder().getBuilder(); } /** @@ -1201,14 +1175,14 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceCo * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> - getInstanceConfigFieldBuilder() { + internalGetInstanceConfigFieldBuilder() { if (instanceConfigBuilder_ == null) { instanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder>( @@ -1277,17 +1251,6 @@ public Builder clearValidateOnly() { 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.admin.instance.v1.CreateInstanceConfigRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequestOrBuilder.java index b5ce540a4a9..d1d76367eb6 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceConfigRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface CreateInstanceConfigRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.CreateInstanceConfigRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadata.java index ffaf70cef5e..e19a002881a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstanceMetadata} */ -public final class CreateInstanceMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateInstanceMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.CreateInstanceMetadata) CreateInstanceMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateInstanceMetadata"); + } + // Use CreateInstanceMetadata.newBuilder() to construct. - private CreateInstanceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateInstanceMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private CreateInstanceMetadata() { expectedFulfillmentPeriod_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateInstanceMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_fieldAccessorTable @@ -481,38 +487,38 @@ public static com.google.spanner.admin.instance.v1.CreateInstanceMetadata parseF public static com.google.spanner.admin.instance.v1.CreateInstanceMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstanceMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstanceMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -536,7 +542,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -551,7 +557,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstanceMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.CreateInstanceMetadata) com.google.spanner.admin.instance.v1.CreateInstanceMetadataOrBuilder { @@ -561,7 +567,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_fieldAccessorTable @@ -575,17 +581,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstanceFieldBuilder(); - getStartTimeFieldBuilder(); - getCancelTimeFieldBuilder(); - getEndTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetCancelTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); } } @@ -673,39 +679,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.CreateInstanceMe 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.admin.instance.v1.CreateInstanceMetadata) { @@ -762,25 +735,28 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -810,7 +786,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> @@ -956,7 +932,7 @@ public Builder clearInstance() { public com.google.spanner.admin.instance.v1.Instance.Builder getInstanceBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstanceFieldBuilder().getBuilder(); + return internalGetInstanceFieldBuilder().getBuilder(); } /** @@ -987,14 +963,14 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild * * .google.spanner.admin.instance.v1.Instance instance = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> - getInstanceFieldBuilder() { + internalGetInstanceFieldBuilder() { if (instanceBuilder_ == null) { instanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder>( @@ -1005,7 +981,7 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild } private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1162,7 +1138,7 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } /** @@ -1195,14 +1171,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_time = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { + internalGetStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1213,7 +1189,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1372,7 +1348,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1407,14 +1383,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1425,7 +1401,7 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { } private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1568,7 +1544,7 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } /** @@ -1597,14 +1573,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * .google.protobuf.Timestamp end_time = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { + internalGetEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1718,17 +1694,6 @@ public Builder clearExpectedFulfillmentPeriod() { 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.admin.instance.v1.CreateInstanceMetadata) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadataOrBuilder.java index 018bf7119fc..75f88e14f58 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface CreateInstanceMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.CreateInstanceMetadata) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadata.java index 17964f091ec..bca09ef8939 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,33 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstancePartitionMetadata} */ -public final class CreateInstancePartitionMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateInstancePartitionMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) CreateInstancePartitionMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateInstancePartitionMetadata"); + } + // Use CreateInstancePartitionMetadata.newBuilder() to construct. - private CreateInstancePartitionMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateInstancePartitionMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CreateInstancePartitionMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateInstancePartitionMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_fieldAccessorTable @@ -426,39 +431,39 @@ public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetada public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -482,7 +487,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -497,7 +502,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstancePartitionMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) com.google.spanner.admin.instance.v1.CreateInstancePartitionMetadataOrBuilder { @@ -507,7 +512,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_fieldAccessorTable @@ -522,17 +527,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstancePartitionFieldBuilder(); - getStartTimeFieldBuilder(); - getCancelTimeFieldBuilder(); - getEndTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstancePartitionFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetCancelTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); } } @@ -622,39 +627,6 @@ private void buildPartial0( 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.admin.instance.v1.CreateInstancePartitionMetadata) { @@ -712,25 +684,27 @@ public Builder mergeFrom( case 10: { input.readMessage( - getInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); + internalGetInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -754,7 +728,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> @@ -904,7 +878,7 @@ public Builder clearInstancePartition() { getInstancePartitionBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstancePartitionFieldBuilder().getBuilder(); + return internalGetInstancePartitionFieldBuilder().getBuilder(); } /** @@ -936,14 +910,14 @@ public Builder clearInstancePartition() { * * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> - getInstancePartitionFieldBuilder() { + internalGetInstancePartitionFieldBuilder() { if (instancePartitionBuilder_ == null) { instancePartitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( @@ -954,7 +928,7 @@ public Builder clearInstancePartition() { } private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1111,7 +1085,7 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } /** @@ -1144,14 +1118,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_time = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { + internalGetStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1162,7 +1136,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1321,7 +1295,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1356,14 +1330,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1374,7 +1348,7 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { } private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1517,7 +1491,7 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } /** @@ -1546,14 +1520,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * .google.protobuf.Timestamp end_time = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { + internalGetEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1563,17 +1537,6 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTimeBuilder_; } - @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.admin.instance.v1.CreateInstancePartitionMetadata) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadataOrBuilder.java index 619a8c29b63..b609606ba47 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface CreateInstancePartitionMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequest.java index 7ab20d48dec..a08a1f2c9b3 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,15 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstancePartitionRequest} */ -public final class CreateInstancePartitionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateInstancePartitionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.CreateInstancePartitionRequest) CreateInstancePartitionRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateInstancePartitionRequest"); + } + // Use CreateInstancePartitionRequest.newBuilder() to construct. - private CreateInstancePartitionRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateInstancePartitionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +57,13 @@ private CreateInstancePartitionRequest() { instancePartitionId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateInstancePartitionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_fieldAccessorTable @@ -266,11 +271,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instancePartitionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instancePartitionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instancePartitionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instancePartitionId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getInstancePartition()); @@ -284,11 +289,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instancePartitionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instancePartitionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instancePartitionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instancePartitionId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstancePartition()); @@ -376,39 +381,39 @@ public static com.google.spanner.admin.instance.v1.CreateInstancePartitionReques public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstancePartitionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -432,7 +437,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -447,7 +452,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstancePartitionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.CreateInstancePartitionRequest) com.google.spanner.admin.instance.v1.CreateInstancePartitionRequestOrBuilder { @@ -457,7 +462,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_fieldAccessorTable @@ -472,14 +477,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstancePartitionFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstancePartitionFieldBuilder(); } } @@ -550,39 +555,6 @@ private void buildPartial0( 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.admin.instance.v1.CreateInstancePartitionRequest) { @@ -653,7 +625,7 @@ public Builder mergeFrom( case 26: { input.readMessage( - getInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); + internalGetInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -929,7 +901,7 @@ public Builder setInstancePartitionIdBytes(com.google.protobuf.ByteString value) } private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> @@ -1107,7 +1079,7 @@ public Builder clearInstancePartition() { getInstancePartitionBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getInstancePartitionFieldBuilder().getBuilder(); + return internalGetInstancePartitionFieldBuilder().getBuilder(); } /** @@ -1147,14 +1119,14 @@ public Builder clearInstancePartition() { * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> - getInstancePartitionFieldBuilder() { + internalGetInstancePartitionFieldBuilder() { if (instancePartitionBuilder_ == null) { instancePartitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( @@ -1164,17 +1136,6 @@ public Builder clearInstancePartition() { return instancePartitionBuilder_; } - @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.admin.instance.v1.CreateInstancePartitionRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequestOrBuilder.java index 1d9205590cc..f844e3d5ce9 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstancePartitionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface CreateInstancePartitionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.CreateInstancePartitionRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequest.java index d51298b695e..6d6c09abb71 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstanceRequest} */ -public final class CreateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateInstanceRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.CreateInstanceRequest) CreateInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateInstanceRequest"); + } + // Use CreateInstanceRequest.newBuilder() to construct. - private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateInstanceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CreateInstanceRequest() { instanceId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateInstanceRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_fieldAccessorTable @@ -259,11 +265,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getInstance()); @@ -277,11 +283,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstance()); @@ -369,38 +375,38 @@ public static com.google.spanner.admin.instance.v1.CreateInstanceRequest parseFr public static com.google.spanner.admin.instance.v1.CreateInstanceRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstanceRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.CreateInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.CreateInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -424,7 +430,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -439,7 +445,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.CreateInstanceRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.CreateInstanceRequest) com.google.spanner.admin.instance.v1.CreateInstanceRequestOrBuilder { @@ -449,7 +455,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_fieldAccessorTable @@ -463,14 +469,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstanceFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceFieldBuilder(); } } @@ -535,39 +541,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.CreateInstanceRe 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.admin.instance.v1.CreateInstanceRequest) { @@ -634,7 +607,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -905,7 +879,7 @@ public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.instance.v1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> @@ -1072,7 +1046,7 @@ public Builder clearInstance() { public com.google.spanner.admin.instance.v1.Instance.Builder getInstanceBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getInstanceFieldBuilder().getBuilder(); + return internalGetInstanceFieldBuilder().getBuilder(); } /** @@ -1109,14 +1083,14 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild * .google.spanner.admin.instance.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> - getInstanceFieldBuilder() { + internalGetInstanceFieldBuilder() { if (instanceBuilder_ == null) { instanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder>( @@ -1126,17 +1100,6 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild 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.admin.instance.v1.CreateInstanceRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequestOrBuilder.java index d231faaa988..d07f7acedf3 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CreateInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface CreateInstanceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.CreateInstanceRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequest.java index 656302f146c..91b46b0587a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.DeleteInstanceConfigRequest} */ -public final class DeleteInstanceConfigRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteInstanceConfigRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.DeleteInstanceConfigRequest) DeleteInstanceConfigRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteInstanceConfigRequest"); + } + // Use DeleteInstanceConfigRequest.newBuilder() to construct. - private DeleteInstanceConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteInstanceConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private DeleteInstanceConfigRequest() { etag_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteInstanceConfigRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_fieldAccessorTable @@ -226,11 +232,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); } if (validateOnly_ != false) { output.writeBool(3, validateOnly_); @@ -244,11 +250,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); } if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); @@ -331,38 +337,38 @@ public static com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest p public static com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -386,7 +392,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -401,7 +407,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.DeleteInstanceConfigRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.DeleteInstanceConfigRequest) com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequestOrBuilder { @@ -411,7 +417,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_fieldAccessorTable @@ -423,7 +429,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -483,39 +489,6 @@ private void buildPartial0( } } - @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.admin.instance.v1.DeleteInstanceConfigRequest) { @@ -938,17 +911,6 @@ public Builder clearValidateOnly() { 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.admin.instance.v1.DeleteInstanceConfigRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequestOrBuilder.java index b0a4a3cd749..5f8c8788855 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceConfigRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface DeleteInstanceConfigRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.DeleteInstanceConfigRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequest.java index d7813946bb0..379d0e2ecf4 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,15 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.DeleteInstancePartitionRequest} */ -public final class DeleteInstancePartitionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteInstancePartitionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) DeleteInstancePartitionRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteInstancePartitionRequest"); + } + // Use DeleteInstancePartitionRequest.newBuilder() to construct. - private DeleteInstancePartitionRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteInstancePartitionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +57,13 @@ private DeleteInstancePartitionRequest() { etag_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteInstancePartitionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_fieldAccessorTable @@ -201,11 +206,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); } getUnknownFields().writeTo(output); } @@ -216,11 +221,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -297,39 +302,39 @@ public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionReques public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -353,7 +358,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -368,7 +373,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.DeleteInstancePartitionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequestOrBuilder { @@ -378,7 +383,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_fieldAccessorTable @@ -391,7 +396,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -448,39 +453,6 @@ private void buildPartial0( } } - @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.admin.instance.v1.DeleteInstancePartitionRequest) { @@ -821,17 +793,6 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.DeleteInstancePartitionRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequestOrBuilder.java index a216d5c1f4e..50859d8b6fa 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstancePartitionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface DeleteInstancePartitionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.DeleteInstancePartitionRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequest.java index 93cc31038f2..1306dadae30 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.DeleteInstanceRequest} */ -public final class DeleteInstanceRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteInstanceRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.DeleteInstanceRequest) DeleteInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteInstanceRequest"); + } + // Use DeleteInstanceRequest.newBuilder() to construct. - private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteInstanceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private DeleteInstanceRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteInstanceRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_fieldAccessorTable @@ -138,8 +144,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -150,8 +156,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -225,38 +231,38 @@ public static com.google.spanner.admin.instance.v1.DeleteInstanceRequest parseFr public static com.google.spanner.admin.instance.v1.DeleteInstanceRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.DeleteInstanceRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.DeleteInstanceRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.DeleteInstanceRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.DeleteInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.DeleteInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -280,7 +286,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -295,7 +301,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.DeleteInstanceRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.DeleteInstanceRequest) com.google.spanner.admin.instance.v1.DeleteInstanceRequestOrBuilder { @@ -305,7 +311,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_fieldAccessorTable @@ -317,7 +323,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.DeleteInstanceRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -367,39 +373,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.DeleteInstanceRe } } - @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.admin.instance.v1.DeleteInstanceRequest) { @@ -595,17 +568,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.DeleteInstanceRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequestOrBuilder.java index 6e1691b101f..7e881394ea2 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/DeleteInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface DeleteInstanceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.DeleteInstanceRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FreeInstanceMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FreeInstanceMetadata.java index 9560dd4e4bc..6ea31b81436 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FreeInstanceMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FreeInstanceMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.FreeInstanceMetadata} */ -public final class FreeInstanceMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class FreeInstanceMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.FreeInstanceMetadata) FreeInstanceMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FreeInstanceMetadata"); + } + // Use FreeInstanceMetadata.newBuilder() to construct. - private FreeInstanceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FreeInstanceMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private FreeInstanceMetadata() { expireBehavior_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FreeInstanceMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_FreeInstanceMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_FreeInstanceMetadata_fieldAccessorTable @@ -110,6 +116,16 @@ public enum ExpireBehavior implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExpireBehavior"); + } + /** * * @@ -203,7 +219,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.FreeInstanceMetadata.getDescriptor() .getEnumTypes() .get(0); @@ -531,38 +547,38 @@ public static com.google.spanner.admin.instance.v1.FreeInstanceMetadata parseFro public static com.google.spanner.admin.instance.v1.FreeInstanceMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.FreeInstanceMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.FreeInstanceMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.FreeInstanceMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.FreeInstanceMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.FreeInstanceMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -586,7 +602,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -601,7 +617,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.FreeInstanceMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.FreeInstanceMetadata) com.google.spanner.admin.instance.v1.FreeInstanceMetadataOrBuilder { @@ -611,7 +627,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_FreeInstanceMetadata_fieldAccessorTable @@ -625,15 +641,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getExpireTimeFieldBuilder(); - getUpgradeTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpireTimeFieldBuilder(); + internalGetUpgradeTimeFieldBuilder(); } } @@ -704,39 +720,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.FreeInstanceMeta 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.admin.instance.v1.FreeInstanceMetadata) { @@ -787,13 +770,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpgradeTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpgradeTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -823,7 +808,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp expireTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1003,7 +988,7 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } /** @@ -1044,14 +1029,14 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * .google.protobuf.Timestamp expire_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpireTimeFieldBuilder() { + internalGetExpireTimeFieldBuilder() { if (expireTimeBuilder_ == null) { expireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1062,7 +1047,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { } private com.google.protobuf.Timestamp upgradeTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1228,7 +1213,7 @@ public Builder clearUpgradeTime() { public com.google.protobuf.Timestamp.Builder getUpgradeTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpgradeTimeFieldBuilder().getBuilder(); + return internalGetUpgradeTimeFieldBuilder().getBuilder(); } /** @@ -1265,14 +1250,14 @@ public com.google.protobuf.TimestampOrBuilder getUpgradeTimeOrBuilder() { * .google.protobuf.Timestamp upgrade_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpgradeTimeFieldBuilder() { + internalGetUpgradeTimeFieldBuilder() { if (upgradeTimeBuilder_ == null) { upgradeTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1402,17 +1387,6 @@ public Builder clearExpireBehavior() { 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.admin.instance.v1.FreeInstanceMetadata) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FreeInstanceMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FreeInstanceMetadataOrBuilder.java index a52cc05ff84..28f41451e7f 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FreeInstanceMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FreeInstanceMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface FreeInstanceMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.FreeInstanceMetadata) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FulfillmentPeriod.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FulfillmentPeriod.java index 12de15eff75..4c4a59f191c 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FulfillmentPeriod.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/FulfillmentPeriod.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -28,6 +29,7 @@ * * Protobuf enum {@code google.spanner.admin.instance.v1.FulfillmentPeriod} */ +@com.google.protobuf.Generated public enum FulfillmentPeriod implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -64,6 +66,16 @@ public enum FulfillmentPeriod implements com.google.protobuf.ProtocolMessageEnum UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FulfillmentPeriod"); + } + /** * * @@ -158,7 +170,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.CommonProto.getDescriptor().getEnumTypes().get(0); } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequest.java index b540913b58c..b9228b059ed 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.GetInstanceConfigRequest} */ -public final class GetInstanceConfigRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetInstanceConfigRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.GetInstanceConfigRequest) GetInstanceConfigRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetInstanceConfigRequest"); + } + // Use GetInstanceConfigRequest.newBuilder() to construct. - private GetInstanceConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetInstanceConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GetInstanceConfigRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetInstanceConfigRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_fieldAccessorTable @@ -138,8 +144,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -150,8 +156,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -225,38 +231,38 @@ public static com.google.spanner.admin.instance.v1.GetInstanceConfigRequest pars public static com.google.spanner.admin.instance.v1.GetInstanceConfigRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.GetInstanceConfigRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.GetInstanceConfigRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.GetInstanceConfigRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.GetInstanceConfigRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.GetInstanceConfigRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -280,7 +286,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -295,7 +301,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.GetInstanceConfigRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.GetInstanceConfigRequest) com.google.spanner.admin.instance.v1.GetInstanceConfigRequestOrBuilder { @@ -305,7 +311,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_fieldAccessorTable @@ -317,7 +323,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.GetInstanceConfigRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -369,39 +375,6 @@ private void buildPartial0( } } - @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.admin.instance.v1.GetInstanceConfigRequest) { @@ -598,17 +571,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.GetInstanceConfigRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequestOrBuilder.java index fc95160a7f4..758326023ab 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceConfigRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface GetInstanceConfigRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.GetInstanceConfigRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequest.java index e0fb7e69a98..157905197df 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.GetInstancePartitionRequest} */ -public final class GetInstancePartitionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetInstancePartitionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.GetInstancePartitionRequest) GetInstancePartitionRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetInstancePartitionRequest"); + } + // Use GetInstancePartitionRequest.newBuilder() to construct. - private GetInstancePartitionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetInstancePartitionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GetInstancePartitionRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetInstancePartitionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_fieldAccessorTable @@ -140,8 +146,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -152,8 +158,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -227,38 +233,38 @@ public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest p public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.GetInstancePartitionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -282,7 +288,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -297,7 +303,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.GetInstancePartitionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.GetInstancePartitionRequest) com.google.spanner.admin.instance.v1.GetInstancePartitionRequestOrBuilder { @@ -307,7 +313,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_fieldAccessorTable @@ -319,7 +325,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.GetInstancePartitionRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -371,39 +377,6 @@ private void buildPartial0( } } - @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.admin.instance.v1.GetInstancePartitionRequest) { @@ -606,17 +579,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.GetInstancePartitionRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequestOrBuilder.java index f6e7063954e..f7b1aa011e7 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstancePartitionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface GetInstancePartitionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.GetInstancePartitionRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequest.java index 6958b721964..57e6368a0b3 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.GetInstanceRequest} */ -public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.GetInstanceRequest) GetInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetInstanceRequest"); + } + // Use GetInstanceRequest.newBuilder() to construct. - private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetInstanceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GetInstanceRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetInstanceRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_fieldAccessorTable @@ -197,8 +203,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getFieldMask()); @@ -212,8 +218,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFieldMask()); @@ -298,38 +304,38 @@ public static com.google.spanner.admin.instance.v1.GetInstanceRequest parseFrom( public static com.google.spanner.admin.instance.v1.GetInstanceRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.GetInstanceRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.GetInstanceRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.GetInstanceRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.GetInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.GetInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -353,7 +359,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -368,7 +374,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.GetInstanceRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.GetInstanceRequest) com.google.spanner.admin.instance.v1.GetInstanceRequestOrBuilder { @@ -378,7 +384,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_fieldAccessorTable @@ -392,14 +398,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFieldMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFieldMaskFieldBuilder(); } } @@ -460,39 +466,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.GetInstanceReque 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.admin.instance.v1.GetInstanceRequest) { @@ -548,7 +521,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getFieldMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFieldMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -698,7 +672,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.FieldMask fieldMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> @@ -862,7 +836,7 @@ public Builder clearFieldMask() { public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getFieldMaskFieldBuilder().getBuilder(); + return internalGetFieldMaskFieldBuilder().getBuilder(); } /** @@ -897,14 +871,14 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { * * .google.protobuf.FieldMask field_mask = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getFieldMaskFieldBuilder() { + internalGetFieldMaskFieldBuilder() { if (fieldMaskBuilder_ == null) { fieldMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -914,17 +888,6 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { return fieldMaskBuilder_; } - @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.admin.instance.v1.GetInstanceRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequestOrBuilder.java index 5b8ea62749a..e8f705bf06a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/GetInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface GetInstanceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.GetInstanceRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java index eaaea0c2edf..a199934b0ef 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.Instance} */ -public final class Instance extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Instance extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.Instance) InstanceOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Instance"); + } + // Use Instance.newBuilder() to construct. - private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Instance(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -51,12 +63,6 @@ private Instance() { defaultBackupScheduleType_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Instance(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_Instance_descriptor; @@ -75,7 +81,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_Instance_fieldAccessorTable @@ -130,6 +136,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -224,7 +240,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.Instance.getDescriptor().getEnumTypes().get(0); } @@ -298,6 +314,16 @@ public enum InstanceType implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InstanceType"); + } + /** * * @@ -392,7 +418,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.Instance.getDescriptor().getEnumTypes().get(1); } @@ -471,6 +497,16 @@ public enum Edition implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Edition"); + } + /** * * @@ -575,7 +611,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.Instance.getDescriptor().getEnumTypes().get(2); } @@ -650,6 +686,16 @@ public enum DefaultBackupScheduleType implements com.google.protobuf.ProtocolMes UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DefaultBackupScheduleType"); + } + /** * * @@ -747,7 +793,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.Instance.getDescriptor().getEnumTypes().get(3); } @@ -1279,11 +1325,11 @@ public int getLabelsCount() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -1323,11 +1369,11 @@ public java.util.Map getLabels() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -1357,11 +1403,11 @@ public java.util.Map getLabelsMap() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -1398,11 +1444,11 @@ public java.util.Map getLabelsMap() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -1816,14 +1862,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(config_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, config_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); } if (nodeCount_ != 0) { output.writeInt32(5, nodeCount_); @@ -1832,10 +1878,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.spanner.admin.instance.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(6, state_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); for (int i = 0; i < endpointUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpointUris_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 8, endpointUris_.getRaw(i)); } if (processingUnits_ != 0) { output.writeInt32(9, processingUnits_); @@ -1879,14 +1925,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(config_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, config_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); } if (nodeCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, nodeCount_); @@ -2093,38 +2139,38 @@ public static com.google.spanner.admin.instance.v1.Instance parseFrom( public static com.google.spanner.admin.instance.v1.Instance parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.Instance parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.Instance parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.Instance parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.Instance parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.Instance parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2147,7 +2193,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2161,7 +2207,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.Instance} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.Instance) com.google.spanner.admin.instance.v1.InstanceOrBuilder { @@ -2193,7 +2239,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_Instance_fieldAccessorTable @@ -2207,18 +2253,18 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getReplicaComputeCapacityFieldBuilder(); - getAutoscalingConfigFieldBuilder(); - getCreateTimeFieldBuilder(); - getUpdateTimeFieldBuilder(); - getFreeInstanceMetadataFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetReplicaComputeCapacityFieldBuilder(); + internalGetAutoscalingConfigFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetFreeInstanceMetadataFieldBuilder(); } } @@ -2374,39 +2420,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.Instance result) 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.admin.instance.v1.Instance) { @@ -2459,8 +2472,8 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.Instance other) { replicaComputeCapacity_ = other.replicaComputeCapacity_; bitField0_ = (bitField0_ & ~0x00000020); replicaComputeCapacityBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getReplicaComputeCapacityFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReplicaComputeCapacityFieldBuilder() : null; } else { replicaComputeCapacityBuilder_.addAllMessages(other.replicaComputeCapacity_); @@ -2592,27 +2605,29 @@ public Builder mergeFrom( } // case 80 case 90: { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000800; break; } // case 90 case 98: { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00001000; break; } // case 98 case 106: { input.readMessage( - getFreeInstanceMetadataFieldBuilder().getBuilder(), extensionRegistry); + internalGetFreeInstanceMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00002000; break; } // case 106 case 138: { input.readMessage( - getAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 138 @@ -3256,7 +3271,7 @@ private void ensureReplicaComputeCapacityIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaComputeCapacity, com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder, com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder> @@ -3577,7 +3592,7 @@ public Builder removeReplicaComputeCapacity(int index) { */ public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder getReplicaComputeCapacityBuilder(int index) { - return getReplicaComputeCapacityFieldBuilder().getBuilder(index); + return internalGetReplicaComputeCapacityFieldBuilder().getBuilder(index); } /** @@ -3640,7 +3655,7 @@ public Builder removeReplicaComputeCapacity(int index) { */ public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder addReplicaComputeCapacityBuilder() { - return getReplicaComputeCapacityFieldBuilder() + return internalGetReplicaComputeCapacityFieldBuilder() .addBuilder( com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.getDefaultInstance()); } @@ -3660,7 +3675,7 @@ public Builder removeReplicaComputeCapacity(int index) { */ public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder addReplicaComputeCapacityBuilder(int index) { - return getReplicaComputeCapacityFieldBuilder() + return internalGetReplicaComputeCapacityFieldBuilder() .addBuilder( index, com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.getDefaultInstance()); @@ -3681,17 +3696,17 @@ public Builder removeReplicaComputeCapacity(int index) { */ public java.util.List getReplicaComputeCapacityBuilderList() { - return getReplicaComputeCapacityFieldBuilder().getBuilderList(); + return internalGetReplicaComputeCapacityFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaComputeCapacity, com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder, com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder> - getReplicaComputeCapacityFieldBuilder() { + internalGetReplicaComputeCapacityFieldBuilder() { if (replicaComputeCapacityBuilder_ == null) { replicaComputeCapacityBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaComputeCapacity, com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder, com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder>( @@ -3705,7 +3720,7 @@ public Builder removeReplicaComputeCapacity(int index) { } private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig, com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> @@ -3890,7 +3905,7 @@ public Builder clearAutoscalingConfig() { getAutoscalingConfigBuilder() { bitField0_ |= 0x00000040; onChanged(); - return getAutoscalingConfigFieldBuilder().getBuilder(); + return internalGetAutoscalingConfigFieldBuilder().getBuilder(); } /** @@ -3932,14 +3947,14 @@ public Builder clearAutoscalingConfig() { * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig, com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> - getAutoscalingConfigFieldBuilder() { + internalGetAutoscalingConfigFieldBuilder() { if (autoscalingConfigBuilder_ == null) { autoscalingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig, com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder>( @@ -4113,11 +4128,11 @@ public int getLabelsCount() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4157,11 +4172,11 @@ public java.util.Map getLabels() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4191,11 +4206,11 @@ public java.util.Map getLabelsMap() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4232,11 +4247,11 @@ public java.util.Map getLabelsMap() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4279,11 +4294,11 @@ public Builder clearLabels() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4323,11 +4338,11 @@ public java.util.Map getMutableLabels() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4364,11 +4379,11 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4670,7 +4685,7 @@ public Builder addEndpointUrisBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -4829,7 +4844,7 @@ public Builder clearCreateTime() { public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000800; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } /** @@ -4864,14 +4879,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { + internalGetCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -4882,7 +4897,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { } private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -5041,7 +5056,7 @@ public Builder clearUpdateTime() { public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { bitField0_ |= 0x00001000; onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); } /** @@ -5076,14 +5091,14 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { + internalGetUpdateTimeFieldBuilder() { if (updateTimeBuilder_ == null) { updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -5094,7 +5109,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { } private com.google.spanner.admin.instance.v1.FreeInstanceMetadata freeInstanceMetadata_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.FreeInstanceMetadata, com.google.spanner.admin.instance.v1.FreeInstanceMetadata.Builder, com.google.spanner.admin.instance.v1.FreeInstanceMetadataOrBuilder> @@ -5251,7 +5266,7 @@ public Builder clearFreeInstanceMetadata() { getFreeInstanceMetadataBuilder() { bitField0_ |= 0x00002000; onChanged(); - return getFreeInstanceMetadataFieldBuilder().getBuilder(); + return internalGetFreeInstanceMetadataFieldBuilder().getBuilder(); } /** @@ -5285,14 +5300,14 @@ public Builder clearFreeInstanceMetadata() { * .google.spanner.admin.instance.v1.FreeInstanceMetadata free_instance_metadata = 13; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.FreeInstanceMetadata, com.google.spanner.admin.instance.v1.FreeInstanceMetadata.Builder, com.google.spanner.admin.instance.v1.FreeInstanceMetadataOrBuilder> - getFreeInstanceMetadataFieldBuilder() { + internalGetFreeInstanceMetadataFieldBuilder() { if (freeInstanceMetadataBuilder_ == null) { freeInstanceMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.FreeInstanceMetadata, com.google.spanner.admin.instance.v1.FreeInstanceMetadata.Builder, com.google.spanner.admin.instance.v1.FreeInstanceMetadataOrBuilder>( @@ -5564,17 +5579,6 @@ public Builder clearDefaultBackupScheduleType() { 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.admin.instance.v1.Instance) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfig.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfig.java index 0fb7cc5a728..ce4845c4b0d 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfig.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.InstanceConfig} */ -public final class InstanceConfig extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class InstanceConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.InstanceConfig) InstanceConfigOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InstanceConfig"); + } + // Use InstanceConfig.newBuilder() to construct. - private InstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private InstanceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -54,12 +66,6 @@ private InstanceConfig() { quorumType_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new InstanceConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_InstanceConfig_descriptor; @@ -78,7 +84,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_InstanceConfig_fieldAccessorTable @@ -130,6 +136,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + /** * * @@ -221,7 +237,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.InstanceConfig.getDescriptor() .getEnumTypes() .get(0); @@ -292,6 +308,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -384,7 +410,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.InstanceConfig.getDescriptor() .getEnumTypes() .get(1); @@ -480,6 +506,16 @@ public enum FreeInstanceAvailability implements com.google.protobuf.ProtocolMess UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FreeInstanceAvailability"); + } + /** * * @@ -604,7 +640,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.InstanceConfig.getDescriptor() .getEnumTypes() .get(2); @@ -693,6 +729,16 @@ public enum QuorumType implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QuorumType"); + } + /** * * @@ -805,7 +851,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.InstanceConfig.getDescriptor() .getEnumTypes() .get(3); @@ -1287,11 +1333,11 @@ public int getLabelsCount() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -1331,11 +1377,11 @@ public java.util.Map getLabels() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -1365,11 +1411,11 @@ public java.util.Map getLabelsMap() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -1406,11 +1452,11 @@ public java.util.Map getLabelsMap() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -1772,17 +1818,17 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); } for (int i = 0; i < replicas_.size(); i++) { output.writeMessage(3, replicas_.get(i)); } for (int i = 0; i < leaderOptions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, leaderOptions_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 4, leaderOptions_.getRaw(i)); } if (configType_ != com.google.spanner.admin.instance.v1.InstanceConfig.Type.TYPE_UNSPECIFIED.getNumber()) { @@ -1791,13 +1837,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < optionalReplicas_.size(); i++) { output.writeMessage(6, optionalReplicas_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseConfig_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, baseConfig_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(baseConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, baseConfig_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, etag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, etag_); } if (reconciling_ != false) { output.writeBool(10, reconciling_); @@ -1830,11 +1876,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); } for (int i = 0; i < replicas_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, replicas_.get(i)); @@ -1854,8 +1900,8 @@ public int getSerializedSize() { for (int i = 0; i < optionalReplicas_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, optionalReplicas_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseConfig_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, baseConfig_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(baseConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, baseConfig_); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { @@ -1867,8 +1913,8 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, etag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, etag_); } if (reconciling_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, reconciling_); @@ -2014,38 +2060,38 @@ public static com.google.spanner.admin.instance.v1.InstanceConfig parseFrom( public static com.google.spanner.admin.instance.v1.InstanceConfig parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.InstanceConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.InstanceConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.InstanceConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.InstanceConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.InstanceConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2068,7 +2114,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2083,7 +2129,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.InstanceConfig} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.InstanceConfig) com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder { @@ -2115,7 +2161,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_InstanceConfig_fieldAccessorTable @@ -2127,7 +2173,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi // Construct using com.google.spanner.admin.instance.v1.InstanceConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2260,39 +2306,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.InstanceConfig r } } - @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.admin.instance.v1.InstanceConfig) { @@ -2338,8 +2351,8 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.InstanceConfig oth replicas_ = other.replicas_; bitField0_ = (bitField0_ & ~0x00000008); replicasBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getReplicasFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReplicasFieldBuilder() : null; } else { replicasBuilder_.addAllMessages(other.replicas_); @@ -2365,8 +2378,8 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.InstanceConfig oth optionalReplicas_ = other.optionalReplicas_; bitField0_ = (bitField0_ & ~0x00000010); optionalReplicasBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getOptionalReplicasFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetOptionalReplicasFieldBuilder() : null; } else { optionalReplicasBuilder_.addAllMessages(other.optionalReplicas_); @@ -2927,7 +2940,7 @@ private void ensureReplicasIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaInfo, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder> @@ -3265,7 +3278,7 @@ public Builder removeReplicas(int index) { * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3; */ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder getReplicasBuilder(int index) { - return getReplicasFieldBuilder().getBuilder(index); + return internalGetReplicasFieldBuilder().getBuilder(index); } /** @@ -3332,7 +3345,7 @@ public com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder getReplicasOrBu * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3; */ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuilder() { - return getReplicasFieldBuilder() + return internalGetReplicasFieldBuilder() .addBuilder(com.google.spanner.admin.instance.v1.ReplicaInfo.getDefaultInstance()); } @@ -3352,7 +3365,7 @@ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuild * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3; */ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuilder(int index) { - return getReplicasFieldBuilder() + return internalGetReplicasFieldBuilder() .addBuilder(index, com.google.spanner.admin.instance.v1.ReplicaInfo.getDefaultInstance()); } @@ -3373,17 +3386,17 @@ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuild */ public java.util.List getReplicasBuilderList() { - return getReplicasFieldBuilder().getBuilderList(); + return internalGetReplicasFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaInfo, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder> - getReplicasFieldBuilder() { + internalGetReplicasFieldBuilder() { if (replicasBuilder_ == null) { replicasBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaInfo, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder>( @@ -3405,7 +3418,7 @@ private void ensureOptionalReplicasIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaInfo, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder> @@ -3708,7 +3721,7 @@ public Builder removeOptionalReplicas(int index) { */ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder getOptionalReplicasBuilder( int index) { - return getOptionalReplicasFieldBuilder().getBuilder(index); + return internalGetOptionalReplicasFieldBuilder().getBuilder(index); } /** @@ -3766,7 +3779,7 @@ public com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder getOptionalRepl * */ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addOptionalReplicasBuilder() { - return getOptionalReplicasFieldBuilder() + return internalGetOptionalReplicasFieldBuilder() .addBuilder(com.google.spanner.admin.instance.v1.ReplicaInfo.getDefaultInstance()); } @@ -3784,7 +3797,7 @@ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addOptionalRepli */ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addOptionalReplicasBuilder( int index) { - return getOptionalReplicasFieldBuilder() + return internalGetOptionalReplicasFieldBuilder() .addBuilder(index, com.google.spanner.admin.instance.v1.ReplicaInfo.getDefaultInstance()); } @@ -3802,17 +3815,17 @@ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addOptionalRepli */ public java.util.List getOptionalReplicasBuilderList() { - return getOptionalReplicasFieldBuilder().getBuilderList(); + return internalGetOptionalReplicasFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaInfo, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder> - getOptionalReplicasFieldBuilder() { + internalGetOptionalReplicasFieldBuilder() { if (optionalReplicasBuilder_ == null) { optionalReplicasBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaInfo, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder>( @@ -3988,11 +4001,11 @@ public int getLabelsCount() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4032,11 +4045,11 @@ public java.util.Map getLabels() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4066,11 +4079,11 @@ public java.util.Map getLabelsMap() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4107,11 +4120,11 @@ public java.util.Map getLabelsMap() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4154,11 +4167,11 @@ public Builder clearLabels() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4198,11 +4211,11 @@ public java.util.Map getMutableLabels() { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -4239,11 +4252,11 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -5076,17 +5089,6 @@ public Builder clearStorageLimitPerProcessingUnit() { 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.admin.instance.v1.InstanceConfig) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java index 5c63ed2a6af..4ddad6fa809 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigOrBuilder.java index ec156f976d3..a6613ef534e 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface InstanceConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.InstanceConfig) @@ -316,11 +318,11 @@ public interface InstanceConfigOrBuilder * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -347,11 +349,11 @@ public interface InstanceConfigOrBuilder * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -382,11 +384,11 @@ public interface InstanceConfigOrBuilder * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -413,11 +415,11 @@ public interface InstanceConfigOrBuilder * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -448,11 +450,11 @@ java.lang.String getLabelsOrDefault( * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java index e3a42f97f75..c6f2744d7c7 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java index b25a9e682be..f94850acab0 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface InstanceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.Instance) @@ -356,11 +358,11 @@ public interface InstanceOrBuilder * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -387,11 +389,11 @@ public interface InstanceOrBuilder * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -422,11 +424,11 @@ public interface InstanceOrBuilder * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -453,11 +455,11 @@ public interface InstanceOrBuilder * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * @@ -488,11 +490,11 @@ java.lang.String getLabelsOrDefault( * And they can be used as arguments to policy management rules (e.g. route, * firewall, load balancing, etc.). * - * * Label keys must be between 1 and 63 characters long and must conform to - * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform - * to the regular expression `[a-z0-9_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. + * * Label keys must be between 1 and 63 characters long and must conform to + * the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + * * Label values must be between 0 and 63 characters long and must conform + * to the regular expression `[a-z0-9_-]{0,63}`. + * * No more than 64 labels can be associated with a given resource. * * See https://goo.gl/xmQnxf for more information on and examples of labels. * diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartition.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartition.java index a857174da9f..afb6ca38d57 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartition.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartition.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.InstancePartition} */ -public final class InstancePartition extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class InstancePartition extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.InstancePartition) InstancePartitionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InstancePartition"); + } + // Use InstancePartition.newBuilder() to construct. - private InstancePartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private InstancePartition(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -50,19 +62,13 @@ private InstancePartition() { etag_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new InstancePartition(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_InstancePartition_fieldAccessorTable @@ -117,6 +123,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + /** * * @@ -211,7 +227,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.InstancePartition.getDescriptor() .getEnumTypes() .get(0); @@ -568,6 +584,75 @@ public int getProcessingUnits() { return 0; } + public static final int AUTOSCALING_CONFIG_FIELD_NUMBER = 13; + private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; + + /** + * + * + *
+   * Optional. The autoscaling configuration. Autoscaling is enabled if this
+   * field is set. When autoscaling is enabled, fields in compute_capacity are
+   * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+   * allocated to the instance partition.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoscalingConfig field is set. + */ + @java.lang.Override + public boolean hasAutoscalingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The autoscaling configuration. Autoscaling is enabled if this
+   * field is set. When autoscaling is enabled, fields in compute_capacity are
+   * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+   * allocated to the instance partition.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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_; + } + + /** + * + * + *
+   * Optional. The autoscaling configuration. Autoscaling is enabled if this
+   * field is set. When autoscaling is enabled, fields in compute_capacity are
+   * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+   * allocated to the instance partition.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @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 STATE_FIELD_NUMBER = 7; private int state_ = 0; @@ -628,7 +713,7 @@ public com.google.spanner.admin.instance.v1.InstancePartition.State getState() { */ @java.lang.Override public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** @@ -681,7 +766,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { */ @java.lang.Override public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** @@ -824,7 +909,7 @@ public com.google.protobuf.ByteString getReferencingDatabasesBytes(int index) { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @return A list containing the referencingBackups. */ @java.lang.Deprecated @@ -848,7 +933,7 @@ public com.google.protobuf.ProtocolStringList getReferencingBackupsList() { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @return The count of referencingBackups. */ @java.lang.Deprecated @@ -872,7 +957,7 @@ public int getReferencingBackupsCount() { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param index The index of the element to return. * @return The referencingBackups at the given index. */ @@ -897,7 +982,7 @@ public java.lang.String getReferencingBackups(int index) { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param index The index of the value to return. * @return The bytes of the referencingBackups at the given index. */ @@ -991,14 +1076,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(config_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, config_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); } if (computeCapacityCase_ == 5) { output.writeInt32(5, (int) ((java.lang.Integer) computeCapacity_)); @@ -1011,21 +1096,23 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(7, state_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(8, getCreateTime()); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(9, getUpdateTime()); } for (int i = 0; i < referencingDatabases_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 10, referencingDatabases_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 10, referencingDatabases_.getRaw(i)); } for (int i = 0; i < referencingBackups_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, referencingBackups_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 11, referencingBackups_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, etag_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, etag_); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(13, getAutoscalingConfig()); } getUnknownFields().writeTo(output); } @@ -1036,14 +1123,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(config_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, config_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); } if (computeCapacityCase_ == 5) { size += @@ -1060,10 +1147,10 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); } { @@ -1082,8 +1169,11 @@ public int getSerializedSize() { size += dataSize; size += 1 * getReferencingBackupsList().size(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, etag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, etag_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getAutoscalingConfig()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -1104,6 +1194,10 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getConfig().equals(other.getConfig())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasAutoscalingConfig() != other.hasAutoscalingConfig()) return false; + if (hasAutoscalingConfig()) { + if (!getAutoscalingConfig().equals(other.getAutoscalingConfig())) return false; + } if (state_ != other.state_) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { @@ -1144,6 +1238,10 @@ public int hashCode() { hash = (53 * hash) + getConfig().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); + if (hasAutoscalingConfig()) { + hash = (37 * hash) + AUTOSCALING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAutoscalingConfig().hashCode(); + } hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; if (hasCreateTime()) { @@ -1218,38 +1316,38 @@ public static com.google.spanner.admin.instance.v1.InstancePartition parseFrom( public static com.google.spanner.admin.instance.v1.InstancePartition parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.InstancePartition parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.InstancePartition parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.InstancePartition parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.InstancePartition parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.InstancePartition parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1273,7 +1371,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1288,7 +1386,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.InstancePartition} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.InstancePartition) com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder { @@ -1298,7 +1396,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_InstancePartition_fieldAccessorTable @@ -1312,15 +1410,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCreateTimeFieldBuilder(); - getUpdateTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAutoscalingConfigFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); } } @@ -1331,6 +1430,11 @@ public Builder clear() { name_ = ""; config_ = ""; displayName_ = ""; + autoscalingConfig_ = null; + if (autoscalingConfigBuilder_ != null) { + autoscalingConfigBuilder_.dispose(); + autoscalingConfigBuilder_ = null; + } state_ = 0; createTime_ = null; if (createTimeBuilder_ != null) { @@ -1393,27 +1497,34 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.InstancePartitio if (((from_bitField0_ & 0x00000004) != 0)) { result.displayName_ = displayName_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { - result.state_ = state_; + result.autoscalingConfig_ = + autoscalingConfigBuilder_ == null + ? autoscalingConfig_ + : autoscalingConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000040) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.state_ = state_; } if (((from_bitField0_ & 0x00000080) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { referencingDatabases_.makeImmutable(); result.referencingDatabases_ = referencingDatabases_; } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { referencingBackups_.makeImmutable(); result.referencingBackups_ = referencingBackups_; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.etag_ = etag_; } result.bitField0_ |= to_bitField0_; @@ -1424,39 +1535,6 @@ private void buildPartialOneofs(com.google.spanner.admin.instance.v1.InstancePar result.computeCapacity_ = this.computeCapacity_; } - @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.admin.instance.v1.InstancePartition) { @@ -1485,6 +1563,9 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.InstancePartition bitField0_ |= 0x00000004; onChanged(); } + if (other.hasAutoscalingConfig()) { + mergeAutoscalingConfig(other.getAutoscalingConfig()); + } if (other.state_ != 0) { setStateValue(other.getStateValue()); } @@ -1497,7 +1578,7 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.InstancePartition if (!other.referencingDatabases_.isEmpty()) { if (referencingDatabases_.isEmpty()) { referencingDatabases_ = other.referencingDatabases_; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; } else { ensureReferencingDatabasesIsMutable(); referencingDatabases_.addAll(other.referencingDatabases_); @@ -1507,7 +1588,7 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.InstancePartition if (!other.referencingBackups_.isEmpty()) { if (referencingBackups_.isEmpty()) { referencingBackups_ = other.referencingBackups_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; } else { ensureReferencingBackupsIsMutable(); referencingBackups_.addAll(other.referencingBackups_); @@ -1516,7 +1597,7 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.InstancePartition } if (!other.getEtag().isEmpty()) { etag_ = other.etag_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } switch (other.getComputeCapacityCase()) { @@ -1594,19 +1675,21 @@ public Builder mergeFrom( case 56: { state_ = input.readEnum(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 56 case 66: { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; break; } // case 66 case 74: { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; break; } // case 74 case 82: @@ -1626,9 +1709,16 @@ public Builder mergeFrom( case 98: { etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 98 + case 106: + { + input.readMessage( + internalGetAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2244,6 +2334,251 @@ public Builder clearProcessingUnits() { return this; } + private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.admin.instance.v1.AutoscalingConfig, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> + autoscalingConfigBuilder_; + + /** + * + * + *
+     * Optional. The autoscaling configuration. Autoscaling is enabled if this
+     * field is set. When autoscaling is enabled, fields in compute_capacity are
+     * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+     * allocated to the instance partition.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoscalingConfig field is set. + */ + public boolean hasAutoscalingConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. The autoscaling configuration. Autoscaling is enabled if this
+     * field is set. When autoscaling is enabled, fields in compute_capacity are
+     * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+     * allocated to the instance partition.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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(); + } + } + + /** + * + * + *
+     * Optional. The autoscaling configuration. Autoscaling is enabled if this
+     * field is set. When autoscaling is enabled, fields in compute_capacity are
+     * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+     * allocated to the instance partition.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + + /** + * + * + *
+     * Optional. The autoscaling configuration. Autoscaling is enabled if this
+     * field is set. When autoscaling is enabled, fields in compute_capacity are
+     * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+     * allocated to the instance partition.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + + /** + * + * + *
+     * Optional. The autoscaling configuration. Autoscaling is enabled if this
+     * field is set. When autoscaling is enabled, fields in compute_capacity are
+     * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+     * allocated to the instance partition.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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); + } + if (autoscalingConfig_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The autoscaling configuration. Autoscaling is enabled if this
+     * field is set. When autoscaling is enabled, fields in compute_capacity are
+     * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+     * allocated to the instance partition.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAutoscalingConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + autoscalingConfig_ = null; + if (autoscalingConfigBuilder_ != null) { + autoscalingConfigBuilder_.dispose(); + autoscalingConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The autoscaling configuration. Autoscaling is enabled if this
+     * field is set. When autoscaling is enabled, fields in compute_capacity are
+     * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+     * allocated to the instance partition.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder + getAutoscalingConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetAutoscalingConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The autoscaling configuration. Autoscaling is enabled if this
+     * field is set. When autoscaling is enabled, fields in compute_capacity are
+     * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+     * allocated to the instance partition.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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_; + } + } + + /** + * + * + *
+     * Optional. The autoscaling configuration. Autoscaling is enabled if this
+     * field is set. When autoscaling is enabled, fields in compute_capacity are
+     * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+     * allocated to the instance partition.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.admin.instance.v1.AutoscalingConfig, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> + internalGetAutoscalingConfigFieldBuilder() { + if (autoscalingConfigBuilder_ == null) { + autoscalingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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 int state_ = 0; /** @@ -2280,7 +2615,7 @@ public int getStateValue() { */ public Builder setStateValue(int value) { state_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2325,7 +2660,7 @@ public Builder setState(com.google.spanner.admin.instance.v1.InstancePartition.S if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; state_ = value.getNumber(); onChanged(); return this; @@ -2345,14 +2680,14 @@ public Builder setState(com.google.spanner.admin.instance.v1.InstancePartition.S * @return This builder for chaining. */ public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); state_ = 0; onChanged(); return this; } private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -2372,7 +2707,7 @@ public Builder clearState() { * @return Whether the createTime field is set. */ public boolean hasCreateTime() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** @@ -2418,7 +2753,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2440,7 +2775,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { createTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2458,7 +2793,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000080) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); @@ -2469,7 +2804,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { createTimeBuilder_.mergeFrom(value); } if (createTime_ != null) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); } return this; @@ -2487,7 +2822,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * */ public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); @@ -2509,9 +2844,9 @@ public Builder clearCreateTime() { * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } /** @@ -2546,14 +2881,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { + internalGetCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2564,7 +2899,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { } private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -2585,7 +2920,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** @@ -2633,7 +2968,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2656,7 +2991,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { updateTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2675,7 +3010,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000100) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); @@ -2686,7 +3021,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { updateTimeBuilder_.mergeFrom(value); } if (updateTime_ != null) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } return this; @@ -2705,7 +3040,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * */ public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); @@ -2728,9 +3063,9 @@ public Builder clearUpdateTime() { * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); } /** @@ -2767,14 +3102,14 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { + internalGetUpdateTimeFieldBuilder() { if (updateTimeBuilder_ == null) { updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2791,7 +3126,7 @@ private void ensureReferencingDatabasesIsMutable() { if (!referencingDatabases_.isModifiable()) { referencingDatabases_ = new com.google.protobuf.LazyStringArrayList(referencingDatabases_); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; } /** @@ -2901,7 +3236,7 @@ public Builder setReferencingDatabases(int index, java.lang.String value) { } ensureReferencingDatabasesIsMutable(); referencingDatabases_.set(index, value); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -2929,7 +3264,7 @@ public Builder addReferencingDatabases(java.lang.String value) { } ensureReferencingDatabasesIsMutable(); referencingDatabases_.add(value); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -2954,7 +3289,7 @@ public Builder addReferencingDatabases(java.lang.String value) { public Builder addAllReferencingDatabases(java.lang.Iterable values) { ensureReferencingDatabasesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencingDatabases_); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -2977,7 +3312,7 @@ public Builder addAllReferencingDatabases(java.lang.Iterable v */ public Builder clearReferencingDatabases() { referencingDatabases_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); ; onChanged(); return this; @@ -3007,7 +3342,7 @@ public Builder addReferencingDatabasesBytes(com.google.protobuf.ByteString value checkByteStringIsUtf8(value); ensureReferencingDatabasesIsMutable(); referencingDatabases_.add(value); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3019,7 +3354,7 @@ private void ensureReferencingBackupsIsMutable() { if (!referencingBackups_.isModifiable()) { referencingBackups_ = new com.google.protobuf.LazyStringArrayList(referencingBackups_); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; } /** @@ -3038,7 +3373,7 @@ private void ensureReferencingBackupsIsMutable() { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @return A list containing the referencingBackups. */ @java.lang.Deprecated @@ -3063,7 +3398,7 @@ public com.google.protobuf.ProtocolStringList getReferencingBackupsList() { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @return The count of referencingBackups. */ @java.lang.Deprecated @@ -3087,7 +3422,7 @@ public int getReferencingBackupsCount() { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param index The index of the element to return. * @return The referencingBackups at the given index. */ @@ -3112,7 +3447,7 @@ public java.lang.String getReferencingBackups(int index) { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param index The index of the value to return. * @return The bytes of the referencingBackups at the given index. */ @@ -3137,7 +3472,7 @@ public com.google.protobuf.ByteString getReferencingBackupsBytes(int index) { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param index The index to set the value at. * @param value The referencingBackups to set. * @return This builder for chaining. @@ -3149,7 +3484,7 @@ public Builder setReferencingBackups(int index, java.lang.String value) { } ensureReferencingBackupsIsMutable(); referencingBackups_.set(index, value); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3170,7 +3505,7 @@ public Builder setReferencingBackups(int index, java.lang.String value) { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param value The referencingBackups to add. * @return This builder for chaining. */ @@ -3181,7 +3516,7 @@ public Builder addReferencingBackups(java.lang.String value) { } ensureReferencingBackupsIsMutable(); referencingBackups_.add(value); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3202,7 +3537,7 @@ public Builder addReferencingBackups(java.lang.String value) { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param values The referencingBackups to add. * @return This builder for chaining. */ @@ -3210,7 +3545,7 @@ public Builder addReferencingBackups(java.lang.String value) { public Builder addAllReferencingBackups(java.lang.Iterable values) { ensureReferencingBackupsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencingBackups_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3231,13 +3566,13 @@ public Builder addAllReferencingBackups(java.lang.Iterable val * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearReferencingBackups() { referencingBackups_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); ; onChanged(); return this; @@ -3259,7 +3594,7 @@ public Builder clearReferencingBackups() { * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param value The bytes of the referencingBackups to add. * @return This builder for chaining. */ @@ -3271,7 +3606,7 @@ public Builder addReferencingBackupsBytes(com.google.protobuf.ByteString value) checkByteStringIsUtf8(value); ensureReferencingBackupsIsMutable(); referencingBackups_.add(value); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3368,7 +3703,7 @@ public Builder setEtag(java.lang.String value) { throw new NullPointerException(); } etag_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3395,7 +3730,7 @@ public Builder setEtag(java.lang.String value) { */ public Builder clearEtag() { etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -3427,22 +3762,11 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); etag_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; 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.admin.instance.v1.InstancePartition) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionName.java index cbf08a2b7c0..1812ebe25e1 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionName.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionOrBuilder.java index dbd05fab726..e60669462db 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstancePartitionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface InstancePartitionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.InstancePartition) @@ -200,6 +202,58 @@ public interface InstancePartitionOrBuilder */ int getProcessingUnits(); + /** + * + * + *
+   * Optional. The autoscaling configuration. Autoscaling is enabled if this
+   * field is set. When autoscaling is enabled, fields in compute_capacity are
+   * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+   * allocated to the instance partition.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoscalingConfig field is set. + */ + boolean hasAutoscalingConfig(); + + /** + * + * + *
+   * Optional. The autoscaling configuration. Autoscaling is enabled if this
+   * field is set. When autoscaling is enabled, fields in compute_capacity are
+   * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+   * allocated to the instance partition.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingConfig. + */ + com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig(); + + /** + * + * + *
+   * Optional. The autoscaling configuration. Autoscaling is enabled if this
+   * field is set. When autoscaling is enabled, fields in compute_capacity are
+   * treated as OUTPUT_ONLY fields and reflect the current compute capacity
+   * allocated to the instance partition.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder getAutoscalingConfigOrBuilder(); + /** * * @@ -399,7 +453,7 @@ public interface InstancePartitionOrBuilder * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @return A list containing the referencingBackups. */ @java.lang.Deprecated @@ -421,7 +475,7 @@ public interface InstancePartitionOrBuilder * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @return The count of referencingBackups. */ @java.lang.Deprecated @@ -443,7 +497,7 @@ public interface InstancePartitionOrBuilder * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param index The index of the element to return. * @return The referencingBackups at the given index. */ @@ -466,7 +520,7 @@ public interface InstancePartitionOrBuilder * * * @deprecated google.spanner.admin.instance.v1.InstancePartition.referencing_backups is - * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781 + * deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1855 * @param index The index of the value to return. * @return The bytes of the referencingBackups at the given index. */ diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequest.java index ec88a60681f..f1bc991ca78 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,16 +30,26 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest} */ -public final class ListInstanceConfigOperationsRequest - extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListInstanceConfigOperationsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest) ListInstanceConfigOperationsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstanceConfigOperationsRequest"); + } + // Use ListInstanceConfigOperationsRequest.newBuilder() to construct. private ListInstanceConfigOperationsRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +59,13 @@ private ListInstanceConfigOperationsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstanceConfigOperationsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_fieldAccessorTable @@ -147,19 +152,19 @@ public com.google.protobuf.ByteString getParentBytes() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -167,18 +172,18 @@ public com.google.protobuf.ByteString getParentBytes() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - * AND` \ - * `(metadata.instance_config.name:custom-config) AND` \ - * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - * * The instance configuration name contains "custom-config". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + * AND` \ + * `(metadata.instance_config.name:custom-config) AND` \ + * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + * * The instance configuration name contains "custom-config". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -212,19 +217,19 @@ public java.lang.String getFilter() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -232,18 +237,18 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - * AND` \ - * `(metadata.instance_config.name:custom-config) AND` \ - * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - * * The instance configuration name contains "custom-config". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + * AND` \ + * `(metadata.instance_config.name:custom-config) AND` \ + * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + * * The instance configuration name contains "custom-config". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -358,17 +363,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); } if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -379,17 +384,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); } 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -473,39 +478,39 @@ public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsR public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -529,7 +534,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -544,7 +549,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest) com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequestOrBuilder { @@ -554,7 +559,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_fieldAccessorTable @@ -568,7 +573,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -634,39 +639,6 @@ private void buildPartial0( } } - @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 @@ -913,19 +885,19 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -933,18 +905,18 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - * AND` \ - * `(metadata.instance_config.name:custom-config) AND` \ - * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - * * The instance configuration name contains "custom-config". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + * AND` \ + * `(metadata.instance_config.name:custom-config) AND` \ + * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + * * The instance configuration name contains "custom-config". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -977,19 +949,19 @@ public java.lang.String getFilter() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -997,18 +969,18 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - * AND` \ - * `(metadata.instance_config.name:custom-config) AND` \ - * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - * * The instance configuration name contains "custom-config". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + * AND` \ + * `(metadata.instance_config.name:custom-config) AND` \ + * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + * * The instance configuration name contains "custom-config". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -1041,19 +1013,19 @@ public com.google.protobuf.ByteString getFilterBytes() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1061,18 +1033,18 @@ public com.google.protobuf.ByteString getFilterBytes() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - * AND` \ - * `(metadata.instance_config.name:custom-config) AND` \ - * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - * * The instance configuration name contains "custom-config". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + * AND` \ + * `(metadata.instance_config.name:custom-config) AND` \ + * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + * * The instance configuration name contains "custom-config". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -1104,19 +1076,19 @@ public Builder setFilter(java.lang.String value) { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1124,18 +1096,18 @@ public Builder setFilter(java.lang.String value) { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - * AND` \ - * `(metadata.instance_config.name:custom-config) AND` \ - * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - * * The instance configuration name contains "custom-config". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + * AND` \ + * `(metadata.instance_config.name:custom-config) AND` \ + * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + * * The instance configuration name contains "custom-config". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -1163,19 +1135,19 @@ public Builder clearFilter() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1183,18 +1155,18 @@ public Builder clearFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - * AND` \ - * `(metadata.instance_config.name:custom-config) AND` \ - * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - * * The instance configuration name contains "custom-config". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + * AND` \ + * `(metadata.instance_config.name:custom-config) AND` \ + * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + * * The instance configuration name contains "custom-config". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -1403,17 +1375,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.ListInstanceConfigOperationsRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequestOrBuilder.java index 91a387925e7..af8d21bbeca 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstanceConfigOperationsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest) @@ -70,19 +72,19 @@ public interface ListInstanceConfigOperationsRequestOrBuilder * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -90,18 +92,18 @@ public interface ListInstanceConfigOperationsRequestOrBuilder * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - * AND` \ - * `(metadata.instance_config.name:custom-config) AND` \ - * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - * * The instance configuration name contains "custom-config". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + * AND` \ + * `(metadata.instance_config.name:custom-config) AND` \ + * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + * * The instance configuration name contains "custom-config". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; @@ -124,19 +126,19 @@ public interface ListInstanceConfigOperationsRequestOrBuilder * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -144,18 +146,18 @@ public interface ListInstanceConfigOperationsRequestOrBuilder * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - * AND` \ - * `(metadata.instance_config.name:custom-config) AND` \ - * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - * * The instance configuration name contains "custom-config". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + * AND` \ + * `(metadata.instance_config.name:custom-config) AND` \ + * `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + * * The instance configuration name contains "custom-config". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2; diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponse.java index ce1811b23ac..082dc8d36bc 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,16 +30,26 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse} */ -public final class ListInstanceConfigOperationsResponse - extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListInstanceConfigOperationsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse) ListInstanceConfigOperationsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstanceConfigOperationsResponse"); + } + // Use ListInstanceConfigOperationsResponse.newBuilder() to construct. private ListInstanceConfigOperationsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +58,13 @@ private ListInstanceConfigOperationsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstanceConfigOperationsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_fieldAccessorTable @@ -239,8 +244,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < operations_.size(); i++) { output.writeMessage(1, operations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -254,8 +259,8 @@ public int getSerializedSize() { for (int i = 0; i < operations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, operations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -335,39 +340,39 @@ public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsR public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -391,7 +396,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -406,7 +411,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse) com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponseOrBuilder { @@ -416,7 +421,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_fieldAccessorTable @@ -430,7 +435,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -506,39 +511,6 @@ private void buildPartial0( } } - @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 @@ -575,8 +547,8 @@ public Builder mergeFrom( operations_ = other.operations_; bitField0_ = (bitField0_ & ~0x00000001); operationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getOperationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetOperationsFieldBuilder() : null; } else { operationsBuilder_.addAllMessages(other.operations_); @@ -661,7 +633,7 @@ private void ensureOperationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> @@ -972,7 +944,7 @@ public Builder removeOperations(int index) { * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder getOperationsBuilder(int index) { - return getOperationsFieldBuilder().getBuilder(index); + return internalGetOperationsFieldBuilder().getBuilder(index); } /** @@ -1032,7 +1004,7 @@ public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int inde * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder addOperationsBuilder() { - return getOperationsFieldBuilder() + return internalGetOperationsFieldBuilder() .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); } @@ -1050,7 +1022,7 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder() { * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) { - return getOperationsFieldBuilder() + return internalGetOperationsFieldBuilder() .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); } @@ -1068,17 +1040,17 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) * repeated .google.longrunning.Operation operations = 1; */ public java.util.List getOperationsBuilderList() { - return getOperationsFieldBuilder().getBuilderList(); + return internalGetOperationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> - getOperationsFieldBuilder() { + internalGetOperationsFieldBuilder() { if (operationsBuilder_ == null) { operationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( @@ -1209,17 +1181,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.ListInstanceConfigOperationsResponse) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponseOrBuilder.java index f4a1d483491..4ca7d4055cd 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigOperationsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstanceConfigOperationsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequest.java index df5046bf3c6..14e719398e3 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstanceConfigsRequest} */ -public final class ListInstanceConfigsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListInstanceConfigsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstanceConfigsRequest) ListInstanceConfigsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstanceConfigsRequest"); + } + // Use ListInstanceConfigsRequest.newBuilder() to construct. - private ListInstanceConfigsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListInstanceConfigsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListInstanceConfigsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstanceConfigsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_fieldAccessorTable @@ -220,14 +226,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } getUnknownFields().writeTo(output); } @@ -238,14 +244,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -325,38 +331,38 @@ public static com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest pa public static com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -380,7 +386,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -395,7 +401,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstanceConfigsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstanceConfigsRequest) com.google.spanner.admin.instance.v1.ListInstanceConfigsRequestOrBuilder { @@ -405,7 +411,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_fieldAccessorTable @@ -417,7 +423,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -477,39 +483,6 @@ private void buildPartial0( } } - @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.admin.instance.v1.ListInstanceConfigsRequest) { @@ -917,17 +890,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.ListInstanceConfigsRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequestOrBuilder.java index adae114c2da..0d3a7e8620a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstanceConfigsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstanceConfigsRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponse.java index 37193468f1e..da4710b4cf1 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstanceConfigsResponse} */ -public final class ListInstanceConfigsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListInstanceConfigsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstanceConfigsResponse) ListInstanceConfigsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstanceConfigsResponse"); + } + // Use ListInstanceConfigsResponse.newBuilder() to construct. - private ListInstanceConfigsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListInstanceConfigsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListInstanceConfigsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstanceConfigsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_fieldAccessorTable @@ -218,8 +224,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instanceConfigs_.size(); i++) { output.writeMessage(1, instanceConfigs_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -233,8 +239,8 @@ public int getSerializedSize() { for (int i = 0; i < instanceConfigs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instanceConfigs_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -313,38 +319,38 @@ public static com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse p public static com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -368,7 +374,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -383,7 +389,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstanceConfigsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstanceConfigsResponse) com.google.spanner.admin.instance.v1.ListInstanceConfigsResponseOrBuilder { @@ -393,7 +399,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_fieldAccessorTable @@ -405,7 +411,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -478,39 +484,6 @@ private void buildPartial0( } } - @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.admin.instance.v1.ListInstanceConfigsResponse) { @@ -545,8 +518,8 @@ public Builder mergeFrom( instanceConfigs_ = other.instanceConfigs_; bitField0_ = (bitField0_ & ~0x00000001); instanceConfigsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInstanceConfigsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInstanceConfigsFieldBuilder() : null; } else { instanceConfigsBuilder_.addAllMessages(other.instanceConfigs_); @@ -635,7 +608,7 @@ private void ensureInstanceConfigsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> @@ -899,7 +872,7 @@ public Builder removeInstanceConfigs(int index) { */ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceConfigsBuilder( int index) { - return getInstanceConfigsFieldBuilder().getBuilder(index); + return internalGetInstanceConfigsFieldBuilder().getBuilder(index); } /** @@ -948,7 +921,7 @@ public com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder getInstanceC * repeated .google.spanner.admin.instance.v1.InstanceConfig instance_configs = 1; */ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder addInstanceConfigsBuilder() { - return getInstanceConfigsFieldBuilder() + return internalGetInstanceConfigsFieldBuilder() .addBuilder(com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance()); } @@ -963,7 +936,7 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder addInstanceCo */ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder addInstanceConfigsBuilder( int index) { - return getInstanceConfigsFieldBuilder() + return internalGetInstanceConfigsFieldBuilder() .addBuilder( index, com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance()); } @@ -979,17 +952,17 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder addInstanceCo */ public java.util.List getInstanceConfigsBuilderList() { - return getInstanceConfigsFieldBuilder().getBuilderList(); + return internalGetInstanceConfigsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> - getInstanceConfigsFieldBuilder() { + internalGetInstanceConfigsFieldBuilder() { if (instanceConfigsBuilder_ == null) { instanceConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder>( @@ -1123,17 +1096,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.ListInstanceConfigsResponse) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponseOrBuilder.java index 698ab90b1a3..760d3e75574 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstanceConfigsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstanceConfigsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstanceConfigsResponse) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequest.java index af8e9f489f2..57234d4bf92 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,16 +30,27 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest} */ +@com.google.protobuf.Generated public final class ListInstancePartitionOperationsRequest - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) ListInstancePartitionOperationsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstancePartitionOperationsRequest"); + } + // Use ListInstancePartitionOperationsRequest.newBuilder() to construct. private ListInstancePartitionOperationsRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +60,13 @@ private ListInstancePartitionOperationsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstancePartitionOperationsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_fieldAccessorTable @@ -149,19 +155,19 @@ public com.google.protobuf.ByteString getParentBytes() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -169,18 +175,18 @@ public com.google.protobuf.ByteString getParentBytes() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - * AND` \ - * `(metadata.instance_partition.name:custom-instance-partition) AND` \ - * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - * * The instance partition name contains "custom-instance-partition". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + * AND` \ + * `(metadata.instance_partition.name:custom-instance-partition) AND` \ + * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * * The instance partition name contains "custom-instance-partition". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -214,19 +220,19 @@ public java.lang.String getFilter() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -234,18 +240,18 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - * AND` \ - * `(metadata.instance_partition.name:custom-instance-partition) AND` \ - * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - * * The instance partition name contains "custom-instance-partition". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + * AND` \ + * `(metadata.instance_partition.name:custom-instance-partition) AND` \ + * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * * The instance partition name contains "custom-instance-partition". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -434,17 +440,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); } if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getInstancePartitionDeadline()); @@ -458,17 +464,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); } 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } if (((bitField0_ & 0x00000001) != 0)) { size += @@ -569,33 +575,33 @@ public int hashCode() { public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest @@ -603,7 +609,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -627,7 +633,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -642,7 +648,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequestOrBuilder { @@ -652,7 +658,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_fieldAccessorTable @@ -668,14 +674,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstancePartitionDeadlineFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstancePartitionDeadlineFieldBuilder(); } } @@ -756,39 +762,6 @@ private void buildPartial0( 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 @@ -880,7 +853,8 @@ public Builder mergeFrom( case 42: { input.readMessage( - getInstancePartitionDeadlineFieldBuilder().getBuilder(), extensionRegistry); + internalGetInstancePartitionDeadlineFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -1045,19 +1019,19 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1065,18 +1039,18 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - * AND` \ - * `(metadata.instance_partition.name:custom-instance-partition) AND` \ - * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - * * The instance partition name contains "custom-instance-partition". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + * AND` \ + * `(metadata.instance_partition.name:custom-instance-partition) AND` \ + * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * * The instance partition name contains "custom-instance-partition". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1109,19 +1083,19 @@ public java.lang.String getFilter() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1129,18 +1103,18 @@ public java.lang.String getFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - * AND` \ - * `(metadata.instance_partition.name:custom-instance-partition) AND` \ - * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - * * The instance partition name contains "custom-instance-partition". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + * AND` \ + * `(metadata.instance_partition.name:custom-instance-partition) AND` \ + * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * * The instance partition name contains "custom-instance-partition". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1173,19 +1147,19 @@ public com.google.protobuf.ByteString getFilterBytes() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1193,18 +1167,18 @@ public com.google.protobuf.ByteString getFilterBytes() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - * AND` \ - * `(metadata.instance_partition.name:custom-instance-partition) AND` \ - * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - * * The instance partition name contains "custom-instance-partition". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + * AND` \ + * `(metadata.instance_partition.name:custom-instance-partition) AND` \ + * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * * The instance partition name contains "custom-instance-partition". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1236,19 +1210,19 @@ public Builder setFilter(java.lang.String value) { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1256,18 +1230,18 @@ public Builder setFilter(java.lang.String value) { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - * AND` \ - * `(metadata.instance_partition.name:custom-instance-partition) AND` \ - * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - * * The instance partition name contains "custom-instance-partition". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + * AND` \ + * `(metadata.instance_partition.name:custom-instance-partition) AND` \ + * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * * The instance partition name contains "custom-instance-partition". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1295,19 +1269,19 @@ public Builder clearFilter() { * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -1315,18 +1289,18 @@ public Builder clearFilter() { * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - * AND` \ - * `(metadata.instance_partition.name:custom-instance-partition) AND` \ - * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - * * The instance partition name contains "custom-instance-partition". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + * AND` \ + * `(metadata.instance_partition.name:custom-instance-partition) AND` \ + * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * * The instance partition name contains "custom-instance-partition". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1536,7 +1510,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp instancePartitionDeadline_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1731,7 +1705,7 @@ public Builder clearInstancePartitionDeadline() { public com.google.protobuf.Timestamp.Builder getInstancePartitionDeadlineBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getInstancePartitionDeadlineFieldBuilder().getBuilder(); + return internalGetInstancePartitionDeadlineFieldBuilder().getBuilder(); } /** @@ -1776,14 +1750,14 @@ public com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuil * .google.protobuf.Timestamp instance_partition_deadline = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getInstancePartitionDeadlineFieldBuilder() { + internalGetInstancePartitionDeadlineFieldBuilder() { if (instancePartitionDeadlineBuilder_ == null) { instancePartitionDeadlineBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1793,17 +1767,6 @@ public com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuil return instancePartitionDeadlineBuilder_; } - @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.admin.instance.v1.ListInstancePartitionOperationsRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequestOrBuilder.java index 4d5dc5dcbc0..aac74b47c7e 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstancePartitionOperationsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest) @@ -70,19 +72,19 @@ public interface ListInstancePartitionOperationsRequestOrBuilder * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -90,18 +92,18 @@ public interface ListInstancePartitionOperationsRequestOrBuilder * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - * AND` \ - * `(metadata.instance_partition.name:custom-instance-partition) AND` \ - * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - * * The instance partition name contains "custom-instance-partition". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + * AND` \ + * `(metadata.instance_partition.name:custom-instance-partition) AND` \ + * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * * The instance partition name contains "custom-instance-partition". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -124,19 +126,19 @@ public interface ListInstancePartitionOperationsRequestOrBuilder * * The following fields in the Operation are eligible for filtering: * - * * `name` - The name of the long-running operation - * * `done` - False if the operation is in progress, else true. - * * `metadata.@type` - the type of metadata. For example, the type string - * for - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] - * is - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - * * `metadata.<field_name>` - any field in metadata.value. - * `metadata.@type` must be specified first, if filtering on metadata - * fields. - * * `error` - Error associated with the long-running operation. - * * `response.@type` - the type of response. - * * `response.<field_name>` - any field in response.value. + * * `name` - The name of the long-running operation + * * `done` - False if the operation is in progress, else true. + * * `metadata.@type` - the type of metadata. For example, the type string + * for + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata] + * is + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + * * `metadata.<field_name>` - any field in metadata.value. + * `metadata.@type` must be specified first, if filtering on metadata + * fields. + * * `error` - Error associated with the long-running operation. + * * `response.@type` - the type of response. + * * `response.<field_name>` - any field in response.value. * * You can combine multiple expressions by enclosing each expression in * parentheses. By default, expressions are combined with AND logic. However, @@ -144,18 +146,18 @@ public interface ListInstancePartitionOperationsRequestOrBuilder * * Here are a few examples: * - * * `done:true` - The operation is complete. - * * `(metadata.@type=` \ - * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - * AND` \ - * `(metadata.instance_partition.name:custom-instance-partition) AND` \ - * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - * `(error:*)` - Return operations where: - * * The operation's metadata type is - * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - * * The instance partition name contains "custom-instance-partition". - * * The operation started before 2021-03-28T14:50:00Z. - * * The operation resulted in an error. + * * `done:true` - The operation is complete. + * * `(metadata.@type=` \ + * `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + * AND` \ + * `(metadata.instance_partition.name:custom-instance-partition) AND` \ + * `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + * `(error:*)` - Return operations where: + * * The operation's metadata type is + * [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + * * The instance partition name contains "custom-instance-partition". + * * The operation started before 2021-03-28T14:50:00Z. + * * The operation resulted in an error. * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponse.java index 06c332ccaac..5f5ade9bd07 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,16 +30,27 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse} */ +@com.google.protobuf.Generated public final class ListInstancePartitionOperationsResponse - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) ListInstancePartitionOperationsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstancePartitionOperationsResponse"); + } + // Use ListInstancePartitionOperationsResponse.newBuilder() to construct. private ListInstancePartitionOperationsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +60,13 @@ private ListInstancePartitionOperationsResponse() { unreachableInstancePartitions_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstancePartitionOperationsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_fieldAccessorTable @@ -320,11 +326,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < operations_.size(); i++) { output.writeMessage(1, operations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } for (int i = 0; i < unreachableInstancePartitions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( + com.google.protobuf.GeneratedMessage.writeString( output, 3, unreachableInstancePartitions_.getRaw(i)); } getUnknownFields().writeTo(output); @@ -339,8 +345,8 @@ public int getSerializedSize() { for (int i = 0; i < operations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, operations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } { int dataSize = 0; @@ -437,33 +443,33 @@ public int hashCode() { public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse @@ -471,7 +477,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -495,7 +501,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -510,7 +516,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponseOrBuilder { @@ -520,7 +526,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_fieldAccessorTable @@ -534,7 +540,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -615,39 +621,6 @@ private void buildPartial0( } } - @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 @@ -684,8 +657,8 @@ public Builder mergeFrom( operations_ = other.operations_; bitField0_ = (bitField0_ & ~0x00000001); operationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getOperationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetOperationsFieldBuilder() : null; } else { operationsBuilder_.addAllMessages(other.operations_); @@ -787,7 +760,7 @@ private void ensureOperationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> @@ -1098,7 +1071,7 @@ public Builder removeOperations(int index) { * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder getOperationsBuilder(int index) { - return getOperationsFieldBuilder().getBuilder(index); + return internalGetOperationsFieldBuilder().getBuilder(index); } /** @@ -1158,7 +1131,7 @@ public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder(int inde * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder addOperationsBuilder() { - return getOperationsFieldBuilder() + return internalGetOperationsFieldBuilder() .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); } @@ -1176,7 +1149,7 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder() { * repeated .google.longrunning.Operation operations = 1; */ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) { - return getOperationsFieldBuilder() + return internalGetOperationsFieldBuilder() .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); } @@ -1194,17 +1167,17 @@ public com.google.longrunning.Operation.Builder addOperationsBuilder(int index) * repeated .google.longrunning.Operation operations = 1; */ public java.util.List getOperationsBuilderList() { - return getOperationsFieldBuilder().getBuilderList(); + return internalGetOperationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> - getOperationsFieldBuilder() { + internalGetOperationsFieldBuilder() { if (operationsBuilder_ == null) { operationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( @@ -1548,17 +1521,6 @@ public Builder addUnreachableInstancePartitionsBytes(com.google.protobuf.ByteStr 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.admin.instance.v1.ListInstancePartitionOperationsResponse) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponseOrBuilder.java index e1b3c36fe91..1650987228a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionOperationsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstancePartitionOperationsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequest.java index 4816ca2bcb3..aa50a42a678 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionsRequest} */ -public final class ListInstancePartitionsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListInstancePartitionsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancePartitionsRequest) ListInstancePartitionsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstancePartitionsRequest"); + } + // Use ListInstancePartitionsRequest.newBuilder() to construct. - private ListInstancePartitionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListInstancePartitionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListInstancePartitionsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstancePartitionsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_fieldAccessorTable @@ -297,14 +303,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getInstancePartitionDeadline()); @@ -318,14 +324,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } if (((bitField0_ & 0x00000001) != 0)) { size += @@ -419,39 +425,39 @@ public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -475,7 +481,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -490,7 +496,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancePartitionsRequest) com.google.spanner.admin.instance.v1.ListInstancePartitionsRequestOrBuilder { @@ -500,7 +506,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_fieldAccessorTable @@ -515,14 +521,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstancePartitionDeadlineFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstancePartitionDeadlineFieldBuilder(); } } @@ -597,39 +603,6 @@ private void buildPartial0( 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.admin.instance.v1.ListInstancePartitionsRequest) { @@ -709,7 +682,8 @@ public Builder mergeFrom( case 34: { input.readMessage( - getInstancePartitionDeadlineFieldBuilder().getBuilder(), extensionRegistry); + internalGetInstancePartitionDeadlineFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1054,7 +1028,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp instancePartitionDeadline_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1249,7 +1223,7 @@ public Builder clearInstancePartitionDeadline() { public com.google.protobuf.Timestamp.Builder getInstancePartitionDeadlineBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getInstancePartitionDeadlineFieldBuilder().getBuilder(); + return internalGetInstancePartitionDeadlineFieldBuilder().getBuilder(); } /** @@ -1294,14 +1268,14 @@ public com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuil * .google.protobuf.Timestamp instance_partition_deadline = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getInstancePartitionDeadlineFieldBuilder() { + internalGetInstancePartitionDeadlineFieldBuilder() { if (instancePartitionDeadlineBuilder_ == null) { instancePartitionDeadlineBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1311,17 +1285,6 @@ public com.google.protobuf.TimestampOrBuilder getInstancePartitionDeadlineOrBuil return instancePartitionDeadlineBuilder_; } - @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.admin.instance.v1.ListInstancePartitionsRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequestOrBuilder.java index 3a67d56f8d0..11e1a090964 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstancePartitionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancePartitionsRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponse.java index 5756bd291db..1c81a90e270 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,15 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionsResponse} */ -public final class ListInstancePartitionsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListInstancePartitionsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancePartitionsResponse) ListInstancePartitionsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstancePartitionsResponse"); + } + // Use ListInstancePartitionsResponse.newBuilder() to construct. - private ListInstancePartitionsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListInstancePartitionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +58,13 @@ private ListInstancePartitionsResponse() { unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstancePartitionsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_fieldAccessorTable @@ -306,11 +311,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instancePartitions_.size(); i++) { output.writeMessage(1, instancePartitions_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -325,8 +330,8 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instancePartitions_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } { int dataSize = 0; @@ -418,39 +423,39 @@ public static com.google.spanner.admin.instance.v1.ListInstancePartitionsRespons public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -474,7 +479,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -489,7 +494,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancePartitionsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancePartitionsResponse) com.google.spanner.admin.instance.v1.ListInstancePartitionsResponseOrBuilder { @@ -499,7 +504,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_fieldAccessorTable @@ -512,7 +517,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.admin.instance.v1.ListInstancePartitionsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -591,39 +596,6 @@ private void buildPartial0( } } - @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.admin.instance.v1.ListInstancePartitionsResponse) { @@ -659,8 +631,8 @@ public Builder mergeFrom( instancePartitions_ = other.instancePartitions_; bitField0_ = (bitField0_ & ~0x00000001); instancePartitionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInstancePartitionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInstancePartitionsFieldBuilder() : null; } else { instancePartitionsBuilder_.addAllMessages(other.instancePartitions_); @@ -766,7 +738,7 @@ private void ensureInstancePartitionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> @@ -1045,7 +1017,7 @@ public Builder removeInstancePartitions(int index) { */ public com.google.spanner.admin.instance.v1.InstancePartition.Builder getInstancePartitionsBuilder(int index) { - return getInstancePartitionsFieldBuilder().getBuilder(index); + return internalGetInstancePartitionsFieldBuilder().getBuilder(index); } /** @@ -1098,7 +1070,7 @@ public Builder removeInstancePartitions(int index) { */ public com.google.spanner.admin.instance.v1.InstancePartition.Builder addInstancePartitionsBuilder() { - return getInstancePartitionsFieldBuilder() + return internalGetInstancePartitionsFieldBuilder() .addBuilder(com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance()); } @@ -1114,7 +1086,7 @@ public Builder removeInstancePartitions(int index) { */ public com.google.spanner.admin.instance.v1.InstancePartition.Builder addInstancePartitionsBuilder(int index) { - return getInstancePartitionsFieldBuilder() + return internalGetInstancePartitionsFieldBuilder() .addBuilder( index, com.google.spanner.admin.instance.v1.InstancePartition.getDefaultInstance()); } @@ -1131,17 +1103,17 @@ public Builder removeInstancePartitions(int index) { */ public java.util.List getInstancePartitionsBuilderList() { - return getInstancePartitionsFieldBuilder().getBuilderList(); + return internalGetInstancePartitionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> - getInstancePartitionsFieldBuilder() { + internalGetInstancePartitionsFieldBuilder() { if (instancePartitionsBuilder_ == null) { instancePartitionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( @@ -1485,17 +1457,6 @@ public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.ListInstancePartitionsResponse) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponseOrBuilder.java index d1b5ac59ff6..e4acb763854 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancePartitionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstancePartitionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancePartitionsResponse) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java index 9bf2f97a9a1..f9eda720634 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancesRequest} */ -public final class ListInstancesRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListInstancesRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancesRequest) ListInstancesRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstancesRequest"); + } + // Use ListInstancesRequest.newBuilder() to construct. - private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListInstancesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private ListInstancesRequest() { filter_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstancesRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_fieldAccessorTable @@ -218,22 +224,22 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `name` - * * `display_name` - * * `labels.key` where key is the name of a label + * * `name` + * * `display_name` + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `name:*` --> The instance has a name. - * * `name:Howl` --> The instance's name contains the string "howl". - * * `name:HOWL` --> Equivalent to above. - * * `NAME:howl` --> Equivalent to above. - * * `labels.env:*` --> The instance has the label "env". - * * `labels.env:dev` --> The instance has the label "env" and the value of - * the label contains the string "dev". - * * `name:howl labels.env:dev` --> The instance's name contains "howl" and - * it has the label "env" with its value - * containing "dev". + * * `name:*` --> The instance has a name. + * * `name:Howl` --> The instance's name contains the string "howl". + * * `name:HOWL` --> Equivalent to above. + * * `NAME:howl` --> Equivalent to above. + * * `labels.env:*` --> The instance has the label "env". + * * `labels.env:dev` --> The instance has the label "env" and the value of + * the label contains the string "dev". + * * `name:howl labels.env:dev` --> The instance's name contains "howl" and + * it has the label "env" with its value + * containing "dev". * * * string filter = 4; @@ -260,22 +266,22 @@ public java.lang.String getFilter() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `name` - * * `display_name` - * * `labels.key` where key is the name of a label + * * `name` + * * `display_name` + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `name:*` --> The instance has a name. - * * `name:Howl` --> The instance's name contains the string "howl". - * * `name:HOWL` --> Equivalent to above. - * * `NAME:howl` --> Equivalent to above. - * * `labels.env:*` --> The instance has the label "env". - * * `labels.env:dev` --> The instance has the label "env" and the value of - * the label contains the string "dev". - * * `name:howl labels.env:dev` --> The instance's name contains "howl" and - * it has the label "env" with its value - * containing "dev". + * * `name:*` --> The instance has a name. + * * `name:Howl` --> The instance's name contains the string "howl". + * * `name:HOWL` --> Equivalent to above. + * * `NAME:howl` --> Equivalent to above. + * * `labels.env:*` --> The instance has the label "env". + * * `labels.env:dev` --> The instance has the label "env" and the value of + * the label contains the string "dev". + * * `name:howl labels.env:dev` --> The instance's name contains "howl" and + * it has the label "env" with its value + * containing "dev". * * * string filter = 4; @@ -377,17 +383,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getInstanceDeadline()); @@ -401,17 +407,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInstanceDeadline()); @@ -505,38 +511,38 @@ public static com.google.spanner.admin.instance.v1.ListInstancesRequest parseFro public static com.google.spanner.admin.instance.v1.ListInstancesRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancesRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancesRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancesRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancesRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -560,7 +566,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -575,7 +581,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancesRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancesRequest) com.google.spanner.admin.instance.v1.ListInstancesRequestOrBuilder { @@ -585,7 +591,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_fieldAccessorTable @@ -599,14 +605,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstanceDeadlineFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceDeadlineFieldBuilder(); } } @@ -680,39 +686,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.ListInstancesReq 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.admin.instance.v1.ListInstancesRequest) { @@ -800,7 +773,7 @@ public Builder mergeFrom( case 42: { input.readMessage( - getInstanceDeadlineFieldBuilder().getBuilder(), extensionRegistry); + internalGetInstanceDeadlineFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -1143,22 +1116,22 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `name` - * * `display_name` - * * `labels.key` where key is the name of a label + * * `name` + * * `display_name` + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `name:*` --> The instance has a name. - * * `name:Howl` --> The instance's name contains the string "howl". - * * `name:HOWL` --> Equivalent to above. - * * `NAME:howl` --> Equivalent to above. - * * `labels.env:*` --> The instance has the label "env". - * * `labels.env:dev` --> The instance has the label "env" and the value of - * the label contains the string "dev". - * * `name:howl labels.env:dev` --> The instance's name contains "howl" and - * it has the label "env" with its value - * containing "dev". + * * `name:*` --> The instance has a name. + * * `name:Howl` --> The instance's name contains the string "howl". + * * `name:HOWL` --> Equivalent to above. + * * `NAME:howl` --> Equivalent to above. + * * `labels.env:*` --> The instance has the label "env". + * * `labels.env:dev` --> The instance has the label "env" and the value of + * the label contains the string "dev". + * * `name:howl labels.env:dev` --> The instance's name contains "howl" and + * it has the label "env" with its value + * containing "dev". * * * string filter = 4; @@ -1184,22 +1157,22 @@ public java.lang.String getFilter() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `name` - * * `display_name` - * * `labels.key` where key is the name of a label + * * `name` + * * `display_name` + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `name:*` --> The instance has a name. - * * `name:Howl` --> The instance's name contains the string "howl". - * * `name:HOWL` --> Equivalent to above. - * * `NAME:howl` --> Equivalent to above. - * * `labels.env:*` --> The instance has the label "env". - * * `labels.env:dev` --> The instance has the label "env" and the value of - * the label contains the string "dev". - * * `name:howl labels.env:dev` --> The instance's name contains "howl" and - * it has the label "env" with its value - * containing "dev". + * * `name:*` --> The instance has a name. + * * `name:Howl` --> The instance's name contains the string "howl". + * * `name:HOWL` --> Equivalent to above. + * * `NAME:howl` --> Equivalent to above. + * * `labels.env:*` --> The instance has the label "env". + * * `labels.env:dev` --> The instance has the label "env" and the value of + * the label contains the string "dev". + * * `name:howl labels.env:dev` --> The instance's name contains "howl" and + * it has the label "env" with its value + * containing "dev". * * * string filter = 4; @@ -1225,22 +1198,22 @@ public com.google.protobuf.ByteString getFilterBytes() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `name` - * * `display_name` - * * `labels.key` where key is the name of a label + * * `name` + * * `display_name` + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `name:*` --> The instance has a name. - * * `name:Howl` --> The instance's name contains the string "howl". - * * `name:HOWL` --> Equivalent to above. - * * `NAME:howl` --> Equivalent to above. - * * `labels.env:*` --> The instance has the label "env". - * * `labels.env:dev` --> The instance has the label "env" and the value of - * the label contains the string "dev". - * * `name:howl labels.env:dev` --> The instance's name contains "howl" and - * it has the label "env" with its value - * containing "dev". + * * `name:*` --> The instance has a name. + * * `name:Howl` --> The instance's name contains the string "howl". + * * `name:HOWL` --> Equivalent to above. + * * `NAME:howl` --> Equivalent to above. + * * `labels.env:*` --> The instance has the label "env". + * * `labels.env:dev` --> The instance has the label "env" and the value of + * the label contains the string "dev". + * * `name:howl labels.env:dev` --> The instance's name contains "howl" and + * it has the label "env" with its value + * containing "dev". * * * string filter = 4; @@ -1265,22 +1238,22 @@ public Builder setFilter(java.lang.String value) { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `name` - * * `display_name` - * * `labels.key` where key is the name of a label + * * `name` + * * `display_name` + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `name:*` --> The instance has a name. - * * `name:Howl` --> The instance's name contains the string "howl". - * * `name:HOWL` --> Equivalent to above. - * * `NAME:howl` --> Equivalent to above. - * * `labels.env:*` --> The instance has the label "env". - * * `labels.env:dev` --> The instance has the label "env" and the value of - * the label contains the string "dev". - * * `name:howl labels.env:dev` --> The instance's name contains "howl" and - * it has the label "env" with its value - * containing "dev". + * * `name:*` --> The instance has a name. + * * `name:Howl` --> The instance's name contains the string "howl". + * * `name:HOWL` --> Equivalent to above. + * * `NAME:howl` --> Equivalent to above. + * * `labels.env:*` --> The instance has the label "env". + * * `labels.env:dev` --> The instance has the label "env" and the value of + * the label contains the string "dev". + * * `name:howl labels.env:dev` --> The instance's name contains "howl" and + * it has the label "env" with its value + * containing "dev". * * * string filter = 4; @@ -1301,22 +1274,22 @@ public Builder clearFilter() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `name` - * * `display_name` - * * `labels.key` where key is the name of a label + * * `name` + * * `display_name` + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `name:*` --> The instance has a name. - * * `name:Howl` --> The instance's name contains the string "howl". - * * `name:HOWL` --> Equivalent to above. - * * `NAME:howl` --> Equivalent to above. - * * `labels.env:*` --> The instance has the label "env". - * * `labels.env:dev` --> The instance has the label "env" and the value of - * the label contains the string "dev". - * * `name:howl labels.env:dev` --> The instance's name contains "howl" and - * it has the label "env" with its value - * containing "dev". + * * `name:*` --> The instance has a name. + * * `name:Howl` --> The instance's name contains the string "howl". + * * `name:HOWL` --> Equivalent to above. + * * `NAME:howl` --> Equivalent to above. + * * `labels.env:*` --> The instance has the label "env". + * * `labels.env:dev` --> The instance has the label "env" and the value of + * the label contains the string "dev". + * * `name:howl labels.env:dev` --> The instance's name contains "howl" and + * it has the label "env" with its value + * containing "dev". * * * string filter = 4; @@ -1336,7 +1309,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp instanceDeadline_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1516,7 +1489,7 @@ public Builder clearInstanceDeadline() { public com.google.protobuf.Timestamp.Builder getInstanceDeadlineBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getInstanceDeadlineFieldBuilder().getBuilder(); + return internalGetInstanceDeadlineFieldBuilder().getBuilder(); } /** @@ -1557,14 +1530,14 @@ public com.google.protobuf.TimestampOrBuilder getInstanceDeadlineOrBuilder() { * * .google.protobuf.Timestamp instance_deadline = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getInstanceDeadlineFieldBuilder() { + internalGetInstanceDeadlineFieldBuilder() { if (instanceDeadlineBuilder_ == null) { instanceDeadlineBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1574,17 +1547,6 @@ public com.google.protobuf.TimestampOrBuilder getInstanceDeadlineOrBuilder() { return instanceDeadlineBuilder_; } - @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.admin.instance.v1.ListInstancesRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java index dee5ffd641b..6f3b8901076 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstancesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancesRequest) @@ -109,22 +111,22 @@ public interface ListInstancesRequestOrBuilder * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `name` - * * `display_name` - * * `labels.key` where key is the name of a label + * * `name` + * * `display_name` + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `name:*` --> The instance has a name. - * * `name:Howl` --> The instance's name contains the string "howl". - * * `name:HOWL` --> Equivalent to above. - * * `NAME:howl` --> Equivalent to above. - * * `labels.env:*` --> The instance has the label "env". - * * `labels.env:dev` --> The instance has the label "env" and the value of - * the label contains the string "dev". - * * `name:howl labels.env:dev` --> The instance's name contains "howl" and - * it has the label "env" with its value - * containing "dev". + * * `name:*` --> The instance has a name. + * * `name:Howl` --> The instance's name contains the string "howl". + * * `name:HOWL` --> Equivalent to above. + * * `NAME:howl` --> Equivalent to above. + * * `labels.env:*` --> The instance has the label "env". + * * `labels.env:dev` --> The instance has the label "env" and the value of + * the label contains the string "dev". + * * `name:howl labels.env:dev` --> The instance's name contains "howl" and + * it has the label "env" with its value + * containing "dev". * * * string filter = 4; @@ -140,22 +142,22 @@ public interface ListInstancesRequestOrBuilder * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `name` - * * `display_name` - * * `labels.key` where key is the name of a label + * * `name` + * * `display_name` + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `name:*` --> The instance has a name. - * * `name:Howl` --> The instance's name contains the string "howl". - * * `name:HOWL` --> Equivalent to above. - * * `NAME:howl` --> Equivalent to above. - * * `labels.env:*` --> The instance has the label "env". - * * `labels.env:dev` --> The instance has the label "env" and the value of - * the label contains the string "dev". - * * `name:howl labels.env:dev` --> The instance's name contains "howl" and - * it has the label "env" with its value - * containing "dev". + * * `name:*` --> The instance has a name. + * * `name:Howl` --> The instance's name contains the string "howl". + * * `name:HOWL` --> Equivalent to above. + * * `NAME:howl` --> Equivalent to above. + * * `labels.env:*` --> The instance has the label "env". + * * `labels.env:dev` --> The instance has the label "env" and the value of + * the label contains the string "dev". + * * `name:howl labels.env:dev` --> The instance's name contains "howl" and + * it has the label "env" with its value + * containing "dev". * * * string filter = 4; diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java index c5d6f72dacd..22870d6b6d5 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancesResponse} */ -public final class ListInstancesResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListInstancesResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ListInstancesResponse) ListInstancesResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListInstancesResponse"); + } + // Use ListInstancesResponse.newBuilder() to construct. - private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListInstancesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private ListInstancesResponse() { unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListInstancesResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_fieldAccessorTable @@ -297,11 +303,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { output.writeMessage(1, instances_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -315,8 +321,8 @@ public int getSerializedSize() { for (int i = 0; i < instances_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instances_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } { int dataSize = 0; @@ -408,38 +414,38 @@ public static com.google.spanner.admin.instance.v1.ListInstancesResponse parseFr public static com.google.spanner.admin.instance.v1.ListInstancesResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancesResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancesResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancesResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ListInstancesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ListInstancesResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -463,7 +469,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -478,7 +484,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ListInstancesResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ListInstancesResponse) com.google.spanner.admin.instance.v1.ListInstancesResponseOrBuilder { @@ -488,7 +494,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_fieldAccessorTable @@ -500,7 +506,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.ListInstancesResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -576,39 +582,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.ListInstancesRes } } - @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.admin.instance.v1.ListInstancesResponse) { @@ -641,8 +614,8 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.ListInstancesRespo instances_ = other.instances_; bitField0_ = (bitField0_ & ~0x00000001); instancesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInstancesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInstancesFieldBuilder() : null; } else { instancesBuilder_.addAllMessages(other.instances_); @@ -746,7 +719,7 @@ private void ensureInstancesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> @@ -1006,7 +979,7 @@ public Builder removeInstances(int index) { * repeated .google.spanner.admin.instance.v1.Instance instances = 1; */ public com.google.spanner.admin.instance.v1.Instance.Builder getInstancesBuilder(int index) { - return getInstancesFieldBuilder().getBuilder(index); + return internalGetInstancesFieldBuilder().getBuilder(index); } /** @@ -1054,7 +1027,7 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstancesOrBuil * repeated .google.spanner.admin.instance.v1.Instance instances = 1; */ public com.google.spanner.admin.instance.v1.Instance.Builder addInstancesBuilder() { - return getInstancesFieldBuilder() + return internalGetInstancesFieldBuilder() .addBuilder(com.google.spanner.admin.instance.v1.Instance.getDefaultInstance()); } @@ -1068,7 +1041,7 @@ public com.google.spanner.admin.instance.v1.Instance.Builder addInstancesBuilder * repeated .google.spanner.admin.instance.v1.Instance instances = 1; */ public com.google.spanner.admin.instance.v1.Instance.Builder addInstancesBuilder(int index) { - return getInstancesFieldBuilder() + return internalGetInstancesFieldBuilder() .addBuilder(index, com.google.spanner.admin.instance.v1.Instance.getDefaultInstance()); } @@ -1083,17 +1056,17 @@ public com.google.spanner.admin.instance.v1.Instance.Builder addInstancesBuilder */ public java.util.List getInstancesBuilderList() { - return getInstancesFieldBuilder().getBuilderList(); + return internalGetInstancesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> - getInstancesFieldBuilder() { + internalGetInstancesFieldBuilder() { if (instancesBuilder_ == null) { instancesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder>( @@ -1434,17 +1407,6 @@ public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.ListInstancesResponse) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java index 852d176a021..cbaca0c044e 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ListInstancesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ListInstancesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ListInstancesResponse) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceMetadata.java index ee91bf1dab4..0678ce39e3a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.MoveInstanceMetadata} */ -public final class MoveInstanceMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MoveInstanceMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.MoveInstanceMetadata) MoveInstanceMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MoveInstanceMetadata"); + } + // Use MoveInstanceMetadata.newBuilder() to construct. - private MoveInstanceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MoveInstanceMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private MoveInstanceMetadata() { targetConfig_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MoveInstanceMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_fieldAccessorTable @@ -249,8 +255,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetConfig_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, targetConfig_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, targetConfig_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getProgress()); @@ -267,8 +273,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetConfig_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, targetConfig_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, targetConfig_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProgress()); @@ -364,38 +370,38 @@ public static com.google.spanner.admin.instance.v1.MoveInstanceMetadata parseFro public static com.google.spanner.admin.instance.v1.MoveInstanceMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.MoveInstanceMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.MoveInstanceMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.MoveInstanceMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.MoveInstanceMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.MoveInstanceMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -419,7 +425,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -434,7 +440,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.MoveInstanceMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.MoveInstanceMetadata) com.google.spanner.admin.instance.v1.MoveInstanceMetadataOrBuilder { @@ -444,7 +450,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_fieldAccessorTable @@ -458,15 +464,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProgressFieldBuilder(); - getCancelTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetProgressFieldBuilder(); + internalGetCancelTimeFieldBuilder(); } } @@ -536,39 +542,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.MoveInstanceMeta 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.admin.instance.v1.MoveInstanceMetadata) { @@ -627,13 +600,15 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -773,7 +748,7 @@ public Builder setTargetConfigBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.instance.v1.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.OperationProgress, com.google.spanner.admin.instance.v1.OperationProgress.Builder, com.google.spanner.admin.instance.v1.OperationProgressOrBuilder> @@ -948,7 +923,7 @@ public Builder clearProgress() { public com.google.spanner.admin.instance.v1.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } /** @@ -987,14 +962,14 @@ public com.google.spanner.admin.instance.v1.OperationProgressOrBuilder getProgre * * .google.spanner.admin.instance.v1.OperationProgress progress = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.OperationProgress, com.google.spanner.admin.instance.v1.OperationProgress.Builder, com.google.spanner.admin.instance.v1.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.OperationProgress, com.google.spanner.admin.instance.v1.OperationProgress.Builder, com.google.spanner.admin.instance.v1.OperationProgressOrBuilder>( @@ -1005,7 +980,7 @@ public com.google.spanner.admin.instance.v1.OperationProgressOrBuilder getProgre } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1150,7 +1125,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1181,14 +1156,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1198,17 +1173,6 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { return cancelTimeBuilder_; } - @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.admin.instance.v1.MoveInstanceMetadata) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceMetadataOrBuilder.java index 46fe6784f2f..4c7f27f843a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface MoveInstanceMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.MoveInstanceMetadata) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceRequest.java index 8f5ad280202..479dc2c903c 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.MoveInstanceRequest} */ -public final class MoveInstanceRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MoveInstanceRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.MoveInstanceRequest) MoveInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MoveInstanceRequest"); + } + // Use MoveInstanceRequest.newBuilder() to construct. - private MoveInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MoveInstanceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private MoveInstanceRequest() { targetConfig_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MoveInstanceRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_fieldAccessorTable @@ -198,11 +204,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetConfig_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetConfig_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, targetConfig_); } getUnknownFields().writeTo(output); } @@ -213,11 +219,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetConfig_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetConfig_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, targetConfig_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -294,38 +300,38 @@ public static com.google.spanner.admin.instance.v1.MoveInstanceRequest parseFrom public static com.google.spanner.admin.instance.v1.MoveInstanceRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.MoveInstanceRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.MoveInstanceRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.MoveInstanceRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.MoveInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.MoveInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -349,7 +355,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -364,7 +370,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.MoveInstanceRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.MoveInstanceRequest) com.google.spanner.admin.instance.v1.MoveInstanceRequestOrBuilder { @@ -374,7 +380,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_fieldAccessorTable @@ -386,7 +392,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.MoveInstanceRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -440,39 +446,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.MoveInstanceRequ } } - @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.admin.instance.v1.MoveInstanceRequest) { @@ -805,17 +778,6 @@ public Builder setTargetConfigBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.MoveInstanceRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceRequestOrBuilder.java index 3be9e40e5da..9af48e1a603 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface MoveInstanceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.MoveInstanceRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceResponse.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceResponse.java index cf398f3d4d5..f0ecd442f86 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceResponse.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.MoveInstanceResponse} */ -public final class MoveInstanceResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MoveInstanceResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.MoveInstanceResponse) MoveInstanceResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MoveInstanceResponse"); + } + // Use MoveInstanceResponse.newBuilder() to construct. - private MoveInstanceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MoveInstanceResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MoveInstanceResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MoveInstanceResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_fieldAccessorTable @@ -155,38 +161,38 @@ public static com.google.spanner.admin.instance.v1.MoveInstanceResponse parseFro public static com.google.spanner.admin.instance.v1.MoveInstanceResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.MoveInstanceResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.MoveInstanceResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.MoveInstanceResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.MoveInstanceResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.MoveInstanceResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -210,7 +216,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -225,7 +231,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.MoveInstanceResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.MoveInstanceResponse) com.google.spanner.admin.instance.v1.MoveInstanceResponseOrBuilder { @@ -235,7 +241,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_fieldAccessorTable @@ -247,7 +253,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.MoveInstanceResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -285,39 +291,6 @@ public com.google.spanner.admin.instance.v1.MoveInstanceResponse buildPartial() return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.admin.instance.v1.MoveInstanceResponse) { @@ -374,17 +347,6 @@ public Builder mergeFrom( 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.admin.instance.v1.MoveInstanceResponse) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceResponseOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceResponseOrBuilder.java index 42305be5f15..2c1187f7334 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceResponseOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/MoveInstanceResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface MoveInstanceResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.MoveInstanceResponse) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgress.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgress.java index 1e152b89e75..af031df189c 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgress.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgress.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.OperationProgress} */ -public final class OperationProgress extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class OperationProgress extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.OperationProgress) OperationProgressOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationProgress"); + } + // Use OperationProgress.newBuilder() to construct. - private OperationProgress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private OperationProgress(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private OperationProgress() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OperationProgress(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.CommonProto .internal_static_google_spanner_admin_instance_v1_OperationProgress_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.CommonProto .internal_static_google_spanner_admin_instance_v1_OperationProgress_fieldAccessorTable @@ -314,38 +320,38 @@ public static com.google.spanner.admin.instance.v1.OperationProgress parseFrom( public static com.google.spanner.admin.instance.v1.OperationProgress parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.OperationProgress parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.OperationProgress parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.OperationProgress parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.OperationProgress parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.OperationProgress parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -369,7 +375,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -384,7 +390,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.OperationProgress} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.OperationProgress) com.google.spanner.admin.instance.v1.OperationProgressOrBuilder { @@ -394,7 +400,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.CommonProto .internal_static_google_spanner_admin_instance_v1_OperationProgress_fieldAccessorTable @@ -408,15 +414,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStartTimeFieldBuilder(); - getEndTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); } } @@ -486,39 +492,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.OperationProgres 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.admin.instance.v1.OperationProgress) { @@ -575,13 +548,14 @@ public Builder mergeFrom( } // case 8 case 18: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -664,7 +638,7 @@ public Builder clearProgressPercent() { } private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -807,7 +781,7 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } /** @@ -836,14 +810,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_time = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { + internalGetStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -854,7 +828,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1004,7 +978,7 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } /** @@ -1035,14 +1009,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * .google.protobuf.Timestamp end_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { + internalGetEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1052,17 +1026,6 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTimeBuilder_; } - @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.admin.instance.v1.OperationProgress) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgressOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgressOrBuilder.java index 67d3ef88ca1..07b0fb9f8bc 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgressOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/OperationProgressOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface OperationProgressOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.OperationProgress) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java index a3f0e98077e..e23ddfeff71 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ProjectName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacity.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacity.java index e4f62076b06..1830b4e06ee 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacity.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacity.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ReplicaComputeCapacity} */ -public final class ReplicaComputeCapacity extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReplicaComputeCapacity extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ReplicaComputeCapacity) ReplicaComputeCapacityOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReplicaComputeCapacity"); + } + // Use ReplicaComputeCapacity.newBuilder() to construct. - private ReplicaComputeCapacity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReplicaComputeCapacity(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ReplicaComputeCapacity() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReplicaComputeCapacity(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_fieldAccessorTable @@ -408,38 +414,38 @@ public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity parseF public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -463,7 +469,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -478,7 +484,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ReplicaComputeCapacity} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ReplicaComputeCapacity) com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder { @@ -488,7 +494,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_fieldAccessorTable @@ -502,14 +508,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getReplicaSelectionFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetReplicaSelectionFieldBuilder(); } } @@ -576,39 +582,6 @@ private void buildPartialOneofs( result.computeCapacity_ = this.computeCapacity_; } - @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.admin.instance.v1.ReplicaComputeCapacity) { @@ -670,7 +643,7 @@ public Builder mergeFrom( case 10: { input.readMessage( - getReplicaSelectionFieldBuilder().getBuilder(), extensionRegistry); + internalGetReplicaSelectionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -720,7 +693,7 @@ public Builder clearComputeCapacity() { private int bitField0_; private com.google.spanner.admin.instance.v1.ReplicaSelection replicaSelection_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaSelection, com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder> @@ -891,7 +864,7 @@ public Builder clearReplicaSelection() { getReplicaSelectionBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getReplicaSelectionFieldBuilder().getBuilder(); + return internalGetReplicaSelectionFieldBuilder().getBuilder(); } /** @@ -929,14 +902,14 @@ public Builder clearReplicaSelection() { * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaSelection, com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder> - getReplicaSelectionFieldBuilder() { + internalGetReplicaSelectionFieldBuilder() { if (replicaSelectionBuilder_ == null) { replicaSelectionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaSelection, com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder>( @@ -1116,17 +1089,6 @@ public Builder clearProcessingUnits() { 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.admin.instance.v1.ReplicaComputeCapacity) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacityOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacityOrBuilder.java index 6f35b5444d0..d9f5c6e879a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacityOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacityOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ReplicaComputeCapacityOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ReplicaComputeCapacity) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfo.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfo.java index e0051917235..d4146416acc 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfo.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,20 +14,32 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** Protobuf type {@code google.spanner.admin.instance.v1.ReplicaInfo} */ -public final class ReplicaInfo extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReplicaInfo extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ReplicaInfo) ReplicaInfoOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReplicaInfo"); + } + // Use ReplicaInfo.newBuilder() to construct. - private ReplicaInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReplicaInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -36,19 +48,13 @@ private ReplicaInfo() { type_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReplicaInfo(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ReplicaInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ReplicaInfo_fieldAccessorTable @@ -129,6 +135,16 @@ public enum ReplicaType implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReplicaType"); + } + /** * * @@ -250,7 +266,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.admin.instance.v1.ReplicaInfo.getDescriptor().getEnumTypes().get(0); } @@ -403,8 +419,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, location_); } if (type_ != com.google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType.TYPE_UNSPECIFIED @@ -423,8 +439,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, location_); } if (type_ != com.google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType.TYPE_UNSPECIFIED @@ -512,38 +528,38 @@ public static com.google.spanner.admin.instance.v1.ReplicaInfo parseFrom( public static com.google.spanner.admin.instance.v1.ReplicaInfo parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ReplicaInfo parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ReplicaInfo parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ReplicaInfo parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ReplicaInfo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ReplicaInfo parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -566,13 +582,13 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** Protobuf type {@code google.spanner.admin.instance.v1.ReplicaInfo} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ReplicaInfo) com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder { @@ -582,7 +598,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_ReplicaInfo_fieldAccessorTable @@ -594,7 +610,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.ReplicaInfo.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -652,39 +668,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.ReplicaInfo resu } } - @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.admin.instance.v1.ReplicaInfo) { @@ -1045,17 +1028,6 @@ public Builder clearDefaultLeaderLocation() { 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.admin.instance.v1.ReplicaInfo) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfoOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfoOrBuilder.java index 9e35d2fa605..e0ea15d0a67 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfoOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ReplicaInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ReplicaInfo) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelection.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelection.java index 85e23446987..1f9568d5583 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelection.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelection.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.ReplicaSelection} */ -public final class ReplicaSelection extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReplicaSelection extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ReplicaSelection) ReplicaSelectionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReplicaSelection"); + } + // Use ReplicaSelection.newBuilder() to construct. - private ReplicaSelection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReplicaSelection(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private ReplicaSelection() { location_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReplicaSelection(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.CommonProto .internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.CommonProto .internal_static_google_spanner_admin_instance_v1_ReplicaSelection_fieldAccessorTable @@ -131,8 +137,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, location_); } getUnknownFields().writeTo(output); } @@ -143,8 +149,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, location_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -218,38 +224,38 @@ public static com.google.spanner.admin.instance.v1.ReplicaSelection parseFrom( public static com.google.spanner.admin.instance.v1.ReplicaSelection parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ReplicaSelection parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ReplicaSelection parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ReplicaSelection parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.ReplicaSelection parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.ReplicaSelection parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -273,7 +279,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -287,7 +293,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.ReplicaSelection} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ReplicaSelection) com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder { @@ -297,7 +303,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.CommonProto .internal_static_google_spanner_admin_instance_v1_ReplicaSelection_fieldAccessorTable @@ -309,7 +315,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.admin.instance.v1.ReplicaSelection.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -359,39 +365,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.ReplicaSelection } } - @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.admin.instance.v1.ReplicaSelection) { @@ -572,17 +545,6 @@ public Builder setLocationBytes(com.google.protobuf.ByteString value) { 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.admin.instance.v1.ReplicaSelection) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelectionOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelectionOrBuilder.java index d0320fe79a1..35ed0f8e243 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelectionOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelectionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface ReplicaSelectionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ReplicaSelection) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java index 3b520157582..fcf08cfa3f9 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; -public final class SpannerInstanceAdminProto { +@com.google.protobuf.Generated +public final class SpannerInstanceAdminProto extends com.google.protobuf.GeneratedFile { private SpannerInstanceAdminProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpannerInstanceAdminProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,179 +42,179 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ReplicaInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ReplicaInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_InstanceConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_InstanceConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_InstanceConfig_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_InstanceConfig_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_Instance_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_Instance_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_Instance_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_Instance_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_FreeInstanceMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_FreeInstanceMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_InstancePartition_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -285,7 +297,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle.spanner.admin.instance.v1.ReplicaSelectionB\003\340A\002\022\024\n\n" + "node_count\030\002 \001(\005H\000\022\032\n" + "\020processing_units\030\003 \001(\005H\000B\022\n" - + "\020compute_capacity\"\270\010\n" + + "\020compute_capacity\"\204\n\n" + "\021AutoscalingConfig\022f\n" + "\022autoscaling_limits\030\001 \001(\0132E.google.spanner.admin.insta" + "nce.v1.AutoscalingConfig.AutoscalingLimitsB\003\340A\002\022h\n" @@ -300,21 +312,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tmax_nodes\030\003 \001(\005H\001\022\036\n" + "\024max_processing_units\030\004 \001(\005H\001B\013\n" + "\tmin_limitB\013\n" - + "\tmax_limit\032r\n" + + "\tmax_limit\032\236\001\n" + "\022AutoscalingTargets\0222\n" - + "%high_priority_cpu_utilization_percent\030\001 \001(\005B\003\340A\002\022(\n" - + "\033storage_utilization_percent\030\002 \001(\005B\003\340A\002\032\304\003\n" + + "%high_priority_cpu_utilization_percent\030\001 \001(\005B\003\340A\001\022*\n" + + "\035total_cpu_utilization_percent\030\004 \001(\005B\003\340A\001\022(\n" + + "\033storage_utilization_percent\030\002 \001(\005B\003\340A\002\032\343\004\n" + "\033AsymmetricAutoscalingOption\022R\n" + "\021replica_selection\030\001" + " \001(\01322.google.spanner.admin.instance.v1.ReplicaSelectionB\003\340A\002\022\202\001\n" - + "\toverrides\030\002 \001(\0132j.google.spanner.admin.instance.v1" - + ".AutoscalingConfig.AsymmetricAutoscaling" - + "Option.AutoscalingConfigOverridesB\003\340A\001\032\313\001\n" + + "\toverrides\030\002 \001(\0132j.google.spanner.admin.instan" + + "ce.v1.AutoscalingConfig.AsymmetricAutosc" + + "alingOption.AutoscalingConfigOverridesB\003\340A\001\032\352\002\n" + "\032AutoscalingConfigOverrides\022f\n" - + "\022autoscaling_limits\030\001 \001(\0132E.google.spanner.admin" - + ".instance.v1.AutoscalingConfig.AutoscalingLimitsB\003\340A\001\022E\n" + + "\022autoscaling_limits\030\001 \001(\0132E.google.spanner." + + "admin.instance.v1.AutoscalingConfig.AutoscalingLimitsB\003\340A\001\022E\n" + "8autoscaling_target_high_priority_cpu_utilization_percent\030\002" - + " \001(\005B\003\340A\001\"\252\013\n" + + " \001(\005B\003\340A\001\022=\n" + + "0autoscaling_target_total_cpu_utilization_percent\030\004" + + " \001(\005B\003\340A\001\0222\n" + + "%disable_high_priority_cpu_autoscaling\030\005 \001(\010B\003\340A\001\022*\n" + + "\035disable_total_cpu_autoscaling\030\006 \001(\010B\003\340A\001\"\252\013\n" + "\010Instance\022\021\n" + "\004name\030\001 \001(\tB\003\340A\002\022=\n" + "\006config\030\002 \001(\tB-\340A\002\372A\'\n" @@ -324,12 +341,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020processing_units\030\t \001(\005\022_\n" + "\030replica_compute_capacity\030\023" + " \003(\01328.google.spanner.admin.instance.v1.ReplicaComputeCapacityB\003\340A\003\022T\n" - + "\022autoscaling_config\030\021" - + " \001(\01323.google.spanner.admin.instance.v1.AutoscalingConfigB\003\340A\001\022D\n" + + "\022autoscaling_config\030\021 \001(\01323.google.spanner.a" + + "dmin.instance.v1.AutoscalingConfigB\003\340A\001\022D\n" + "\005state\030\006" + " \001(\01620.google.spanner.admin.instance.v1.Instance.StateB\003\340A\003\022F\n" - + "\006labels\030\007 \003(" - + "\01326.google.spanner.admin.instance.v1.Instance.LabelsEntry\022N\n\r" + + "\006labels\030\007" + + " \003(\01326.google.spanner.admin.instance.v1.Instance.LabelsEntry\022N\n\r" + "instance_type\030\n" + " \001(\01627.google.spanner.admin.instance.v1.Instance.InstanceType\022\025\n\r" + "endpoint_uris\030\010 \003(\t\0224\n" @@ -339,8 +356,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\01326.google.spanner.admin.instance.v1.FreeInstanceMetadata\022H\n" + "\007edition\030\024" + " \001(\01622.google.spanner.admin.instance.v1.Instance.EditionB\003\340A\001\022o\n" - + "\034default_backup_schedule_type\030\027 \001(\0162D.google.sp" - + "anner.admin.instance.v1.Instance.DefaultBackupScheduleTypeB\003\340A\001\032-\n" + + "\034default_backup_schedule_type\030\027 \001(\0162D.googl" + + "e.spanner.admin.instance.v1.Instance.DefaultBackupScheduleTypeB\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"7\n" @@ -383,8 +400,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\01320.google.spanner.admin.instance.v1.InstanceConfigB\003\340A\002\022\025\n\r" + "validate_only\030\004 \001(\010\"\272\001\n" + "\033UpdateInstanceConfigRequest\022N\n" - + "\017instance_config\030\001 \001(\01320.googl" - + "e.spanner.admin.instance.v1.InstanceConfigB\003\340A\002\0224\n" + + "\017instance_config\030\001 \001(\01320.g" + + "oogle.spanner.admin.instance.v1.InstanceConfigB\003\340A\002\0224\n" + "\013update_mask\030\002" + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\025\n\r" + "validate_only\030\003 \001(\010\"\177\n" @@ -397,8 +414,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(\tB3\340A\002\372A-\n" + "+cloudresourcemanager.googleapis.com/Project\022\016\n" + "\006filter\030\002 \001(\t\022\021\n" - + "\tpage_size\030\003 \001(\005\022\022\n" - + "\n" + + "\tpage_size\030\003 \001(\005\022\022\n\n" + "page_token\030\004 \001(\t\"r\n" + "$ListInstanceConfigOperationsResponse\0221\n\n" + "operations\030\001 \003(\0132\035.google.longrunning.Operation\022\027\n" @@ -411,8 +427,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(\tB3\340A\002\372A-\n" + "+cloudresourcemanager.googleapis.com/Project\022\030\n" + "\013instance_id\030\002 \001(\tB\003\340A\002\022A\n" - + "\010instance\030\003 \001(\0132*." - + "google.spanner.admin.instance.v1.InstanceB\003\340A\002\"\311\001\n" + + "\010instance\030\003 \001(" + + "\0132*.google.spanner.admin.instance.v1.InstanceB\003\340A\002\"\311\001\n" + "\024ListInstancesRequest\022C\n" + "\006parent\030\001 \001(\tB3\340A\002\372A-\n" + "+cloudresourcemanager.googleapis.com/Project\022\021\n" @@ -425,8 +441,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017next_page_token\030\002 \001(\t\022\023\n" + "\013unreachable\030\003 \003(\t\"\217\001\n" + "\025UpdateInstanceRequest\022A\n" - + "\010instance\030\001 \001(\0132*.google.s" - + "panner.admin.instance.v1.InstanceB\003\340A\002\0223\n\n" + + "\010instance\030\001 \001(\0132*.goog" + + "le.spanner.admin.instance.v1.InstanceB\003\340A\002\0223\n\n" + "field_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"N\n" + "\025DeleteInstanceRequest\0225\n" + "\004name\030\001 \001(\tB\'\340A\002\372A!\n" @@ -436,20 +452,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "start_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022/\n" + "\013cancel_time\030\003 \001(\0132\032.google.protobuf.Timestamp\022,\n" + "\010end_time\030\004 \001(\0132\032.google.protobuf.Timestamp\022X\n" - + "\033expected_fulfillment_period\030\005 \001(\016" - + "23.google.spanner.admin.instance.v1.FulfillmentPeriod\"\277\002\n" + + "\033expected_fulfillment_period\030\005" + + " \001(\01623.google.spanner.admin.instance.v1.FulfillmentPeriod\"\277\002\n" + "\026UpdateInstanceMetadata\022<\n" + "\010instance\030\001 \001(\0132*.google.spanner.admin.instance.v1.Instance\022.\n\n" + "start_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022/\n" + "\013cancel_time\030\003 \001(\0132\032.google.protobuf.Timestamp\022,\n" + "\010end_time\030\004 \001(\0132\032.google.protobuf.Timestamp\022X\n" - + "\033expected_fulfillment_period\030\005 \001" - + "(\01623.google.spanner.admin.instance.v1.FulfillmentPeriod\"\316\002\n" + + "\033expected_fulfillment_period\030\005" + + " \001(\01623.google.spanner.admin.instance.v1.FulfillmentPeriod\"\316\002\n" + "\024FreeInstanceMetadata\0224\n" + "\013expire_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0225\n" + "\014upgrade_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022^\n" - + "\017expire_behavior\030\003 \001(\0162E.google.spanner.admin.in" - + "stance.v1.FreeInstanceMetadata.ExpireBehavior\"i\n" + + "\017expire_behavior\030\003 \001(\0162E.google.spanner.admi" + + "n.instance.v1.FreeInstanceMetadata.ExpireBehavior\"i\n" + "\016ExpireBehavior\022\037\n" + "\033EXPIRE_BEHAVIOR_UNSPECIFIED\020\000\022\027\n" + "\023FREE_TO_PROVISIONED\020\001\022\035\n" @@ -457,24 +473,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\034CreateInstanceConfigMetadata\022I\n" + "\017instance_config\030\001" + " \001(\01320.google.spanner.admin.instance.v1.InstanceConfig\022E\n" - + "\010progress\030\002 \001(\01323" - + ".google.spanner.admin.instance.v1.OperationProgress\022/\n" + + "\010progress\030\002 \001" + + "(\01323.google.spanner.admin.instance.v1.OperationProgress\022/\n" + "\013cancel_time\030\003 \001(\0132\032.google.protobuf.Timestamp\"\341\001\n" + "\034UpdateInstanceConfigMetadata\022I\n" - + "\017instance_config\030\001 \001(\01320" - + ".google.spanner.admin.instance.v1.InstanceConfig\022E\n" - + "\010progress\030\002 \001(\01323.google.span" - + "ner.admin.instance.v1.OperationProgress\022/\n" - + "\013cancel_time\030\003 \001(\0132\032.google.protobuf.Timestamp\"\271\005\n" + + "\017instance_config\030\001 \001" + + "(\01320.google.spanner.admin.instance.v1.InstanceConfig\022E\n" + + "\010progress\030\002 \001(\01323.google." + + "spanner.admin.instance.v1.OperationProgress\022/\n" + + "\013cancel_time\030\003 \001(\0132\032.google.protobuf.Timestamp\"\217\006\n" + "\021InstancePartition\022\021\n" + "\004name\030\001 \001(\tB\003\340A\002\022=\n" + "\006config\030\002 \001(\tB-\340A\002\372A\'\n" + "%spanner.googleapis.com/InstanceConfig\022\031\n" + "\014display_name\030\003 \001(\tB\003\340A\002\022\024\n\n" + "node_count\030\005 \001(\005H\000\022\032\n" - + "\020processing_units\030\006 \001(\005H\000\022M\n" - + "\005state\030\007" - + " \001(\01629.google.spanner.admin.instance.v1.InstancePartition.StateB\003\340A\003\0224\n" + + "\020processing_units\030\006 \001(\005H\000\022T\n" + + "\022autoscaling_config\030\r" + + " \001(\01323.google.spanner.admin.instance.v1.AutoscalingConfigB\003\340A\001\022M\n" + + "\005state\030\007 \001(\01629.google.spanner.admin.in" + + "stance.v1.InstancePartition.StateB\003\340A\003\0224\n" + "\013create_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\"\n" + "\025referencing_databases\030\n" @@ -485,9 +503,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021STATE_UNSPECIFIED\020\000\022\014\n" + "\010CREATING\020\001\022\t\n" + "\005READY\020\002:\246\001\352A\242\001\n" - + "(spanner.googleapis.com/InstancePartition\022Oprojects/{project}/instances/{" - + "instance}/instancePartitions/{instance_p" - + "artition}*\022instancePartitions2\021instancePartitionB\022\n" + + "(spanner.googleapis.com/InstancePartition\022Oprojects/{project}/i" + + "nstances/{instance}/instancePartitions/{" + + "instance_partition}*\022instancePartitions2\021instancePartitionB\022\n" + "\020compute_capacity\"\201\002\n" + "\037CreateInstancePartitionMetadata\022O\n" + "\022instance_partition\030\001" @@ -509,12 +527,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\001 \001(\tB0\340A\002\372A*\n" + "(spanner.googleapis.com/InstancePartition\"\253\001\n" + "\036UpdateInstancePartitionRequest\022T\n" - + "\022instance_partition\030\001" - + " \001(\01323.google.spanner.admin.instance.v1.InstancePartitionB\003\340A\002\0223\n\n" + + "\022instance_partition\030\001 \001(\01323.google.spanner." + + "admin.instance.v1.InstancePartitionB\003\340A\002\0223\n\n" + "field_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"\201\002\n" + "\037UpdateInstancePartitionMetadata\022O\n" - + "\022instance_partition\030\001 \001(\01323.google.spa" - + "nner.admin.instance.v1.InstancePartition\022.\n\n" + + "\022instance_partition\030\001 \001(\01323." + + "google.spanner.admin.instance.v1.InstancePartition\022.\n\n" + "start_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022/\n" + "\013cancel_time\030\003 \001(\0132\032.google.protobuf.Timestamp\022,\n" + "\010end_time\030\004 \001(\0132\032.google.protobuf.Timestamp\"\305\001\n" @@ -550,111 +568,112 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024MoveInstanceResponse\"\245\001\n" + "\024MoveInstanceMetadata\022\025\n\r" + "target_config\030\001 \001(\t\022E\n" - + "\010progress\030\002 \001(\01323.google.span" - + "ner.admin.instance.v1.OperationProgress\022/\n" + + "\010progress\030\002 \001(\01323.g" + + "oogle.spanner.admin.instance.v1.OperationProgress\022/\n" + "\013cancel_time\030\003 \001(\0132\032.google.protobuf.Timestamp2\332\'\n\r" + "InstanceAdmin\022\314\001\n" - + "\023ListInstanceConfigs\022<.google.spanner.admin.instan" - + "ce.v1.ListInstanceConfigsRequest\032=.google.spanner.admin.instance.v1.ListInstance" - + "ConfigsResponse\"8\332A\006parent\202\323\344\223\002)\022\'/v1/{parent=projects/*}/instanceConfigs\022\271\001\n" - + "\021GetInstanceConfig\022:.google.spanner.admin.i" - + "nstance.v1.GetInstanceConfigRequest\0320.google.spanner.admin.instance.v1.InstanceC" - + "onfig\"6\332A\004name\202\323\344\223\002)\022\'/v1/{name=projects/*/instanceConfigs/*}\022\310\002\n" - + "\024CreateInstanceConfig\022=.google.spanner.admin.instance.v" - + "1.CreateInstanceConfigRequest\032\035.google.longrunning.Operation\"\321\001\312Ap\n" - + "/google.spanner.admin.instance.v1.InstanceConfig\022=goo" - + "gle.spanner.admin.instance.v1.CreateInstanceConfigMetadata\332A)parent,instance_con" - + "fig,instance_config_id\202\323\344\223\002,\"\'/v1/{parent=projects/*}/instanceConfigs:\001*\022\312\002\n" - + "\024UpdateInstanceConfig\022=.google.spanner.admin" - + ".instance.v1.UpdateInstanceConfigRequest\032\035.google.longrunning.Operation\"\323\001\312Ap\n" - + "/google.spanner.admin.instance.v1.InstanceConfig\022=google.spanner.admin.instance.v1" - + ".UpdateInstanceConfigMetadata\332A\033instance" - + "_config,update_mask\202\323\344\223\002<27/v1/{instance" - + "_config.name=projects/*/instanceConfigs/*}:\001*\022\245\001\n" - + "\024DeleteInstanceConfig\022=.google.spanner.admin.instance.v1.DeleteInstance" - + "ConfigRequest\032\026.google.protobuf.Empty\"6\332" - + "A\004name\202\323\344\223\002)*\'/v1/{name=projects/*/instanceConfigs/*}\022\360\001\n" - + "\034ListInstanceConfigOperations\022E.google.spanner.admin.instance.v" - + "1.ListInstanceConfigOperationsRequest\032F.google.spanner.admin.instance.v1.ListIns" - + "tanceConfigOperationsResponse\"A\332A\006parent" - + "\202\323\344\223\0022\0220/v1/{parent=projects/*}/instanceConfigOperations\022\264\001\n\r" - + "ListInstances\0226.google.spanner.admin.instance.v1.ListInstan" - + "cesRequest\0327.google.spanner.admin.instan" - + "ce.v1.ListInstancesResponse\"2\332A\006parent\202\323" - + "\344\223\002#\022!/v1/{parent=projects/*}/instances\022\344\001\n" - + "\026ListInstancePartitions\022?.google.spanner.admin.instance.v1.ListInstancePartit" - + "ionsRequest\032@.google.spanner.admin.insta" - + "nce.v1.ListInstancePartitionsResponse\"G\332" - + "A\006parent\202\323\344\223\0028\0226/v1/{parent=projects/*/instances/*}/instancePartitions\022\241\001\n" - + "\013GetInstance\0224.google.spanner.admin.instance.v" - + "1.GetInstanceRequest\032*.google.spanner.ad" - + "min.instance.v1.Instance\"0\332A\004name\202\323\344\223\002#\022!/v1/{name=projects/*/instances/*}\022\234\002\n" - + "\016CreateInstance\0227.google.spanner.admin.ins" - + "tance.v1.CreateInstanceRequest\032\035.google.longrunning.Operation\"\261\001\312Ad\n" - + ")google.spanner.admin.instance.v1.Instance\0227google.s" - + "panner.admin.instance.v1.CreateInstanceM" - + "etadata\332A\033parent,instance_id,instance\202\323\344" - + "\223\002&\"!/v1/{parent=projects/*}/instances:\001*\022\235\002\n" - + "\016UpdateInstance\0227.google.spanner.ad" - + "min.instance.v1.UpdateInstanceRequest\032\035.google.longrunning.Operation\"\262\001\312Ad\n" - + ")google.spanner.admin.instance.v1.Instance\0227g" - + "oogle.spanner.admin.instance.v1.UpdateIn" - + "stanceMetadata\332A\023instance,field_mask\202\323\344\223" - + "\002/2*/v1/{instance.name=projects/*/instances/*}:\001*\022\223\001\n" - + "\016DeleteInstance\0227.google.spanner.admin.instance.v1.DeleteInstanceRe" - + "quest\032\026.google.protobuf.Empty\"0\332A\004name\202\323" - + "\344\223\002#*!/v1/{name=projects/*/instances/*}\022\232\001\n" - + "\014SetIamPolicy\022\".google.iam.v1.SetIamP" - + "olicyRequest\032\025.google.iam.v1.Policy\"O\332A\017" - + "resource,policy\202\323\344\223\0027\"2/v1/{resource=projects/*/instances/*}:setIamPolicy:\001*\022\223\001\n" - + "\014GetIamPolicy\022\".google.iam.v1.GetIamPoli" - + "cyRequest\032\025.google.iam.v1.Policy\"H\332A\010res" - + "ource\202\323\344\223\0027\"2/v1/{resource=projects/*/instances/*}:getIamPolicy:\001*\022\305\001\n" - + "\022TestIamPermissions\022(.google.iam.v1.TestIamPermiss" - + "ionsRequest\032).google.iam.v1.TestIamPermi" - + "ssionsResponse\"Z\332A\024resource,permissions\202" - + "\323\344\223\002=\"8/v1/{resource=projects/*/instances/*}:testIamPermissions:\001*\022\321\001\n" - + "\024GetInstancePartition\022=.google.spanner.admin.insta" - + "nce.v1.GetInstancePartitionRequest\0323.google.spanner.admin.instance.v1.InstancePa" - + "rtition\"E\332A\004name\202\323\344\223\0028\0226/v1/{name=projec" - + "ts/*/instances/*/instancePartitions/*}\022\351\002\n" - + "\027CreateInstancePartition\022@.google.spanner.admin.instance.v1.CreateInstancePart" - + "itionRequest\032\035.google.longrunning.Operation\"\354\001\312Av\n" - + "2google.spanner.admin.instance.v1.InstancePartition\022@google.spanner.ad" - + "min.instance.v1.CreateInstancePartitionMetadata\332A/parent,instance_partition,inst" - + "ance_partition_id\202\323\344\223\002;\"6/v1/{parent=pro" - + "jects/*/instances/*}/instancePartitions:\001*\022\272\001\n" - + "\027DeleteInstancePartition\022@.google.spanner.admin.instance.v1.DeleteInstance" - + "PartitionRequest\032\026.google.protobuf.Empty" - + "\"E\332A\004name\202\323\344\223\0028*6/v1/{name=projects/*/instances/*/instancePartitions/*}\022\352\002\n" - + "\027UpdateInstancePartition\022@.google.spanner.adm" - + "in.instance.v1.UpdateInstancePartitionRe" - + "quest\032\035.google.longrunning.Operation\"\355\001\312Av\n" - + "2google.spanner.admin.instance.v1.InstancePartition\022@google.spanner.admin.ins" - + "tance.v1.UpdateInstancePartitionMetadata" - + "\332A\035instance_partition,field_mask\202\323\344\223\002N2I" - + "/v1/{instance_partition.name=projects/*/instances/*/instancePartitions/*}:\001*\022\210\002\n" - + "\037ListInstancePartitionOperations\022H.google.spanner.admin.instance.v1.ListInstance" - + "PartitionOperationsRequest\032I.google.spanner.admin.instance.v1.ListInstancePartit" - + "ionOperationsResponse\"P\332A\006parent\202\323\344\223\002A\022?" - + "/v1/{parent=projects/*/instances/*}/instancePartitionOperations\022\211\002\n" - + "\014MoveInstance\0225.google.spanner.admin.instance.v1.Move" - + "InstanceRequest\032\035.google.longrunning.Operation\"\242\001\312An\n" - + "5google.spanner.admin.insta", - "nce.v1.MoveInstanceResponse\0225google.span" - + "ner.admin.instance.v1.MoveInstanceMetada" - + "ta\202\323\344\223\002+\"&/v1/{name=projects/*/instances" - + "/*}:move:\001*\032x\312A\026spanner.googleapis.com\322A" - + "\\https://www.googleapis.com/auth/cloud-p" - + "latform,https://www.googleapis.com/auth/" - + "spanner.adminB\213\002\n$com.google.spanner.adm" - + "in.instance.v1B\031SpannerInstanceAdminProt" - + "oP\001ZFcloud.google.com/go/spanner/admin/i" - + "nstance/apiv1/instancepb;instancepb\252\002&Go" - + "ogle.Cloud.Spanner.Admin.Instance.V1\312\002&G" - + "oogle\\Cloud\\Spanner\\Admin\\Instance\\V1\352\002+" - + "Google::Cloud::Spanner::Admin::Instance:" - + ":V1b\006proto3" + + "\023ListInstanceConfigs\022<.google.spanner.admin.instance.v1.ListInstanceConfigsReque" + + "st\032=.google.spanner.admin.instance.v1.Li" + + "stInstanceConfigsResponse\"8\332A\006parent\202\323\344\223" + + "\002)\022\'/v1/{parent=projects/*}/instanceConfigs\022\271\001\n" + + "\021GetInstanceConfig\022:.google.spanner.admin.instance.v1.GetInstanceConfigRe" + + "quest\0320.google.spanner.admin.instance.v1" + + ".InstanceConfig\"6\332A\004name\202\323\344\223\002)\022\'/v1/{name=projects/*/instanceConfigs/*}\022\310\002\n" + + "\024CreateInstanceConfig\022=.google.spanner.admin." + + "instance.v1.CreateInstanceConfigRequest\032\035.google.longrunning.Operation\"\321\001\312Ap\n" + + "/google.spanner.admin.instance.v1.InstanceConfig\022=google.spanner.admin.instance.v1." + + "CreateInstanceConfigMetadata\332A)parent,in" + + "stance_config,instance_config_id\202\323\344\223\002,\"\'" + + "/v1/{parent=projects/*}/instanceConfigs:\001*\022\312\002\n" + + "\024UpdateInstanceConfig\022=.google.spanner.admin.instance.v1.UpdateInstanceCon" + + "figRequest\032\035.google.longrunning.Operation\"\323\001\312Ap\n" + + "/google.spanner.admin.instance.v1.InstanceConfig\022=google.spanner.admin.i" + + "nstance.v1.UpdateInstanceConfigMetadata\332" + + "A\033instance_config,update_mask\202\323\344\223\002<27/v1" + + "/{instance_config.name=projects/*/instanceConfigs/*}:\001*\022\245\001\n" + + "\024DeleteInstanceConfig\022=.google.spanner.admin.instance.v1.Dele" + + "teInstanceConfigRequest\032\026.google.protobu" + + "f.Empty\"6\332A\004name\202\323\344\223\002)*\'/v1/{name=projects/*/instanceConfigs/*}\022\360\001\n" + + "\034ListInstanceConfigOperations\022E.google.spanner.admin." + + "instance.v1.ListInstanceConfigOperationsRequest\032F.google.spanner.admin.instance." + + "v1.ListInstanceConfigOperationsResponse\"" + + "A\332A\006parent\202\323\344\223\0022\0220/v1/{parent=projects/*}/instanceConfigOperations\022\264\001\n\r" + + "ListInstances\0226.google.spanner.admin.instance.v1." + + "ListInstancesRequest\0327.google.spanner.ad" + + "min.instance.v1.ListInstancesResponse\"2\332" + + "A\006parent\202\323\344\223\002#\022!/v1/{parent=projects/*}/instances\022\344\001\n" + + "\026ListInstancePartitions\022?.google.spanner.admin.instance.v1.ListInst" + + "ancePartitionsRequest\032@.google.spanner.admin.instance.v1.ListInstancePartitionsR" + + "esponse\"G\332A\006parent\202\323\344\223\0028\0226/v1/{parent=pr" + + "ojects/*/instances/*}/instancePartitions\022\241\001\n" + + "\013GetInstance\0224.google.spanner.admin.instance.v1.GetInstanceRequest\032*.google." + + "spanner.admin.instance.v1.Instance\"0\332A\004n" + + "ame\202\323\344\223\002#\022!/v1/{name=projects/*/instances/*}\022\234\002\n" + + "\016CreateInstance\0227.google.spanner" + + ".admin.instance.v1.CreateInstanceRequest\032\035.google.longrunning.Operation\"\261\001\312Ad\n" + + ")google.spanner.admin.instance.v1.Instance\0227google.spanner.admin.instance.v1.Creat" + + "eInstanceMetadata\332A\033parent,instance_id,i" + + "nstance\202\323\344\223\002&\"!/v1/{parent=projects/*}/instances:\001*\022\235\002\n" + + "\016UpdateInstance\0227.google.spanner.admin.instance.v1.UpdateInstance" + + "Request\032\035.google.longrunning.Operation\"\262\001\312Ad\n" + + ")google.spanner.admin.instance.v1.Instance\0227google.spanner.admin.instance.v" + + "1.UpdateInstanceMetadata\332A\023instance,fiel" + + "d_mask\202\323\344\223\002/2*/v1/{instance.name=projects/*/instances/*}:\001*\022\223\001\n" + + "\016DeleteInstance\0227.google.spanner.admin.instance.v1.Delete" + + "InstanceRequest\032\026.google.protobuf.Empty\"" + + "0\332A\004name\202\323\344\223\002#*!/v1/{name=projects/*/instances/*}\022\232\001\n" + + "\014SetIamPolicy\022\".google.iam.v1.SetIamPolicyRequest\032\025.google.iam.v1.P" + + "olicy\"O\332A\017resource,policy\202\323\344\223\0027\"2/v1/{re" + + "source=projects/*/instances/*}:setIamPolicy:\001*\022\223\001\n" + + "\014GetIamPolicy\022\".google.iam.v1.GetIamPolicyRequest\032\025.google.iam.v1.Poli" + + "cy\"H\332A\010resource\202\323\344\223\0027\"2/v1/{resource=projects/*/instances/*}:getIamPolicy:\001*\022\305\001\n" + + "\022TestIamPermissions\022(.google.iam.v1.Test" + + "IamPermissionsRequest\032).google.iam.v1.Te" + + "stIamPermissionsResponse\"Z\332A\024resource,pe" + + "rmissions\202\323\344\223\002=\"8/v1/{resource=projects/*/instances/*}:testIamPermissions:\001*\022\321\001\n" + + "\024GetInstancePartition\022=.google.spanner.admin.instance.v1.GetInstancePartitionReq" + + "uest\0323.google.spanner.admin.instance.v1." + + "InstancePartition\"E\332A\004name\202\323\344\223\0028\0226/v1/{n" + + "ame=projects/*/instances/*/instancePartitions/*}\022\351\002\n" + + "\027CreateInstancePartition\022@.google.spanner.admin.instance.v1.CreateIn" + + "stancePartitionRequest\032\035.google.longrunning.Operation\"\354\001\312Av\n" + + "2google.spanner.admin.instance.v1.InstancePartition\022@google." + + "spanner.admin.instance.v1.CreateInstancePartitionMetadata\332A/parent,instance_part" + + "ition,instance_partition_id\202\323\344\223\002;\"6/v1/{" + + "parent=projects/*/instances/*}/instancePartitions:\001*\022\272\001\n" + + "\027DeleteInstancePartition\022@.google.spanner.admin.instance.v1.Dele" + + "teInstancePartitionRequest\032\026.google.prot" + + "obuf.Empty\"E\332A\004name\202\323\344\223\0028*6/v1/{name=pro" + + "jects/*/instances/*/instancePartitions/*}\022\352\002\n" + + "\027UpdateInstancePartition\022@.google.spanner.admin.instance.v1.UpdateInstanceP" + + "artitionRequest\032\035.google.longrunning.Operation\"\355\001\312Av\n" + + "2google.spanner.admin.instance.v1.InstancePartition\022@google.spanner" + + ".admin.instance.v1.UpdateInstancePartitionMetadata\332A\035instance_partition,field_ma" + + "sk\202\323\344\223\002N2I/v1/{instance_partition.name=p" + + "rojects/*/instances/*/instancePartitions/*}:\001*\022\210\002\n" + + "\037ListInstancePartitionOperations\022H.google.spanner.admin.instance.v1.Li" + + "stInstancePartitionOperationsRequest\032I.g", + "oogle.spanner.admin.instance.v1.ListInst" + + "ancePartitionOperationsResponse\"P\332A\006pare" + + "nt\202\323\344\223\002A\022?/v1/{parent=projects/*/instanc" + + "es/*}/instancePartitionOperations\022\211\002\n\014Mo" + + "veInstance\0225.google.spanner.admin.instan" + + "ce.v1.MoveInstanceRequest\032\035.google.longr" + + "unning.Operation\"\242\001\312An\n5google.spanner.a" + + "dmin.instance.v1.MoveInstanceResponse\0225g" + + "oogle.spanner.admin.instance.v1.MoveInst" + + "anceMetadata\202\323\344\223\002+\"&/v1/{name=projects/*" + + "/instances/*}:move:\001*\032x\312A\026spanner.google" + + "apis.com\322A\\https://www.googleapis.com/au" + + "th/cloud-platform,https://www.googleapis" + + ".com/auth/spanner.adminB\213\002\n$com.google.s" + + "panner.admin.instance.v1B\031SpannerInstanc" + + "eAdminProtoP\001ZFcloud.google.com/go/spann" + + "er/admin/instance/apiv1/instancepb;insta" + + "ncepb\252\002&Google.Cloud.Spanner.Admin.Insta" + + "nce.V1\312\002&Google\\Cloud\\Spanner\\Admin\\Inst" + + "ance\\V1\352\002+Google::Cloud::Spanner::Admin:" + + ":Instance::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -673,17 +692,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.spanner.admin.instance.v1.CommonProto.getDescriptor(), }); internal_static_google_spanner_admin_instance_v1_ReplicaInfo_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_spanner_admin_instance_v1_ReplicaInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ReplicaInfo_descriptor, new java.lang.String[] { "Location", "Type", "DefaultLeaderLocation", }); internal_static_google_spanner_admin_instance_v1_InstanceConfig_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_spanner_admin_instance_v1_InstanceConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_InstanceConfig_descriptor, new java.lang.String[] { "Name", @@ -702,37 +721,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StorageLimitPerProcessingUnit", }); internal_static_google_spanner_admin_instance_v1_InstanceConfig_LabelsEntry_descriptor = - internal_static_google_spanner_admin_instance_v1_InstanceConfig_descriptor - .getNestedTypes() - .get(0); + internal_static_google_spanner_admin_instance_v1_InstanceConfig_descriptor.getNestedType(0); internal_static_google_spanner_admin_instance_v1_InstanceConfig_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_InstanceConfig_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_descriptor, new java.lang.String[] { "ReplicaSelection", "NodeCount", "ProcessingUnits", "ComputeCapacity", }); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor, new java.lang.String[] { "AutoscalingLimits", "AutoscalingTargets", "AsymmetricAutoscalingOptions", }); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor = - internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor - .getNestedTypes() - .get(0); + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor.getNestedType( + 0); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor, new java.lang.String[] { "MinNodes", @@ -743,39 +759,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MaxLimit", }); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor = - internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor - .getNestedTypes() - .get(1); + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor.getNestedType( + 1); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor, new java.lang.String[] { - "HighPriorityCpuUtilizationPercent", "StorageUtilizationPercent", + "HighPriorityCpuUtilizationPercent", + "TotalCpuUtilizationPercent", + "StorageUtilizationPercent", }); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_descriptor = - internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor - .getNestedTypes() - .get(2); + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor.getNestedType( + 2); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_descriptor, new java.lang.String[] { "ReplicaSelection", "Overrides", }); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_descriptor = internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_descriptor - .getNestedTypes() - .get(0); + .getNestedType(0); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_descriptor, new java.lang.String[] { - "AutoscalingLimits", "AutoscalingTargetHighPriorityCpuUtilizationPercent", + "AutoscalingLimits", + "AutoscalingTargetHighPriorityCpuUtilizationPercent", + "AutoscalingTargetTotalCpuUtilizationPercent", + "DisableHighPriorityCpuAutoscaling", + "DisableTotalCpuAutoscaling", }); internal_static_google_spanner_admin_instance_v1_Instance_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_spanner_admin_instance_v1_Instance_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_Instance_descriptor, new java.lang.String[] { "Name", @@ -796,171 +815,169 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DefaultBackupScheduleType", }); internal_static_google_spanner_admin_instance_v1_Instance_LabelsEntry_descriptor = - internal_static_google_spanner_admin_instance_v1_Instance_descriptor - .getNestedTypes() - .get(0); + internal_static_google_spanner_admin_instance_v1_Instance_descriptor.getNestedType(0); internal_static_google_spanner_admin_instance_v1_Instance_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_Instance_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageType(5); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_descriptor, new java.lang.String[] { "Parent", "PageSize", "PageToken", }); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageType(6); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_descriptor, new java.lang.String[] { "InstanceConfigs", "NextPageToken", }); internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageType(7); internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageType(8); internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_descriptor, new java.lang.String[] { "Parent", "InstanceConfigId", "InstanceConfig", "ValidateOnly", }); internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageType(9); internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_descriptor, new java.lang.String[] { "InstanceConfig", "UpdateMask", "ValidateOnly", }); internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageType(10); internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_descriptor, new java.lang.String[] { "Name", "Etag", "ValidateOnly", }); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageType(11); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_descriptor, new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageType(12); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_descriptor, new java.lang.String[] { "Operations", "NextPageToken", }); internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageType(13); internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_descriptor, new java.lang.String[] { "Name", "FieldMask", }); internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageType(14); internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_descriptor, new java.lang.String[] { "Parent", "InstanceId", "Instance", }); internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageType(15); internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_descriptor, new java.lang.String[] { "Parent", "PageSize", "PageToken", "Filter", "InstanceDeadline", }); internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageType(16); internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor, new java.lang.String[] { "Instances", "NextPageToken", "Unreachable", }); internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageType(17); internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_descriptor, new java.lang.String[] { "Instance", "FieldMask", }); internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageType(18); internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageType(19); internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_descriptor, new java.lang.String[] { "Instance", "StartTime", "CancelTime", "EndTime", "ExpectedFulfillmentPeriod", }); internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageType(20); internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_descriptor, new java.lang.String[] { "Instance", "StartTime", "CancelTime", "EndTime", "ExpectedFulfillmentPeriod", }); internal_static_google_spanner_admin_instance_v1_FreeInstanceMetadata_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageType(21); internal_static_google_spanner_admin_instance_v1_FreeInstanceMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_FreeInstanceMetadata_descriptor, new java.lang.String[] { "ExpireTime", "UpgradeTime", "ExpireBehavior", }); internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageType(22); internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_descriptor, new java.lang.String[] { "InstanceConfig", "Progress", "CancelTime", }); internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageType(23); internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_descriptor, new java.lang.String[] { "InstanceConfig", "Progress", "CancelTime", }); internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageType(24); internal_static_google_spanner_admin_instance_v1_InstancePartition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor, new java.lang.String[] { "Name", @@ -968,6 +985,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayName", "NodeCount", "ProcessingUnits", + "AutoscalingConfig", "State", "CreateTime", "UpdateTime", @@ -977,107 +995,119 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ComputeCapacity", }); internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageType(25); internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor, new java.lang.String[] { "InstancePartition", "StartTime", "CancelTime", "EndTime", }); internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageType(26); internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor, new java.lang.String[] { "Parent", "InstancePartitionId", "InstancePartition", }); internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageType(27); internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor, new java.lang.String[] { "Name", "Etag", }); internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageType(28); internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageType(29); internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor, new java.lang.String[] { "InstancePartition", "FieldMask", }); internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageType(30); internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor, new java.lang.String[] { "InstancePartition", "StartTime", "CancelTime", "EndTime", }); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageType(31); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor, new java.lang.String[] { "Parent", "PageSize", "PageToken", "InstancePartitionDeadline", }); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageType(32); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor, new java.lang.String[] { "InstancePartitions", "NextPageToken", "Unreachable", }); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageType(33); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor, new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", "InstancePartitionDeadline", }); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageType(34); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor, new java.lang.String[] { "Operations", "NextPageToken", "UnreachableInstancePartitions", }); internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageType(35); internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_descriptor, new java.lang.String[] { "Name", "TargetConfig", }); internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageType(36); internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_descriptor, new java.lang.String[] {}); internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageType(37); internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_descriptor, new java.lang.String[] { "TargetConfig", "Progress", "CancelTime", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.iam.v1.IamPolicyProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.spanner.admin.instance.v1.CommonProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -1090,17 +1120,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.iam.v1.IamPolicyProto.getDescriptor(); - com.google.iam.v1.PolicyProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.spanner.admin.instance.v1.CommonProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadata.java index f45b7f98d4c..f090b3a2126 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata} */ -public final class UpdateInstanceConfigMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateInstanceConfigMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata) UpdateInstanceConfigMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateInstanceConfigMetadata"); + } + // Use UpdateInstanceConfigMetadata.newBuilder() to construct. - private UpdateInstanceConfigMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateInstanceConfigMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateInstanceConfigMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateInstanceConfigMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_fieldAccessorTable @@ -359,39 +365,39 @@ public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -415,7 +421,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -430,7 +436,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata) com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadataOrBuilder { @@ -440,7 +446,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_fieldAccessorTable @@ -455,16 +461,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstanceConfigFieldBuilder(); - getProgressFieldBuilder(); - getCancelTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceConfigFieldBuilder(); + internalGetProgressFieldBuilder(); + internalGetCancelTimeFieldBuilder(); } } @@ -542,39 +548,6 @@ private void buildPartial0( 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.admin.instance.v1.UpdateInstanceConfigMetadata) { @@ -627,19 +600,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -663,7 +639,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.InstanceConfig instanceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> @@ -810,7 +786,7 @@ public Builder clearInstanceConfig() { public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceConfigBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstanceConfigFieldBuilder().getBuilder(); + return internalGetInstanceConfigFieldBuilder().getBuilder(); } /** @@ -842,14 +818,14 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceCo * * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> - getInstanceConfigFieldBuilder() { + internalGetInstanceConfigFieldBuilder() { if (instanceConfigBuilder_ == null) { instanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder>( @@ -860,7 +836,7 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceCo } private com.google.spanner.admin.instance.v1.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.OperationProgress, com.google.spanner.admin.instance.v1.OperationProgress.Builder, com.google.spanner.admin.instance.v1.OperationProgressOrBuilder> @@ -1021,7 +997,7 @@ public Builder clearProgress() { public com.google.spanner.admin.instance.v1.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } /** @@ -1056,14 +1032,14 @@ public com.google.spanner.admin.instance.v1.OperationProgressOrBuilder getProgre * * .google.spanner.admin.instance.v1.OperationProgress progress = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.OperationProgress, com.google.spanner.admin.instance.v1.OperationProgress.Builder, com.google.spanner.admin.instance.v1.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.OperationProgress, com.google.spanner.admin.instance.v1.OperationProgress.Builder, com.google.spanner.admin.instance.v1.OperationProgressOrBuilder>( @@ -1074,7 +1050,7 @@ public com.google.spanner.admin.instance.v1.OperationProgressOrBuilder getProgre } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1219,7 +1195,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1250,14 +1226,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1267,17 +1243,6 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { return cancelTimeBuilder_; } - @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.admin.instance.v1.UpdateInstanceConfigMetadata) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadataOrBuilder.java index 5aa7c91870d..ad420c9ebc3 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface UpdateInstanceConfigMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequest.java index d6318ff2188..cab42fc5ea6 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstanceConfigRequest} */ -public final class UpdateInstanceConfigRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateInstanceConfigRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.UpdateInstanceConfigRequest) UpdateInstanceConfigRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateInstanceConfigRequest"); + } + // Use UpdateInstanceConfigRequest.newBuilder() to construct. - private UpdateInstanceConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateInstanceConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateInstanceConfigRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateInstanceConfigRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_fieldAccessorTable @@ -357,38 +363,38 @@ public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest p public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -412,7 +418,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -427,7 +433,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstanceConfigRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.UpdateInstanceConfigRequest) com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequestOrBuilder { @@ -437,7 +443,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_fieldAccessorTable @@ -451,15 +457,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstanceConfigFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceConfigFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -532,39 +538,6 @@ private void buildPartial0( 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.admin.instance.v1.UpdateInstanceConfigRequest) { @@ -617,13 +590,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -653,7 +628,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.InstanceConfig instanceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> @@ -856,7 +831,7 @@ public Builder clearInstanceConfig() { public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceConfigBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstanceConfigFieldBuilder().getBuilder(); + return internalGetInstanceConfigFieldBuilder().getBuilder(); } /** @@ -904,14 +879,14 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceCo * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> - getInstanceConfigFieldBuilder() { + internalGetInstanceConfigFieldBuilder() { if (instanceConfigBuilder_ == null) { instanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder>( @@ -922,7 +897,7 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceCo } private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> @@ -1109,7 +1084,7 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } /** @@ -1152,14 +1127,14 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { + internalGetUpdateMaskFieldBuilder() { if (updateMaskBuilder_ == null) { updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -1228,17 +1203,6 @@ public Builder clearValidateOnly() { 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.admin.instance.v1.UpdateInstanceConfigRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequestOrBuilder.java index bc4ab730408..bb8bc46355b 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceConfigRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface UpdateInstanceConfigRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.UpdateInstanceConfigRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadata.java index 03ad3324ab7..6457f0fece4 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstanceMetadata} */ -public final class UpdateInstanceMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateInstanceMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.UpdateInstanceMetadata) UpdateInstanceMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateInstanceMetadata"); + } + // Use UpdateInstanceMetadata.newBuilder() to construct. - private UpdateInstanceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateInstanceMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private UpdateInstanceMetadata() { expectedFulfillmentPeriod_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateInstanceMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_fieldAccessorTable @@ -481,38 +487,38 @@ public static com.google.spanner.admin.instance.v1.UpdateInstanceMetadata parseF public static com.google.spanner.admin.instance.v1.UpdateInstanceMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstanceMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstanceMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -536,7 +542,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -551,7 +557,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstanceMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.UpdateInstanceMetadata) com.google.spanner.admin.instance.v1.UpdateInstanceMetadataOrBuilder { @@ -561,7 +567,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_fieldAccessorTable @@ -575,17 +581,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstanceFieldBuilder(); - getStartTimeFieldBuilder(); - getCancelTimeFieldBuilder(); - getEndTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetCancelTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); } } @@ -673,39 +679,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.UpdateInstanceMe 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.admin.instance.v1.UpdateInstanceMetadata) { @@ -762,25 +735,28 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -810,7 +786,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> @@ -956,7 +932,7 @@ public Builder clearInstance() { public com.google.spanner.admin.instance.v1.Instance.Builder getInstanceBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstanceFieldBuilder().getBuilder(); + return internalGetInstanceFieldBuilder().getBuilder(); } /** @@ -987,14 +963,14 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild * * .google.spanner.admin.instance.v1.Instance instance = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> - getInstanceFieldBuilder() { + internalGetInstanceFieldBuilder() { if (instanceBuilder_ == null) { instanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder>( @@ -1005,7 +981,7 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild } private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1162,7 +1138,7 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } /** @@ -1195,14 +1171,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_time = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { + internalGetStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1213,7 +1189,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1372,7 +1348,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1407,14 +1383,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1425,7 +1401,7 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { } private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1568,7 +1544,7 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } /** @@ -1597,14 +1573,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * .google.protobuf.Timestamp end_time = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { + internalGetEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1718,17 +1694,6 @@ public Builder clearExpectedFulfillmentPeriod() { 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.admin.instance.v1.UpdateInstanceMetadata) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadataOrBuilder.java index 110734a0b0e..db3de1e8ce1 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface UpdateInstanceMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.UpdateInstanceMetadata) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadata.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadata.java index f2ad76154b3..3d0583b1877 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadata.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,33 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata} */ -public final class UpdateInstancePartitionMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateInstancePartitionMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata) UpdateInstancePartitionMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateInstancePartitionMetadata"); + } + // Use UpdateInstancePartitionMetadata.newBuilder() to construct. - private UpdateInstancePartitionMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateInstancePartitionMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateInstancePartitionMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateInstancePartitionMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_fieldAccessorTable @@ -426,39 +431,39 @@ public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetada public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -482,7 +487,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -497,7 +502,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata) com.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadataOrBuilder { @@ -507,7 +512,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_fieldAccessorTable @@ -522,17 +527,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstancePartitionFieldBuilder(); - getStartTimeFieldBuilder(); - getCancelTimeFieldBuilder(); - getEndTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstancePartitionFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetCancelTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); } } @@ -622,39 +627,6 @@ private void buildPartial0( 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.admin.instance.v1.UpdateInstancePartitionMetadata) { @@ -712,25 +684,27 @@ public Builder mergeFrom( case 10: { input.readMessage( - getInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); + internalGetInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getCancelTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -754,7 +728,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> @@ -904,7 +878,7 @@ public Builder clearInstancePartition() { getInstancePartitionBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstancePartitionFieldBuilder().getBuilder(); + return internalGetInstancePartitionFieldBuilder().getBuilder(); } /** @@ -936,14 +910,14 @@ public Builder clearInstancePartition() { * * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> - getInstancePartitionFieldBuilder() { + internalGetInstancePartitionFieldBuilder() { if (instancePartitionBuilder_ == null) { instancePartitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( @@ -954,7 +928,7 @@ public Builder clearInstancePartition() { } private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1111,7 +1085,7 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } /** @@ -1144,14 +1118,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_time = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { + internalGetStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1162,7 +1136,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } private com.google.protobuf.Timestamp cancelTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1321,7 +1295,7 @@ public Builder clearCancelTime() { public com.google.protobuf.Timestamp.Builder getCancelTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCancelTimeFieldBuilder().getBuilder(); + return internalGetCancelTimeFieldBuilder().getBuilder(); } /** @@ -1356,14 +1330,14 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { * * .google.protobuf.Timestamp cancel_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCancelTimeFieldBuilder() { + internalGetCancelTimeFieldBuilder() { if (cancelTimeBuilder_ == null) { cancelTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1374,7 +1348,7 @@ public com.google.protobuf.TimestampOrBuilder getCancelTimeOrBuilder() { } private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1517,7 +1491,7 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } /** @@ -1546,14 +1520,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * .google.protobuf.Timestamp end_time = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { + internalGetEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1563,17 +1537,6 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTimeBuilder_; } - @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.admin.instance.v1.UpdateInstancePartitionMetadata) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadataOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadataOrBuilder.java index 07cfbfa1ded..161a8874989 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface UpdateInstancePartitionMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequest.java index b0fec5ca01c..3555a22092b 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,33 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstancePartitionRequest} */ -public final class UpdateInstancePartitionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateInstancePartitionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) UpdateInstancePartitionRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateInstancePartitionRequest"); + } + // Use UpdateInstancePartitionRequest.newBuilder() to construct. - private UpdateInstancePartitionRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateInstancePartitionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateInstancePartitionRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateInstancePartitionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_fieldAccessorTable @@ -321,39 +326,39 @@ public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionReques public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -377,7 +382,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -392,7 +397,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstancePartitionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequestOrBuilder { @@ -402,7 +407,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_fieldAccessorTable @@ -417,15 +422,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstancePartitionFieldBuilder(); - getFieldMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstancePartitionFieldBuilder(); + internalGetFieldMaskFieldBuilder(); } } @@ -497,39 +502,6 @@ private void buildPartial0( 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.admin.instance.v1.UpdateInstancePartitionRequest) { @@ -581,13 +553,14 @@ public Builder mergeFrom( case 10: { input.readMessage( - getInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); + internalGetInstancePartitionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getFieldMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFieldMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -611,7 +584,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.InstancePartition instancePartition_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> @@ -796,7 +769,7 @@ public Builder clearInstancePartition() { getInstancePartitionBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstancePartitionFieldBuilder().getBuilder(); + return internalGetInstancePartitionFieldBuilder().getBuilder(); } /** @@ -838,14 +811,14 @@ public Builder clearInstancePartition() { * .google.spanner.admin.instance.v1.InstancePartition instance_partition = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder> - getInstancePartitionFieldBuilder() { + internalGetInstancePartitionFieldBuilder() { if (instancePartitionBuilder_ == null) { instancePartitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstancePartition, com.google.spanner.admin.instance.v1.InstancePartition.Builder, com.google.spanner.admin.instance.v1.InstancePartitionOrBuilder>( @@ -856,7 +829,7 @@ public Builder clearInstancePartition() { } private com.google.protobuf.FieldMask fieldMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> @@ -1041,7 +1014,7 @@ public Builder clearFieldMask() { public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getFieldMaskFieldBuilder().getBuilder(); + return internalGetFieldMaskFieldBuilder().getBuilder(); } /** @@ -1082,14 +1055,14 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getFieldMaskFieldBuilder() { + internalGetFieldMaskFieldBuilder() { if (fieldMaskBuilder_ == null) { fieldMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -1099,17 +1072,6 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { return fieldMaskBuilder_; } - @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.admin.instance.v1.UpdateInstancePartitionRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequestOrBuilder.java index c48f9a293f6..a6b59e9c8ee 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstancePartitionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface UpdateInstancePartitionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.UpdateInstancePartitionRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequest.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequest.java index fa512344c0e..45abb0f0313 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequest.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstanceRequest} */ -public final class UpdateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateInstanceRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.UpdateInstanceRequest) UpdateInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateInstanceRequest"); + } + // Use UpdateInstanceRequest.newBuilder() to construct. - private UpdateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateInstanceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateInstanceRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateInstanceRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_fieldAccessorTable @@ -316,38 +322,38 @@ public static com.google.spanner.admin.instance.v1.UpdateInstanceRequest parseFr public static com.google.spanner.admin.instance.v1.UpdateInstanceRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstanceRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.admin.instance.v1.UpdateInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.admin.instance.v1.UpdateInstanceRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -371,7 +377,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -386,7 +392,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.admin.instance.v1.UpdateInstanceRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.UpdateInstanceRequest) com.google.spanner.admin.instance.v1.UpdateInstanceRequestOrBuilder { @@ -396,7 +402,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto .internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_fieldAccessorTable @@ -410,15 +416,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstanceFieldBuilder(); - getFieldMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceFieldBuilder(); + internalGetFieldMaskFieldBuilder(); } } @@ -484,39 +490,6 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.UpdateInstanceRe 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.admin.instance.v1.UpdateInstanceRequest) { @@ -564,13 +537,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getFieldMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFieldMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -594,7 +569,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.admin.instance.v1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> @@ -775,7 +750,7 @@ public Builder clearInstance() { public com.google.spanner.admin.instance.v1.Instance.Builder getInstanceBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstanceFieldBuilder().getBuilder(); + return internalGetInstanceFieldBuilder().getBuilder(); } /** @@ -816,14 +791,14 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild * .google.spanner.admin.instance.v1.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> - getInstanceFieldBuilder() { + internalGetInstanceFieldBuilder() { if (instanceBuilder_ == null) { instanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder>( @@ -834,7 +809,7 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild } private com.google.protobuf.FieldMask fieldMask_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> @@ -1012,7 +987,7 @@ public Builder clearFieldMask() { public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getFieldMaskFieldBuilder().getBuilder(); + return internalGetFieldMaskFieldBuilder().getBuilder(); } /** @@ -1051,14 +1026,14 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { * .google.protobuf.FieldMask field_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getFieldMaskFieldBuilder() { + internalGetFieldMaskFieldBuilder() { if (fieldMaskBuilder_ == null) { fieldMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( @@ -1068,17 +1043,6 @@ public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { return fieldMaskBuilder_; } - @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.admin.instance.v1.UpdateInstanceRequest) } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequestOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequestOrBuilder.java index 8e0f62e01ee..7afab12c38b 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/UpdateInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.admin.instance.v1; +@com.google.protobuf.Generated public interface UpdateInstanceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.UpdateInstanceRequest) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto b/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto index d3e60257e1c..d16ab2ca583 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto @@ -933,12 +933,25 @@ message AutoscalingConfig { // The autoscaling targets for an instance. message AutoscalingTargets { - // Required. The target high priority cpu utilization percentage that the + // Optional. The target high priority cpu utilization percentage that the // autoscaler should be trying to achieve for the instance. This number is // on a scale from 0 (no utilization) to 100 (full utilization). The valid - // range is [10, 90] inclusive. + // range is [10, 90] inclusive. If not specified or set to 0, the autoscaler + // skips scaling based on high priority CPU utilization. int32 high_priority_cpu_utilization_percent = 1 - [(google.api.field_behavior) = REQUIRED]; + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The target total CPU utilization percentage that the autoscaler + // should be trying to achieve for the instance. This number is on a scale + // from 0 (no utilization) to 100 (full utilization). The valid range is + // [10, 90] inclusive. If not specified or set to 0, the autoscaler skips + // scaling based on total CPU utilization. If both + // `high_priority_cpu_utilization_percent` and + // `total_cpu_utilization_percent` are specified, the autoscaler provisions + // the larger of the two required compute capacities to satisfy both + // targets. + int32 total_cpu_utilization_percent = 4 + [(google.api.field_behavior) = OPTIONAL]; // Required. The target storage utilization percentage that the autoscaler // should be trying to achieve for the instance. This number is on a scale @@ -966,6 +979,60 @@ message AutoscalingConfig { // configuration for the selected replicas. int32 autoscaling_target_high_priority_cpu_utilization_percent = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, overrides the + // autoscaling target `total_cpu_utilization_percent` + // in the top-level autoscaling configuration for the selected replicas. + int32 autoscaling_target_total_cpu_utilization_percent = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, disables high priority CPU autoscaling for the + // selected replicas and ignores + // [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent] + // in the top-level autoscaling configuration. + // + // When setting this field to true, setting + // [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent] + // field to a non-zero value for the same replica is not supported. + // + // If false, the + // [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent] + // field in the replica will be used if set to a non-zero value. + // Otherwise, the + // [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent] + // field in the top-level autoscaling configuration will be used. + // + // Setting both + // [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling] + // and + // [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling] + // to true for the same replica is not supported. + bool disable_high_priority_cpu_autoscaling = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, disables total CPU autoscaling for the selected + // replicas and ignores + // [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent] + // in the top-level autoscaling configuration. + // + // When setting this field to true, setting + // [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent] + // field to a non-zero value for the same replica is not supported. + // + // If false, the + // [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent] + // field in the replica will be used if set to a non-zero value. + // Otherwise, the + // [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent] + // field in the top-level autoscaling configuration will be used. + // + // Setting both + // [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling] + // and + // [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling] + // to true for the same replica is not supported. + bool disable_total_cpu_autoscaling = 6 + [(google.api.field_behavior) = OPTIONAL]; } // Required. Selects the replicas to which this AsymmetricAutoscalingOption @@ -1755,6 +1822,13 @@ message InstancePartition { int32 processing_units = 6; } + // Optional. The autoscaling configuration. Autoscaling is enabled if this + // field is set. When autoscaling is enabled, fields in compute_capacity are + // treated as OUTPUT_ONLY fields and reflect the current compute capacity + // allocated to the instance partition. + AutoscalingConfig autoscaling_config = 13 + [(google.api.field_behavior) = OPTIONAL]; + // Output only. The current instance partition state. State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/proto-google-cloud-spanner-executor-v1/clirr-ignored-differences.xml b/proto-google-cloud-spanner-executor-v1/clirr-ignored-differences.xml index c8787595be2..50ed2b0eec5 100644 --- a/proto-google-cloud-spanner-executor-v1/clirr-ignored-differences.xml +++ b/proto-google-cloud-spanner-executor-v1/clirr-ignored-differences.xml @@ -37,7 +37,63 @@ com/google/spanner/executor/v1/SpannerExecutorProxyGrpc$SpannerExecutorProxyStub - + + + + 5001 + com/google/spanner/executor/v1/* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/executor/v1/*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/executor/v1/*$* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/executor/v1/*$*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/executor/v1/*$*$* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/executor/v1/*$*$*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/executor/v1/*Proto + com/google/protobuf/GeneratedFile + + + + 7005 + com/google/spanner/executor/v1/** + * newBuilderForType(*) + ** + + + + 7006 + com/google/spanner/executor/v1/** + * internalGetFieldAccessorTable() + ** + + + + 7014 + com/google/spanner/executor/v1/** + * getDescriptor() + 7006 com/google/spanner/executor/v1/** diff --git a/proto-google-cloud-spanner-executor-v1/pom.xml b/proto-google-cloud-spanner-executor-v1/pom.xml index b1756a9cd53..23df3c7806b 100644 --- a/proto-google-cloud-spanner-executor-v1/pom.xml +++ b/proto-google-cloud-spanner-executor-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-spanner-executor-v1 - 6.102.1 + 6.113.1-SNAPSHOT proto-google-cloud-spanner-executor-v1 Proto library for google-cloud-spanner com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdaptMessageAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdaptMessageAction.java new file mode 100644 index 00000000000..f00a4bdb679 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdaptMessageAction.java @@ -0,0 +1,1532 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * A single Adapt message request.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.AdaptMessageAction} + */ +@com.google.protobuf.Generated +public final class AdaptMessageAction extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.AdaptMessageAction) + AdaptMessageActionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AdaptMessageAction"); + } + + // Use AdaptMessageAction.newBuilder() to construct. + private AdaptMessageAction(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AdaptMessageAction() { + databaseUri_ = ""; + protocol_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + query_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdaptMessageAction_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetAttachments(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdaptMessageAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.AdaptMessageAction.class, + com.google.spanner.executor.v1.AdaptMessageAction.Builder.class); + } + + 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 send AdaptMessage to.
+   * 
+ * + * 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 send AdaptMessage to.
+   * 
+ * + * 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 PROTOCOL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object protocol_ = ""; + + /** + * + * + *
+   * The protocol to use for the request.
+   * 
+ * + * string protocol = 2; + * + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + 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(); + protocol_ = s; + return s; + } + } + + /** + * + * + *
+   * The protocol to use for the request.
+   * 
+ * + * string protocol = 2; + * + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * The payload of the request.
+   * 
+ * + * bytes payload = 3; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + public static final int ATTACHMENTS_FIELD_NUMBER = 4; + + private static final class AttachmentsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdaptMessageAction_AttachmentsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField attachments_; + + private com.google.protobuf.MapField + internalGetAttachments() { + if (attachments_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttachmentsDefaultEntryHolder.defaultEntry); + } + return attachments_; + } + + public int getAttachmentsCount() { + return internalGetAttachments().getMap().size(); + } + + /** + * + * + *
+   * Attachments to be sent with the request.
+   * 
+ * + * map<string, string> attachments = 4; + */ + @java.lang.Override + public boolean containsAttachments(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttachments().getMap().containsKey(key); + } + + /** Use {@link #getAttachmentsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttachments() { + return getAttachmentsMap(); + } + + /** + * + * + *
+   * Attachments to be sent with the request.
+   * 
+ * + * map<string, string> attachments = 4; + */ + @java.lang.Override + public java.util.Map getAttachmentsMap() { + return internalGetAttachments().getMap(); + } + + /** + * + * + *
+   * Attachments to be sent with the request.
+   * 
+ * + * map<string, string> attachments = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAttachmentsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttachments().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Attachments to be sent with the request.
+   * 
+ * + * map<string, string> attachments = 4; + */ + @java.lang.Override + public java.lang.String getAttachmentsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttachments().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int QUERY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + + /** + * + * + *
+   * The query to be sent with the request.
+   * 
+ * + * string query = 5; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; + } + } + + /** + * + * + *
+   * The query to be sent with the request.
+   * 
+ * + * string query = 5; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREPARE_THEN_EXECUTE_FIELD_NUMBER = 6; + private boolean prepareThenExecute_ = false; + + /** + * + * + *
+   * If true, the action will send a Prepare request first and then an
+   * Execute request right after to execute the query. This is only supported
+   * for Cloud Client path.
+   * 
+ * + * bool prepare_then_execute = 6; + * + * @return The prepareThenExecute. + */ + @java.lang.Override + public boolean getPrepareThenExecute() { + return prepareThenExecute_; + } + + 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.GeneratedMessage.isStringEmpty(databaseUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, databaseUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, protocol_); + } + if (!payload_.isEmpty()) { + output.writeBytes(3, payload_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAttachments(), AttachmentsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, query_); + } + if (prepareThenExecute_ != false) { + output.writeBool(6, prepareThenExecute_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, databaseUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocol_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, protocol_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, payload_); + } + for (java.util.Map.Entry entry : + internalGetAttachments().getMap().entrySet()) { + com.google.protobuf.MapEntry attachments__ = + AttachmentsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, attachments__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, query_); + } + if (prepareThenExecute_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, prepareThenExecute_); + } + 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.AdaptMessageAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.AdaptMessageAction other = + (com.google.spanner.executor.v1.AdaptMessageAction) obj; + + if (!getDatabaseUri().equals(other.getDatabaseUri())) return false; + if (!getProtocol().equals(other.getProtocol())) return false; + if (!getPayload().equals(other.getPayload())) return false; + if (!internalGetAttachments().equals(other.internalGetAttachments())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (getPrepareThenExecute() != other.getPrepareThenExecute()) 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) + DATABASE_URI_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseUri().hashCode(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + if (!internalGetAttachments().getMap().isEmpty()) { + hash = (37 * hash) + ATTACHMENTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttachments().hashCode(); + } + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + PREPARE_THEN_EXECUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrepareThenExecute()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.AdaptMessageAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AdaptMessageAction 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.AdaptMessageAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AdaptMessageAction 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.AdaptMessageAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AdaptMessageAction 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.AdaptMessageAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AdaptMessageAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.executor.v1.AdaptMessageAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AdaptMessageAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.executor.v1.AdaptMessageAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AdaptMessageAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.AdaptMessageAction 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A single Adapt message request.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.AdaptMessageAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.AdaptMessageAction) + com.google.spanner.executor.v1.AdaptMessageActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdaptMessageAction_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetAttachments(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableAttachments(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdaptMessageAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.AdaptMessageAction.class, + com.google.spanner.executor.v1.AdaptMessageAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.AdaptMessageAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + databaseUri_ = ""; + protocol_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + internalGetMutableAttachments().clear(); + query_ = ""; + prepareThenExecute_ = 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_AdaptMessageAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.AdaptMessageAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.AdaptMessageAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.AdaptMessageAction build() { + com.google.spanner.executor.v1.AdaptMessageAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.AdaptMessageAction buildPartial() { + com.google.spanner.executor.v1.AdaptMessageAction result = + new com.google.spanner.executor.v1.AdaptMessageAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.AdaptMessageAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.databaseUri_ = databaseUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.protocol_ = protocol_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.payload_ = payload_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attachments_ = internalGetAttachments(); + result.attachments_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.prepareThenExecute_ = prepareThenExecute_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.executor.v1.AdaptMessageAction) { + return mergeFrom((com.google.spanner.executor.v1.AdaptMessageAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.AdaptMessageAction other) { + if (other == com.google.spanner.executor.v1.AdaptMessageAction.getDefaultInstance()) + return this; + if (!other.getDatabaseUri().isEmpty()) { + databaseUri_ = other.databaseUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPayload().isEmpty()) { + setPayload(other.getPayload()); + } + internalGetMutableAttachments().mergeFrom(other.internalGetAttachments()); + bitField0_ |= 0x00000008; + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getPrepareThenExecute() != false) { + setPrepareThenExecute(other.getPrepareThenExecute()); + } + 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: + { + protocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + payload_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry attachments__ = + input.readMessage( + AttachmentsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttachments() + .getMutableMap() + .put(attachments__.getKey(), attachments__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + prepareThenExecute_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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 send AdaptMessage to.
+     * 
+ * + * 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 send AdaptMessage to.
+     * 
+ * + * 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 send AdaptMessage to.
+     * 
+ * + * 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 send AdaptMessage to.
+     * 
+ * + * 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 send AdaptMessage to.
+     * 
+ * + * 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 java.lang.Object protocol_ = ""; + + /** + * + * + *
+     * The protocol to use for the request.
+     * 
+ * + * string protocol = 2; + * + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The protocol to use for the request.
+     * 
+ * + * string protocol = 2; + * + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The protocol to use for the request.
+     * 
+ * + * string protocol = 2; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + protocol_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The protocol to use for the request.
+     * 
+ * + * string protocol = 2; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + protocol_ = getDefaultInstance().getProtocol(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The protocol to use for the request.
+     * 
+ * + * string protocol = 2; + * + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + protocol_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * The payload of the request.
+     * 
+ * + * bytes payload = 3; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + /** + * + * + *
+     * The payload of the request.
+     * 
+ * + * bytes payload = 3; + * + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The payload of the request.
+     * 
+ * + * bytes payload = 3; + * + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000004); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + private com.google.protobuf.MapField attachments_; + + private com.google.protobuf.MapField + internalGetAttachments() { + if (attachments_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttachmentsDefaultEntryHolder.defaultEntry); + } + return attachments_; + } + + private com.google.protobuf.MapField + internalGetMutableAttachments() { + if (attachments_ == null) { + attachments_ = + com.google.protobuf.MapField.newMapField(AttachmentsDefaultEntryHolder.defaultEntry); + } + if (!attachments_.isMutable()) { + attachments_ = attachments_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return attachments_; + } + + public int getAttachmentsCount() { + return internalGetAttachments().getMap().size(); + } + + /** + * + * + *
+     * Attachments to be sent with the request.
+     * 
+ * + * map<string, string> attachments = 4; + */ + @java.lang.Override + public boolean containsAttachments(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttachments().getMap().containsKey(key); + } + + /** Use {@link #getAttachmentsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttachments() { + return getAttachmentsMap(); + } + + /** + * + * + *
+     * Attachments to be sent with the request.
+     * 
+ * + * map<string, string> attachments = 4; + */ + @java.lang.Override + public java.util.Map getAttachmentsMap() { + return internalGetAttachments().getMap(); + } + + /** + * + * + *
+     * Attachments to be sent with the request.
+     * 
+ * + * map<string, string> attachments = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAttachmentsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttachments().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Attachments to be sent with the request.
+     * 
+ * + * map<string, string> attachments = 4; + */ + @java.lang.Override + public java.lang.String getAttachmentsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAttachments().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttachments() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableAttachments().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Attachments to be sent with the request.
+     * 
+ * + * map<string, string> attachments = 4; + */ + public Builder removeAttachments(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttachments().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAttachments() { + bitField0_ |= 0x00000008; + return internalGetMutableAttachments().getMutableMap(); + } + + /** + * + * + *
+     * Attachments to be sent with the request.
+     * 
+ * + * map<string, string> attachments = 4; + */ + public Builder putAttachments(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAttachments().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Attachments to be sent with the request.
+     * 
+ * + * map<string, string> attachments = 4; + */ + public Builder putAllAttachments(java.util.Map values) { + internalGetMutableAttachments().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object query_ = ""; + + /** + * + * + *
+     * The query to be sent with the request.
+     * 
+ * + * string query = 5; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The query to be sent with the request.
+     * 
+ * + * string query = 5; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The query to be sent with the request.
+     * 
+ * + * string query = 5; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The query to be sent with the request.
+     * 
+ * + * string query = 5; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * The query to be sent with the request.
+     * 
+ * + * string query = 5; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean prepareThenExecute_; + + /** + * + * + *
+     * If true, the action will send a Prepare request first and then an
+     * Execute request right after to execute the query. This is only supported
+     * for Cloud Client path.
+     * 
+ * + * bool prepare_then_execute = 6; + * + * @return The prepareThenExecute. + */ + @java.lang.Override + public boolean getPrepareThenExecute() { + return prepareThenExecute_; + } + + /** + * + * + *
+     * If true, the action will send a Prepare request first and then an
+     * Execute request right after to execute the query. This is only supported
+     * for Cloud Client path.
+     * 
+ * + * bool prepare_then_execute = 6; + * + * @param value The prepareThenExecute to set. + * @return This builder for chaining. + */ + public Builder setPrepareThenExecute(boolean value) { + + prepareThenExecute_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * If true, the action will send a Prepare request first and then an
+     * Execute request right after to execute the query. This is only supported
+     * for Cloud Client path.
+     * 
+ * + * bool prepare_then_execute = 6; + * + * @return This builder for chaining. + */ + public Builder clearPrepareThenExecute() { + bitField0_ = (bitField0_ & ~0x00000020); + prepareThenExecute_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.AdaptMessageAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.AdaptMessageAction) + private static final com.google.spanner.executor.v1.AdaptMessageAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.AdaptMessageAction(); + } + + public static com.google.spanner.executor.v1.AdaptMessageAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdaptMessageAction 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.AdaptMessageAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdaptMessageActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdaptMessageActionOrBuilder.java new file mode 100644 index 00000000000..b398ea3de82 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdaptMessageActionOrBuilder.java @@ -0,0 +1,197 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.executor.v1; + +@com.google.protobuf.Generated +public interface AdaptMessageActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.AdaptMessageAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The fully qualified uri of the database to send AdaptMessage to.
+   * 
+ * + * string database_uri = 1; + * + * @return The databaseUri. + */ + java.lang.String getDatabaseUri(); + + /** + * + * + *
+   * The fully qualified uri of the database to send AdaptMessage to.
+   * 
+ * + * string database_uri = 1; + * + * @return The bytes for databaseUri. + */ + com.google.protobuf.ByteString getDatabaseUriBytes(); + + /** + * + * + *
+   * The protocol to use for the request.
+   * 
+ * + * string protocol = 2; + * + * @return The protocol. + */ + java.lang.String getProtocol(); + + /** + * + * + *
+   * The protocol to use for the request.
+   * 
+ * + * string protocol = 2; + * + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString getProtocolBytes(); + + /** + * + * + *
+   * The payload of the request.
+   * 
+ * + * bytes payload = 3; + * + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + + /** + * + * + *
+   * Attachments to be sent with the request.
+   * 
+ * + * map<string, string> attachments = 4; + */ + int getAttachmentsCount(); + + /** + * + * + *
+   * Attachments to be sent with the request.
+   * 
+ * + * map<string, string> attachments = 4; + */ + boolean containsAttachments(java.lang.String key); + + /** Use {@link #getAttachmentsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttachments(); + + /** + * + * + *
+   * Attachments to be sent with the request.
+   * 
+ * + * map<string, string> attachments = 4; + */ + java.util.Map getAttachmentsMap(); + + /** + * + * + *
+   * Attachments to be sent with the request.
+   * 
+ * + * map<string, string> attachments = 4; + */ + /* nullable */ + java.lang.String getAttachmentsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Attachments to be sent with the request.
+   * 
+ * + * map<string, string> attachments = 4; + */ + java.lang.String getAttachmentsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The query to be sent with the request.
+   * 
+ * + * string query = 5; + * + * @return The query. + */ + java.lang.String getQuery(); + + /** + * + * + *
+   * The query to be sent with the request.
+   * 
+ * + * string query = 5; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * If true, the action will send a Prepare request first and then an
+   * Execute request right after to execute the query. This is only supported
+   * for Cloud Client path.
+   * 
+ * + * bool prepare_then_execute = 6; + * + * @return The prepareThenExecute. + */ + boolean getPrepareThenExecute(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AddSplitPointsAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AddSplitPointsAction.java new file mode 100644 index 00000000000..b9c8edfdda6 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AddSplitPointsAction.java @@ -0,0 +1,1498 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that adds a split point to a Cloud Spanner database.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.AddSplitPointsAction} + */ +@com.google.protobuf.Generated +public final class AddSplitPointsAction extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.AddSplitPointsAction) + AddSplitPointsActionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AddSplitPointsAction"); + } + + // Use AddSplitPointsAction.newBuilder() to construct. + private AddSplitPointsAction(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AddSplitPointsAction() { + projectId_ = ""; + instanceId_ = ""; + databaseId_ = ""; + splitPoints_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AddSplitPointsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AddSplitPointsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.AddSplitPointsAction.class, + com.google.spanner.executor.v1.AddSplitPointsAction.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_ = ""; + + /** + * + * + *
+   * 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 SPLIT_POINTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List splitPoints_; + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + @java.lang.Override + public java.util.List getSplitPointsList() { + return splitPoints_; + } + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + @java.lang.Override + public java.util.List + getSplitPointsOrBuilderList() { + return splitPoints_; + } + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + @java.lang.Override + public int getSplitPointsCount() { + return splitPoints_.size(); + } + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPoints getSplitPoints(int index) { + return splitPoints_.get(index); + } + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.SplitPointsOrBuilder getSplitPointsOrBuilder( + int index) { + return splitPoints_.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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, databaseId_); + } + for (int i = 0; i < splitPoints_.size(); i++) { + output.writeMessage(4, splitPoints_.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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, databaseId_); + } + for (int i = 0; i < splitPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, splitPoints_.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.AddSplitPointsAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.AddSplitPointsAction other = + (com.google.spanner.executor.v1.AddSplitPointsAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (!getSplitPointsList().equals(other.getSplitPointsList())) 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(); + if (getSplitPointsCount() > 0) { + hash = (37 * hash) + SPLIT_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getSplitPointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction 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.AddSplitPointsAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction 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.AddSplitPointsAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction 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.AddSplitPointsAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.AddSplitPointsAction 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Action that adds a split point to a Cloud Spanner database.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.AddSplitPointsAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.AddSplitPointsAction) + com.google.spanner.executor.v1.AddSplitPointsActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AddSplitPointsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AddSplitPointsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.AddSplitPointsAction.class, + com.google.spanner.executor.v1.AddSplitPointsAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.AddSplitPointsAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + databaseId_ = ""; + if (splitPointsBuilder_ == null) { + splitPoints_ = java.util.Collections.emptyList(); + } else { + splitPoints_ = null; + splitPointsBuilder_.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_AddSplitPointsAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.AddSplitPointsAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.AddSplitPointsAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.AddSplitPointsAction build() { + com.google.spanner.executor.v1.AddSplitPointsAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.AddSplitPointsAction buildPartial() { + com.google.spanner.executor.v1.AddSplitPointsAction result = + new com.google.spanner.executor.v1.AddSplitPointsAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.AddSplitPointsAction result) { + if (splitPointsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + splitPoints_ = java.util.Collections.unmodifiableList(splitPoints_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.splitPoints_ = splitPoints_; + } else { + result.splitPoints_ = splitPointsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.AddSplitPointsAction 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.executor.v1.AddSplitPointsAction) { + return mergeFrom((com.google.spanner.executor.v1.AddSplitPointsAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.AddSplitPointsAction other) { + if (other == com.google.spanner.executor.v1.AddSplitPointsAction.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(); + } + if (splitPointsBuilder_ == null) { + if (!other.splitPoints_.isEmpty()) { + if (splitPoints_.isEmpty()) { + splitPoints_ = other.splitPoints_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSplitPointsIsMutable(); + splitPoints_.addAll(other.splitPoints_); + } + onChanged(); + } + } else { + if (!other.splitPoints_.isEmpty()) { + if (splitPointsBuilder_.isEmpty()) { + splitPointsBuilder_.dispose(); + splitPointsBuilder_ = null; + splitPoints_ = other.splitPoints_; + bitField0_ = (bitField0_ & ~0x00000008); + splitPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSplitPointsFieldBuilder() + : null; + } else { + splitPointsBuilder_.addAllMessages(other.splitPoints_); + } + } + } + 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 + case 34: + { + com.google.spanner.admin.database.v1.SplitPoints m = + input.readMessage( + com.google.spanner.admin.database.v1.SplitPoints.parser(), + extensionRegistry); + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.add(m); + } else { + splitPointsBuilder_.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 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_ = ""; + + /** + * + * + *
+     * 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 java.util.List splitPoints_ = + java.util.Collections.emptyList(); + + private void ensureSplitPointsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + splitPoints_ = + new java.util.ArrayList(splitPoints_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.admin.database.v1.SplitPoints, + com.google.spanner.admin.database.v1.SplitPoints.Builder, + com.google.spanner.admin.database.v1.SplitPointsOrBuilder> + splitPointsBuilder_; + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public java.util.List getSplitPointsList() { + if (splitPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(splitPoints_); + } else { + return splitPointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public int getSplitPointsCount() { + if (splitPointsBuilder_ == null) { + return splitPoints_.size(); + } else { + return splitPointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public com.google.spanner.admin.database.v1.SplitPoints getSplitPoints(int index) { + if (splitPointsBuilder_ == null) { + return splitPoints_.get(index); + } else { + return splitPointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public Builder setSplitPoints( + int index, com.google.spanner.admin.database.v1.SplitPoints value) { + if (splitPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitPointsIsMutable(); + splitPoints_.set(index, value); + onChanged(); + } else { + splitPointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public Builder setSplitPoints( + int index, com.google.spanner.admin.database.v1.SplitPoints.Builder builderForValue) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + splitPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public Builder addSplitPoints(com.google.spanner.admin.database.v1.SplitPoints value) { + if (splitPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitPointsIsMutable(); + splitPoints_.add(value); + onChanged(); + } else { + splitPointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public Builder addSplitPoints( + int index, com.google.spanner.admin.database.v1.SplitPoints value) { + if (splitPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitPointsIsMutable(); + splitPoints_.add(index, value); + onChanged(); + } else { + splitPointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public Builder addSplitPoints( + com.google.spanner.admin.database.v1.SplitPoints.Builder builderForValue) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.add(builderForValue.build()); + onChanged(); + } else { + splitPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public Builder addSplitPoints( + int index, com.google.spanner.admin.database.v1.SplitPoints.Builder builderForValue) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + splitPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public Builder addAllSplitPoints( + java.lang.Iterable values) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, splitPoints_); + onChanged(); + } else { + splitPointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public Builder clearSplitPoints() { + if (splitPointsBuilder_ == null) { + splitPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + splitPointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public Builder removeSplitPoints(int index) { + if (splitPointsBuilder_ == null) { + ensureSplitPointsIsMutable(); + splitPoints_.remove(index); + onChanged(); + } else { + splitPointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public com.google.spanner.admin.database.v1.SplitPoints.Builder getSplitPointsBuilder( + int index) { + return internalGetSplitPointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public com.google.spanner.admin.database.v1.SplitPointsOrBuilder getSplitPointsOrBuilder( + int index) { + if (splitPointsBuilder_ == null) { + return splitPoints_.get(index); + } else { + return splitPointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public java.util.List + getSplitPointsOrBuilderList() { + if (splitPointsBuilder_ != null) { + return splitPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(splitPoints_); + } + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public com.google.spanner.admin.database.v1.SplitPoints.Builder addSplitPointsBuilder() { + return internalGetSplitPointsFieldBuilder() + .addBuilder(com.google.spanner.admin.database.v1.SplitPoints.getDefaultInstance()); + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public com.google.spanner.admin.database.v1.SplitPoints.Builder addSplitPointsBuilder( + int index) { + return internalGetSplitPointsFieldBuilder() + .addBuilder(index, com.google.spanner.admin.database.v1.SplitPoints.getDefaultInstance()); + } + + /** + * + * + *
+     * The split points to add.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + public java.util.List + getSplitPointsBuilderList() { + return internalGetSplitPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.admin.database.v1.SplitPoints, + com.google.spanner.admin.database.v1.SplitPoints.Builder, + com.google.spanner.admin.database.v1.SplitPointsOrBuilder> + internalGetSplitPointsFieldBuilder() { + if (splitPointsBuilder_ == null) { + splitPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.admin.database.v1.SplitPoints, + com.google.spanner.admin.database.v1.SplitPoints.Builder, + com.google.spanner.admin.database.v1.SplitPointsOrBuilder>( + splitPoints_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + splitPoints_ = null; + } + return splitPointsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.AddSplitPointsAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.AddSplitPointsAction) + private static final com.google.spanner.executor.v1.AddSplitPointsAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.AddSplitPointsAction(); + } + + public static com.google.spanner.executor.v1.AddSplitPointsAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddSplitPointsAction 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.AddSplitPointsAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AddSplitPointsActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AddSplitPointsActionOrBuilder.java new file mode 100644 index 00000000000..08060154f81 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AddSplitPointsActionOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.executor.v1; + +@com.google.protobuf.Generated +public interface AddSplitPointsActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.AddSplitPointsAction) + 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(); + + /** + * + * + *
+   * 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(); + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + java.util.List getSplitPointsList(); + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + com.google.spanner.admin.database.v1.SplitPoints getSplitPoints(int index); + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + int getSplitPointsCount(); + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + java.util.List + getSplitPointsOrBuilderList(); + + /** + * + * + *
+   * The split points to add.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.SplitPoints split_points = 4; + */ + com.google.spanner.admin.database.v1.SplitPointsOrBuilder getSplitPointsOrBuilder(int index); +} 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 index 70b15ba5b05..8aa0c64cbcc 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.executor.v1.AdminAction} */ -public final class AdminAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AdminAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.AdminAction) AdminActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AdminAction"); + } + // Use AdminAction.newBuilder() to construct. - private AdminAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AdminAction(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_AdminAction_fieldAccessorTable @@ -100,6 +106,7 @@ public enum ActionCase GET_OPERATION(25), CANCEL_OPERATION(26), CHANGE_QUORUM_CLOUD_DATABASE(28), + ADD_SPLIT_POINTS(29), ACTION_NOT_SET(0); private final int value; @@ -175,6 +182,8 @@ public static ActionCase forNumber(int value) { return CANCEL_OPERATION; case 28: return CHANGE_QUORUM_CLOUD_DATABASE; + case 29: + return ADD_SPLIT_POINTS; case 0: return ACTION_NOT_SET; default: @@ -1783,6 +1792,60 @@ public boolean hasChangeQuorumCloudDatabase() { return com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance(); } + public static final int ADD_SPLIT_POINTS_FIELD_NUMBER = 29; + + /** + * + * + *
+   * Action that adds splits to a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + * + * @return Whether the addSplitPoints field is set. + */ + @java.lang.Override + public boolean hasAddSplitPoints() { + return actionCase_ == 29; + } + + /** + * + * + *
+   * Action that adds splits to a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + * + * @return The addSplitPoints. + */ + @java.lang.Override + public com.google.spanner.executor.v1.AddSplitPointsAction getAddSplitPoints() { + if (actionCase_ == 29) { + return (com.google.spanner.executor.v1.AddSplitPointsAction) action_; + } + return com.google.spanner.executor.v1.AddSplitPointsAction.getDefaultInstance(); + } + + /** + * + * + *
+   * Action that adds splits to a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + */ + @java.lang.Override + public com.google.spanner.executor.v1.AddSplitPointsActionOrBuilder getAddSplitPointsOrBuilder() { + if (actionCase_ == 29) { + return (com.google.spanner.executor.v1.AddSplitPointsAction) action_; + } + return com.google.spanner.executor.v1.AddSplitPointsAction.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1889,6 +1952,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 28, (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_); } + if (actionCase_ == 29) { + output.writeMessage(29, (com.google.spanner.executor.v1.AddSplitPointsAction) action_); + } getUnknownFields().writeTo(output); } @@ -2038,6 +2104,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 28, (com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) action_); } + if (actionCase_ == 29) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 29, (com.google.spanner.executor.v1.AddSplitPointsAction) action_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2146,6 +2217,9 @@ public boolean equals(final java.lang.Object obj) { if (!getChangeQuorumCloudDatabase().equals(other.getChangeQuorumCloudDatabase())) return false; break; + case 29: + if (!getAddSplitPoints().equals(other.getAddSplitPoints())) return false; + break; case 0: default: } @@ -2273,6 +2347,10 @@ public int hashCode() { hash = (37 * hash) + CHANGE_QUORUM_CLOUD_DATABASE_FIELD_NUMBER; hash = (53 * hash) + getChangeQuorumCloudDatabase().hashCode(); break; + case 29: + hash = (37 * hash) + ADD_SPLIT_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getAddSplitPoints().hashCode(); + break; case 0: default: } @@ -2318,38 +2396,38 @@ public static com.google.spanner.executor.v1.AdminAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2372,7 +2450,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2387,7 +2465,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.AdminAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.AdminAction) com.google.spanner.executor.v1.AdminActionOrBuilder { @@ -2397,7 +2475,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_AdminAction_fieldAccessorTable @@ -2409,7 +2487,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.AdminAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2501,6 +2579,9 @@ public Builder clear() { if (changeQuorumCloudDatabaseBuilder_ != null) { changeQuorumCloudDatabaseBuilder_.clear(); } + if (addSplitPointsBuilder_ != null) { + addSplitPointsBuilder_.clear(); + } actionCase_ = 0; action_ = null; return this; @@ -2629,39 +2710,9 @@ private void buildPartialOneofs(com.google.spanner.executor.v1.AdminAction resul if (actionCase_ == 28 && changeQuorumCloudDatabaseBuilder_ != null) { result.action_ = changeQuorumCloudDatabaseBuilder_.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); + if (actionCase_ == 29 && addSplitPointsBuilder_ != null) { + result.action_ = addSplitPointsBuilder_.build(); + } } @java.lang.Override @@ -2817,6 +2868,11 @@ public Builder mergeFrom(com.google.spanner.executor.v1.AdminAction other) { mergeChangeQuorumCloudDatabase(other.getChangeQuorumCloudDatabase()); break; } + case ADD_SPLIT_POINTS: + { + mergeAddSplitPoints(other.getAddSplitPoints()); + break; + } case ACTION_NOT_SET: { break; @@ -2851,195 +2907,214 @@ public Builder mergeFrom( case 10: { input.readMessage( - getCreateUserInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetCreateUserInstanceConfigFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 1; break; } // case 10 case 18: { input.readMessage( - getUpdateUserInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetUpdateUserInstanceConfigFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 2; break; } // case 18 case 26: { input.readMessage( - getDeleteUserInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetDeleteUserInstanceConfigFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 3; break; } // case 26 case 34: { input.readMessage( - getGetCloudInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetGetCloudInstanceConfigFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 4; break; } // case 34 case 42: { input.readMessage( - getListInstanceConfigsFieldBuilder().getBuilder(), extensionRegistry); + internalGetListInstanceConfigsFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 5; break; } // case 42 case 50: { input.readMessage( - getCreateCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); + internalGetCreateCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 6; break; } // case 50 case 58: { input.readMessage( - getUpdateCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); + internalGetUpdateCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 7; break; } // case 58 case 66: { input.readMessage( - getDeleteCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); + internalGetDeleteCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 8; break; } // case 66 case 74: { input.readMessage( - getListCloudInstancesFieldBuilder().getBuilder(), extensionRegistry); + internalGetListCloudInstancesFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 9; break; } // case 74 case 82: { input.readMessage( - getGetCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); + internalGetGetCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 10; break; } // case 82 case 90: { input.readMessage( - getCreateCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + internalGetCreateCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 11; break; } // case 90 case 98: { input.readMessage( - getUpdateCloudDatabaseDdlFieldBuilder().getBuilder(), extensionRegistry); + internalGetUpdateCloudDatabaseDdlFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 12; break; } // case 98 case 106: { input.readMessage( - getDropCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + internalGetDropCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 13; break; } // case 106 case 114: { input.readMessage( - getListCloudDatabasesFieldBuilder().getBuilder(), extensionRegistry); + internalGetListCloudDatabasesFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 14; break; } // case 114 case 122: { input.readMessage( - getListCloudDatabaseOperationsFieldBuilder().getBuilder(), extensionRegistry); + internalGetListCloudDatabaseOperationsFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 15; break; } // case 122 case 130: { input.readMessage( - getRestoreCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + internalGetRestoreCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 16; break; } // case 130 case 138: { input.readMessage( - getGetCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + internalGetGetCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 17; break; } // case 138 case 146: { input.readMessage( - getCreateCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + internalGetCreateCloudBackupFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 18; break; } // case 146 case 154: { - input.readMessage(getCopyCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCopyCloudBackupFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 19; break; } // case 154 case 162: { - input.readMessage(getGetCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetGetCloudBackupFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 20; break; } // case 162 case 170: { input.readMessage( - getUpdateCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + internalGetUpdateCloudBackupFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 21; break; } // case 170 case 178: { input.readMessage( - getDeleteCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + internalGetDeleteCloudBackupFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 22; break; } // case 178 case 186: { input.readMessage( - getListCloudBackupsFieldBuilder().getBuilder(), extensionRegistry); + internalGetListCloudBackupsFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 23; break; } // case 186 case 194: { input.readMessage( - getListCloudBackupOperationsFieldBuilder().getBuilder(), extensionRegistry); + internalGetListCloudBackupOperationsFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 24; break; } // case 194 case 202: { - input.readMessage(getGetOperationFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetGetOperationFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 25; break; } // case 202 case 210: { - input.readMessage(getCancelOperationFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCancelOperationFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 26; break; } // case 210 case 218: { input.readMessage( - getUpdateCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + internalGetUpdateCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 27; break; } // case 218 case 226: { input.readMessage( - getChangeQuorumCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + internalGetChangeQuorumCloudDatabaseFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 28; break; } // case 226 + case 234: + { + input.readMessage( + internalGetAddSplitPointsFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 29; + break; + } // case 234 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3073,7 +3148,7 @@ public Builder clearAction() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateUserInstanceConfigAction, com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder, com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder> @@ -3254,7 +3329,7 @@ public Builder clearCreateUserInstanceConfig() { */ public com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder getCreateUserInstanceConfigBuilder() { - return getCreateUserInstanceConfigFieldBuilder().getBuilder(); + return internalGetCreateUserInstanceConfigFieldBuilder().getBuilder(); } /** @@ -3292,18 +3367,18 @@ public Builder clearCreateUserInstanceConfig() { * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateUserInstanceConfigAction, com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder, com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder> - getCreateUserInstanceConfigFieldBuilder() { + internalGetCreateUserInstanceConfigFieldBuilder() { if (createUserInstanceConfigBuilder_ == null) { if (!(actionCase_ == 1)) { action_ = com.google.spanner.executor.v1.CreateUserInstanceConfigAction.getDefaultInstance(); } createUserInstanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateUserInstanceConfigAction, com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder, com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder>( @@ -3317,7 +3392,7 @@ public Builder clearCreateUserInstanceConfig() { return createUserInstanceConfigBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateUserInstanceConfigAction, com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder, com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder> @@ -3498,7 +3573,7 @@ public Builder clearUpdateUserInstanceConfig() { */ public com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder getUpdateUserInstanceConfigBuilder() { - return getUpdateUserInstanceConfigFieldBuilder().getBuilder(); + return internalGetUpdateUserInstanceConfigFieldBuilder().getBuilder(); } /** @@ -3536,18 +3611,18 @@ public Builder clearUpdateUserInstanceConfig() { * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateUserInstanceConfigAction, com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder, com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder> - getUpdateUserInstanceConfigFieldBuilder() { + internalGetUpdateUserInstanceConfigFieldBuilder() { if (updateUserInstanceConfigBuilder_ == null) { if (!(actionCase_ == 2)) { action_ = com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.getDefaultInstance(); } updateUserInstanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateUserInstanceConfigAction, com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder, com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder>( @@ -3561,7 +3636,7 @@ public Builder clearUpdateUserInstanceConfig() { return updateUserInstanceConfigBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DeleteUserInstanceConfigAction, com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder, com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder> @@ -3742,7 +3817,7 @@ public Builder clearDeleteUserInstanceConfig() { */ public com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder getDeleteUserInstanceConfigBuilder() { - return getDeleteUserInstanceConfigFieldBuilder().getBuilder(); + return internalGetDeleteUserInstanceConfigFieldBuilder().getBuilder(); } /** @@ -3780,18 +3855,18 @@ public Builder clearDeleteUserInstanceConfig() { * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DeleteUserInstanceConfigAction, com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder, com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder> - getDeleteUserInstanceConfigFieldBuilder() { + internalGetDeleteUserInstanceConfigFieldBuilder() { if (deleteUserInstanceConfigBuilder_ == null) { if (!(actionCase_ == 3)) { action_ = com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.getDefaultInstance(); } deleteUserInstanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DeleteUserInstanceConfigAction, com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder, com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder>( @@ -3805,7 +3880,7 @@ public Builder clearDeleteUserInstanceConfig() { return deleteUserInstanceConfigBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudInstanceConfigAction, com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder, com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder> @@ -3978,7 +4053,7 @@ public Builder clearGetCloudInstanceConfig() { */ public com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder getGetCloudInstanceConfigBuilder() { - return getGetCloudInstanceConfigFieldBuilder().getBuilder(); + return internalGetGetCloudInstanceConfigFieldBuilder().getBuilder(); } /** @@ -4014,18 +4089,18 @@ public Builder clearGetCloudInstanceConfig() { * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudInstanceConfigAction, com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder, com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder> - getGetCloudInstanceConfigFieldBuilder() { + internalGetGetCloudInstanceConfigFieldBuilder() { if (getCloudInstanceConfigBuilder_ == null) { if (!(actionCase_ == 4)) { action_ = com.google.spanner.executor.v1.GetCloudInstanceConfigAction.getDefaultInstance(); } getCloudInstanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudInstanceConfigAction, com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder, com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder>( @@ -4039,7 +4114,7 @@ public Builder clearGetCloudInstanceConfig() { return getCloudInstanceConfigBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudInstanceConfigsAction, com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder, com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder> @@ -4212,7 +4287,7 @@ public Builder clearListInstanceConfigs() { */ public com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder getListInstanceConfigsBuilder() { - return getListInstanceConfigsFieldBuilder().getBuilder(); + return internalGetListInstanceConfigsFieldBuilder().getBuilder(); } /** @@ -4248,18 +4323,18 @@ public Builder clearListInstanceConfigs() { * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudInstanceConfigsAction, com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder, com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder> - getListInstanceConfigsFieldBuilder() { + internalGetListInstanceConfigsFieldBuilder() { if (listInstanceConfigsBuilder_ == null) { if (!(actionCase_ == 5)) { action_ = com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.getDefaultInstance(); } listInstanceConfigsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudInstanceConfigsAction, com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder, com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder>( @@ -4273,7 +4348,7 @@ public Builder clearListInstanceConfigs() { return listInstanceConfigsBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateCloudInstanceAction, com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder, com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder> @@ -4438,7 +4513,7 @@ public Builder clearCreateCloudInstance() { */ public com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder getCreateCloudInstanceBuilder() { - return getCreateCloudInstanceFieldBuilder().getBuilder(); + return internalGetCreateCloudInstanceFieldBuilder().getBuilder(); } /** @@ -4472,17 +4547,17 @@ public Builder clearCreateCloudInstance() { * * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateCloudInstanceAction, com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder, com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder> - getCreateCloudInstanceFieldBuilder() { + internalGetCreateCloudInstanceFieldBuilder() { if (createCloudInstanceBuilder_ == null) { if (!(actionCase_ == 6)) { action_ = com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance(); } createCloudInstanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateCloudInstanceAction, com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder, com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder>( @@ -4496,7 +4571,7 @@ public Builder clearCreateCloudInstance() { return createCloudInstanceBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudInstanceAction, com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder, com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder> @@ -4661,7 +4736,7 @@ public Builder clearUpdateCloudInstance() { */ public com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder getUpdateCloudInstanceBuilder() { - return getUpdateCloudInstanceFieldBuilder().getBuilder(); + return internalGetUpdateCloudInstanceFieldBuilder().getBuilder(); } /** @@ -4695,17 +4770,17 @@ public Builder clearUpdateCloudInstance() { * * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudInstanceAction, com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder, com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder> - getUpdateCloudInstanceFieldBuilder() { + internalGetUpdateCloudInstanceFieldBuilder() { if (updateCloudInstanceBuilder_ == null) { if (!(actionCase_ == 7)) { action_ = com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance(); } updateCloudInstanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudInstanceAction, com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder, com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder>( @@ -4719,7 +4794,7 @@ public Builder clearUpdateCloudInstance() { return updateCloudInstanceBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DeleteCloudInstanceAction, com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder, com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder> @@ -4884,7 +4959,7 @@ public Builder clearDeleteCloudInstance() { */ public com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder getDeleteCloudInstanceBuilder() { - return getDeleteCloudInstanceFieldBuilder().getBuilder(); + return internalGetDeleteCloudInstanceFieldBuilder().getBuilder(); } /** @@ -4918,17 +4993,17 @@ public Builder clearDeleteCloudInstance() { * * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DeleteCloudInstanceAction, com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder, com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder> - getDeleteCloudInstanceFieldBuilder() { + internalGetDeleteCloudInstanceFieldBuilder() { if (deleteCloudInstanceBuilder_ == null) { if (!(actionCase_ == 8)) { action_ = com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance(); } deleteCloudInstanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DeleteCloudInstanceAction, com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder, com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder>( @@ -4942,7 +5017,7 @@ public Builder clearDeleteCloudInstance() { return deleteCloudInstanceBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudInstancesAction, com.google.spanner.executor.v1.ListCloudInstancesAction.Builder, com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder> @@ -5107,7 +5182,7 @@ public Builder clearListCloudInstances() { */ public com.google.spanner.executor.v1.ListCloudInstancesAction.Builder getListCloudInstancesBuilder() { - return getListCloudInstancesFieldBuilder().getBuilder(); + return internalGetListCloudInstancesFieldBuilder().getBuilder(); } /** @@ -5141,17 +5216,17 @@ public Builder clearListCloudInstances() { * * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudInstancesAction, com.google.spanner.executor.v1.ListCloudInstancesAction.Builder, com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder> - getListCloudInstancesFieldBuilder() { + internalGetListCloudInstancesFieldBuilder() { if (listCloudInstancesBuilder_ == null) { if (!(actionCase_ == 9)) { action_ = com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance(); } listCloudInstancesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudInstancesAction, com.google.spanner.executor.v1.ListCloudInstancesAction.Builder, com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder>( @@ -5165,7 +5240,7 @@ public Builder clearListCloudInstances() { return listCloudInstancesBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudInstanceAction, com.google.spanner.executor.v1.GetCloudInstanceAction.Builder, com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder> @@ -5330,7 +5405,7 @@ public Builder clearGetCloudInstance() { */ public com.google.spanner.executor.v1.GetCloudInstanceAction.Builder getGetCloudInstanceBuilder() { - return getGetCloudInstanceFieldBuilder().getBuilder(); + return internalGetGetCloudInstanceFieldBuilder().getBuilder(); } /** @@ -5364,17 +5439,17 @@ public Builder clearGetCloudInstance() { * * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudInstanceAction, com.google.spanner.executor.v1.GetCloudInstanceAction.Builder, com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder> - getGetCloudInstanceFieldBuilder() { + internalGetGetCloudInstanceFieldBuilder() { if (getCloudInstanceBuilder_ == null) { if (!(actionCase_ == 10)) { action_ = com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance(); } getCloudInstanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudInstanceAction, com.google.spanner.executor.v1.GetCloudInstanceAction.Builder, com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder>( @@ -5388,7 +5463,7 @@ public Builder clearGetCloudInstance() { return getCloudInstanceBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateCloudDatabaseAction, com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder, com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder> @@ -5560,7 +5635,7 @@ public Builder clearCreateCloudDatabase() { */ public com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder getCreateCloudDatabaseBuilder() { - return getCreateCloudDatabaseFieldBuilder().getBuilder(); + return internalGetCreateCloudDatabaseFieldBuilder().getBuilder(); } /** @@ -5596,17 +5671,17 @@ public Builder clearCreateCloudDatabase() { * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateCloudDatabaseAction, com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder, com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder> - getCreateCloudDatabaseFieldBuilder() { + internalGetCreateCloudDatabaseFieldBuilder() { if (createCloudDatabaseBuilder_ == null) { if (!(actionCase_ == 11)) { action_ = com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance(); } createCloudDatabaseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateCloudDatabaseAction, com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder, com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder>( @@ -5620,7 +5695,7 @@ public Builder clearCreateCloudDatabase() { return createCloudDatabaseBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction, com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder, com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder> @@ -5800,7 +5875,7 @@ public Builder clearUpdateCloudDatabaseDdl() { */ public com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder getUpdateCloudDatabaseDdlBuilder() { - return getUpdateCloudDatabaseDdlFieldBuilder().getBuilder(); + return internalGetUpdateCloudDatabaseDdlFieldBuilder().getBuilder(); } /** @@ -5838,18 +5913,18 @@ public Builder clearUpdateCloudDatabaseDdl() { * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction, com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder, com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder> - getUpdateCloudDatabaseDdlFieldBuilder() { + internalGetUpdateCloudDatabaseDdlFieldBuilder() { if (updateCloudDatabaseDdlBuilder_ == null) { if (!(actionCase_ == 12)) { action_ = com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.getDefaultInstance(); } updateCloudDatabaseDdlBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction, com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder, com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder>( @@ -5863,7 +5938,7 @@ public Builder clearUpdateCloudDatabaseDdl() { return updateCloudDatabaseDdlBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudDatabaseAction, com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder, com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder> @@ -6035,7 +6110,7 @@ public Builder clearUpdateCloudDatabase() { */ public com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder getUpdateCloudDatabaseBuilder() { - return getUpdateCloudDatabaseFieldBuilder().getBuilder(); + return internalGetUpdateCloudDatabaseFieldBuilder().getBuilder(); } /** @@ -6071,17 +6146,17 @@ public Builder clearUpdateCloudDatabase() { * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudDatabaseAction, com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder, com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder> - getUpdateCloudDatabaseFieldBuilder() { + internalGetUpdateCloudDatabaseFieldBuilder() { if (updateCloudDatabaseBuilder_ == null) { if (!(actionCase_ == 27)) { action_ = com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance(); } updateCloudDatabaseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudDatabaseAction, com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder, com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder>( @@ -6095,7 +6170,7 @@ public Builder clearUpdateCloudDatabase() { return updateCloudDatabaseBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DropCloudDatabaseAction, com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder, com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder> @@ -6260,7 +6335,7 @@ public Builder clearDropCloudDatabase() { */ public com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder getDropCloudDatabaseBuilder() { - return getDropCloudDatabaseFieldBuilder().getBuilder(); + return internalGetDropCloudDatabaseFieldBuilder().getBuilder(); } /** @@ -6294,17 +6369,17 @@ public Builder clearDropCloudDatabase() { * * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DropCloudDatabaseAction, com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder, com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder> - getDropCloudDatabaseFieldBuilder() { + internalGetDropCloudDatabaseFieldBuilder() { if (dropCloudDatabaseBuilder_ == null) { if (!(actionCase_ == 13)) { action_ = com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance(); } dropCloudDatabaseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DropCloudDatabaseAction, com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder, com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder>( @@ -6318,7 +6393,7 @@ public Builder clearDropCloudDatabase() { return dropCloudDatabaseBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudDatabasesAction, com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder, com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder> @@ -6483,7 +6558,7 @@ public Builder clearListCloudDatabases() { */ public com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder getListCloudDatabasesBuilder() { - return getListCloudDatabasesFieldBuilder().getBuilder(); + return internalGetListCloudDatabasesFieldBuilder().getBuilder(); } /** @@ -6517,17 +6592,17 @@ public Builder clearListCloudDatabases() { * * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudDatabasesAction, com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder, com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder> - getListCloudDatabasesFieldBuilder() { + internalGetListCloudDatabasesFieldBuilder() { if (listCloudDatabasesBuilder_ == null) { if (!(actionCase_ == 14)) { action_ = com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance(); } listCloudDatabasesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudDatabasesAction, com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder, com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder>( @@ -6541,7 +6616,7 @@ public Builder clearListCloudDatabases() { return listCloudDatabasesBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction, com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder, com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder> @@ -6724,7 +6799,7 @@ public Builder clearListCloudDatabaseOperations() { */ public com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder getListCloudDatabaseOperationsBuilder() { - return getListCloudDatabaseOperationsFieldBuilder().getBuilder(); + return internalGetListCloudDatabaseOperationsFieldBuilder().getBuilder(); } /** @@ -6763,18 +6838,18 @@ public Builder clearListCloudDatabaseOperations() { * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction, com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder, com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder> - getListCloudDatabaseOperationsFieldBuilder() { + internalGetListCloudDatabaseOperationsFieldBuilder() { if (listCloudDatabaseOperationsBuilder_ == null) { if (!(actionCase_ == 15)) { action_ = com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.getDefaultInstance(); } listCloudDatabaseOperationsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction, com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder, com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder>( @@ -6788,7 +6863,7 @@ public Builder clearListCloudDatabaseOperations() { return listCloudDatabaseOperationsBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.RestoreCloudDatabaseAction, com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder, com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder> @@ -6960,7 +7035,7 @@ public Builder clearRestoreCloudDatabase() { */ public com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder getRestoreCloudDatabaseBuilder() { - return getRestoreCloudDatabaseFieldBuilder().getBuilder(); + return internalGetRestoreCloudDatabaseFieldBuilder().getBuilder(); } /** @@ -6996,17 +7071,17 @@ public Builder clearRestoreCloudDatabase() { * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.RestoreCloudDatabaseAction, com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder, com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder> - getRestoreCloudDatabaseFieldBuilder() { + internalGetRestoreCloudDatabaseFieldBuilder() { if (restoreCloudDatabaseBuilder_ == null) { if (!(actionCase_ == 16)) { action_ = com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance(); } restoreCloudDatabaseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.RestoreCloudDatabaseAction, com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder, com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder>( @@ -7020,7 +7095,7 @@ public Builder clearRestoreCloudDatabase() { return restoreCloudDatabaseBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudDatabaseAction, com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder, com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder> @@ -7185,7 +7260,7 @@ public Builder clearGetCloudDatabase() { */ public com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder getGetCloudDatabaseBuilder() { - return getGetCloudDatabaseFieldBuilder().getBuilder(); + return internalGetGetCloudDatabaseFieldBuilder().getBuilder(); } /** @@ -7219,17 +7294,17 @@ public Builder clearGetCloudDatabase() { * * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudDatabaseAction, com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder, com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder> - getGetCloudDatabaseFieldBuilder() { + internalGetGetCloudDatabaseFieldBuilder() { if (getCloudDatabaseBuilder_ == null) { if (!(actionCase_ == 17)) { action_ = com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance(); } getCloudDatabaseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudDatabaseAction, com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder, com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder>( @@ -7243,7 +7318,7 @@ public Builder clearGetCloudDatabase() { return getCloudDatabaseBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateCloudBackupAction, com.google.spanner.executor.v1.CreateCloudBackupAction.Builder, com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder> @@ -7408,7 +7483,7 @@ public Builder clearCreateCloudBackup() { */ public com.google.spanner.executor.v1.CreateCloudBackupAction.Builder getCreateCloudBackupBuilder() { - return getCreateCloudBackupFieldBuilder().getBuilder(); + return internalGetCreateCloudBackupFieldBuilder().getBuilder(); } /** @@ -7442,17 +7517,17 @@ public Builder clearCreateCloudBackup() { * * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateCloudBackupAction, com.google.spanner.executor.v1.CreateCloudBackupAction.Builder, com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder> - getCreateCloudBackupFieldBuilder() { + internalGetCreateCloudBackupFieldBuilder() { if (createCloudBackupBuilder_ == null) { if (!(actionCase_ == 18)) { action_ = com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance(); } createCloudBackupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CreateCloudBackupAction, com.google.spanner.executor.v1.CreateCloudBackupAction.Builder, com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder>( @@ -7466,7 +7541,7 @@ public Builder clearCreateCloudBackup() { return createCloudBackupBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CopyCloudBackupAction, com.google.spanner.executor.v1.CopyCloudBackupAction.Builder, com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder> @@ -7630,7 +7705,7 @@ public Builder clearCopyCloudBackup() { */ public com.google.spanner.executor.v1.CopyCloudBackupAction.Builder getCopyCloudBackupBuilder() { - return getCopyCloudBackupFieldBuilder().getBuilder(); + return internalGetCopyCloudBackupFieldBuilder().getBuilder(); } /** @@ -7664,17 +7739,17 @@ public Builder clearCopyCloudBackup() { * * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CopyCloudBackupAction, com.google.spanner.executor.v1.CopyCloudBackupAction.Builder, com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder> - getCopyCloudBackupFieldBuilder() { + internalGetCopyCloudBackupFieldBuilder() { if (copyCloudBackupBuilder_ == null) { if (!(actionCase_ == 19)) { action_ = com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance(); } copyCloudBackupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CopyCloudBackupAction, com.google.spanner.executor.v1.CopyCloudBackupAction.Builder, com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder>( @@ -7688,7 +7763,7 @@ public Builder clearCopyCloudBackup() { return copyCloudBackupBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudBackupAction, com.google.spanner.executor.v1.GetCloudBackupAction.Builder, com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder> @@ -7850,7 +7925,7 @@ public Builder clearGetCloudBackup() { * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; */ public com.google.spanner.executor.v1.GetCloudBackupAction.Builder getGetCloudBackupBuilder() { - return getGetCloudBackupFieldBuilder().getBuilder(); + return internalGetGetCloudBackupFieldBuilder().getBuilder(); } /** @@ -7884,17 +7959,17 @@ public com.google.spanner.executor.v1.GetCloudBackupAction.Builder getGetCloudBa * * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudBackupAction, com.google.spanner.executor.v1.GetCloudBackupAction.Builder, com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder> - getGetCloudBackupFieldBuilder() { + internalGetGetCloudBackupFieldBuilder() { if (getCloudBackupBuilder_ == null) { if (!(actionCase_ == 20)) { action_ = com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance(); } getCloudBackupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetCloudBackupAction, com.google.spanner.executor.v1.GetCloudBackupAction.Builder, com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder>( @@ -7908,7 +7983,7 @@ public com.google.spanner.executor.v1.GetCloudBackupAction.Builder getGetCloudBa return getCloudBackupBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudBackupAction, com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder, com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder> @@ -8073,7 +8148,7 @@ public Builder clearUpdateCloudBackup() { */ public com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder getUpdateCloudBackupBuilder() { - return getUpdateCloudBackupFieldBuilder().getBuilder(); + return internalGetUpdateCloudBackupFieldBuilder().getBuilder(); } /** @@ -8107,17 +8182,17 @@ public Builder clearUpdateCloudBackup() { * * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudBackupAction, com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder, com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder> - getUpdateCloudBackupFieldBuilder() { + internalGetUpdateCloudBackupFieldBuilder() { if (updateCloudBackupBuilder_ == null) { if (!(actionCase_ == 21)) { action_ = com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance(); } updateCloudBackupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.UpdateCloudBackupAction, com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder, com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder>( @@ -8131,7 +8206,7 @@ public Builder clearUpdateCloudBackup() { return updateCloudBackupBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DeleteCloudBackupAction, com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder, com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder> @@ -8296,7 +8371,7 @@ public Builder clearDeleteCloudBackup() { */ public com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder getDeleteCloudBackupBuilder() { - return getDeleteCloudBackupFieldBuilder().getBuilder(); + return internalGetDeleteCloudBackupFieldBuilder().getBuilder(); } /** @@ -8330,17 +8405,17 @@ public Builder clearDeleteCloudBackup() { * * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DeleteCloudBackupAction, com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder, com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder> - getDeleteCloudBackupFieldBuilder() { + internalGetDeleteCloudBackupFieldBuilder() { if (deleteCloudBackupBuilder_ == null) { if (!(actionCase_ == 22)) { action_ = com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance(); } deleteCloudBackupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DeleteCloudBackupAction, com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder, com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder>( @@ -8354,7 +8429,7 @@ public Builder clearDeleteCloudBackup() { return deleteCloudBackupBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudBackupsAction, com.google.spanner.executor.v1.ListCloudBackupsAction.Builder, com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder> @@ -8519,7 +8594,7 @@ public Builder clearListCloudBackups() { */ public com.google.spanner.executor.v1.ListCloudBackupsAction.Builder getListCloudBackupsBuilder() { - return getListCloudBackupsFieldBuilder().getBuilder(); + return internalGetListCloudBackupsFieldBuilder().getBuilder(); } /** @@ -8553,17 +8628,17 @@ public Builder clearListCloudBackups() { * * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudBackupsAction, com.google.spanner.executor.v1.ListCloudBackupsAction.Builder, com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder> - getListCloudBackupsFieldBuilder() { + internalGetListCloudBackupsFieldBuilder() { if (listCloudBackupsBuilder_ == null) { if (!(actionCase_ == 23)) { action_ = com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance(); } listCloudBackupsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudBackupsAction, com.google.spanner.executor.v1.ListCloudBackupsAction.Builder, com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder>( @@ -8577,7 +8652,7 @@ public Builder clearListCloudBackups() { return listCloudBackupsBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudBackupOperationsAction, com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder, com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder> @@ -8758,7 +8833,7 @@ public Builder clearListCloudBackupOperations() { */ public com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder getListCloudBackupOperationsBuilder() { - return getListCloudBackupOperationsFieldBuilder().getBuilder(); + return internalGetListCloudBackupOperationsFieldBuilder().getBuilder(); } /** @@ -8796,18 +8871,18 @@ public Builder clearListCloudBackupOperations() { * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudBackupOperationsAction, com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder, com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder> - getListCloudBackupOperationsFieldBuilder() { + internalGetListCloudBackupOperationsFieldBuilder() { if (listCloudBackupOperationsBuilder_ == null) { if (!(actionCase_ == 24)) { action_ = com.google.spanner.executor.v1.ListCloudBackupOperationsAction.getDefaultInstance(); } listCloudBackupOperationsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ListCloudBackupOperationsAction, com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder, com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder>( @@ -8821,7 +8896,7 @@ public Builder clearListCloudBackupOperations() { return listCloudBackupOperationsBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetOperationAction, com.google.spanner.executor.v1.GetOperationAction.Builder, com.google.spanner.executor.v1.GetOperationActionOrBuilder> @@ -8982,7 +9057,7 @@ public Builder clearGetOperation() { * .google.spanner.executor.v1.GetOperationAction get_operation = 25; */ public com.google.spanner.executor.v1.GetOperationAction.Builder getGetOperationBuilder() { - return getGetOperationFieldBuilder().getBuilder(); + return internalGetGetOperationFieldBuilder().getBuilder(); } /** @@ -9015,17 +9090,17 @@ public com.google.spanner.executor.v1.GetOperationActionOrBuilder getGetOperatio * * .google.spanner.executor.v1.GetOperationAction get_operation = 25; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetOperationAction, com.google.spanner.executor.v1.GetOperationAction.Builder, com.google.spanner.executor.v1.GetOperationActionOrBuilder> - getGetOperationFieldBuilder() { + internalGetGetOperationFieldBuilder() { if (getOperationBuilder_ == null) { if (!(actionCase_ == 25)) { action_ = com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance(); } getOperationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GetOperationAction, com.google.spanner.executor.v1.GetOperationAction.Builder, com.google.spanner.executor.v1.GetOperationActionOrBuilder>( @@ -9039,7 +9114,7 @@ public com.google.spanner.executor.v1.GetOperationActionOrBuilder getGetOperatio return getOperationBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CancelOperationAction, com.google.spanner.executor.v1.CancelOperationAction.Builder, com.google.spanner.executor.v1.CancelOperationActionOrBuilder> @@ -9203,7 +9278,7 @@ public Builder clearCancelOperation() { */ public com.google.spanner.executor.v1.CancelOperationAction.Builder getCancelOperationBuilder() { - return getCancelOperationFieldBuilder().getBuilder(); + return internalGetCancelOperationFieldBuilder().getBuilder(); } /** @@ -9237,17 +9312,17 @@ public Builder clearCancelOperation() { * * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CancelOperationAction, com.google.spanner.executor.v1.CancelOperationAction.Builder, com.google.spanner.executor.v1.CancelOperationActionOrBuilder> - getCancelOperationFieldBuilder() { + internalGetCancelOperationFieldBuilder() { if (cancelOperationBuilder_ == null) { if (!(actionCase_ == 26)) { action_ = com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance(); } cancelOperationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CancelOperationAction, com.google.spanner.executor.v1.CancelOperationAction.Builder, com.google.spanner.executor.v1.CancelOperationActionOrBuilder>( @@ -9261,7 +9336,7 @@ public Builder clearCancelOperation() { return cancelOperationBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction, com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder, com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder> @@ -9442,7 +9517,7 @@ public Builder clearChangeQuorumCloudDatabase() { */ public com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder getChangeQuorumCloudDatabaseBuilder() { - return getChangeQuorumCloudDatabaseFieldBuilder().getBuilder(); + return internalGetChangeQuorumCloudDatabaseFieldBuilder().getBuilder(); } /** @@ -9480,18 +9555,18 @@ public Builder clearChangeQuorumCloudDatabase() { * .google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction, com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder, com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder> - getChangeQuorumCloudDatabaseFieldBuilder() { + internalGetChangeQuorumCloudDatabaseFieldBuilder() { if (changeQuorumCloudDatabaseBuilder_ == null) { if (!(actionCase_ == 28)) { action_ = com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.getDefaultInstance(); } changeQuorumCloudDatabaseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction, com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.Builder, com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder>( @@ -9505,15 +9580,224 @@ public Builder clearChangeQuorumCloudDatabase() { return changeQuorumCloudDatabaseBuilder_; } + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.executor.v1.AddSplitPointsAction, + com.google.spanner.executor.v1.AddSplitPointsAction.Builder, + com.google.spanner.executor.v1.AddSplitPointsActionOrBuilder> + addSplitPointsBuilder_; + + /** + * + * + *
+     * Action that adds splits to a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + * + * @return Whether the addSplitPoints field is set. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean hasAddSplitPoints() { + return actionCase_ == 29; } + /** + * + * + *
+     * Action that adds splits to a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + * + * @return The addSplitPoints. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public com.google.spanner.executor.v1.AddSplitPointsAction getAddSplitPoints() { + if (addSplitPointsBuilder_ == null) { + if (actionCase_ == 29) { + return (com.google.spanner.executor.v1.AddSplitPointsAction) action_; + } + return com.google.spanner.executor.v1.AddSplitPointsAction.getDefaultInstance(); + } else { + if (actionCase_ == 29) { + return addSplitPointsBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.AddSplitPointsAction.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Action that adds splits to a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + */ + public Builder setAddSplitPoints(com.google.spanner.executor.v1.AddSplitPointsAction value) { + if (addSplitPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + addSplitPointsBuilder_.setMessage(value); + } + actionCase_ = 29; + return this; + } + + /** + * + * + *
+     * Action that adds splits to a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + */ + public Builder setAddSplitPoints( + com.google.spanner.executor.v1.AddSplitPointsAction.Builder builderForValue) { + if (addSplitPointsBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + addSplitPointsBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 29; + return this; + } + + /** + * + * + *
+     * Action that adds splits to a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + */ + public Builder mergeAddSplitPoints(com.google.spanner.executor.v1.AddSplitPointsAction value) { + if (addSplitPointsBuilder_ == null) { + if (actionCase_ == 29 + && action_ + != com.google.spanner.executor.v1.AddSplitPointsAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.AddSplitPointsAction.newBuilder( + (com.google.spanner.executor.v1.AddSplitPointsAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 29) { + addSplitPointsBuilder_.mergeFrom(value); + } else { + addSplitPointsBuilder_.setMessage(value); + } + } + actionCase_ = 29; + return this; + } + + /** + * + * + *
+     * Action that adds splits to a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + */ + public Builder clearAddSplitPoints() { + if (addSplitPointsBuilder_ == null) { + if (actionCase_ == 29) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 29) { + actionCase_ = 0; + action_ = null; + } + addSplitPointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Action that adds splits to a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + */ + public com.google.spanner.executor.v1.AddSplitPointsAction.Builder getAddSplitPointsBuilder() { + return internalGetAddSplitPointsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Action that adds splits to a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + */ + @java.lang.Override + public com.google.spanner.executor.v1.AddSplitPointsActionOrBuilder + getAddSplitPointsOrBuilder() { + if ((actionCase_ == 29) && (addSplitPointsBuilder_ != null)) { + return addSplitPointsBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 29) { + return (com.google.spanner.executor.v1.AddSplitPointsAction) action_; + } + return com.google.spanner.executor.v1.AddSplitPointsAction.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Action that adds splits to a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.executor.v1.AddSplitPointsAction, + com.google.spanner.executor.v1.AddSplitPointsAction.Builder, + com.google.spanner.executor.v1.AddSplitPointsActionOrBuilder> + internalGetAddSplitPointsFieldBuilder() { + if (addSplitPointsBuilder_ == null) { + if (!(actionCase_ == 29)) { + action_ = com.google.spanner.executor.v1.AddSplitPointsAction.getDefaultInstance(); + } + addSplitPointsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.executor.v1.AddSplitPointsAction, + com.google.spanner.executor.v1.AddSplitPointsAction.Builder, + com.google.spanner.executor.v1.AddSplitPointsActionOrBuilder>( + (com.google.spanner.executor.v1.AddSplitPointsAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 29; + onChanged(); + return addSplitPointsBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.AdminAction) 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 index a6275a32ccb..7d595c13eb8 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface AdminActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.AdminAction) @@ -1123,5 +1125,42 @@ public interface AdminActionOrBuilder com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder getChangeQuorumCloudDatabaseOrBuilder(); + /** + * + * + *
+   * Action that adds splits to a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + * + * @return Whether the addSplitPoints field is set. + */ + boolean hasAddSplitPoints(); + + /** + * + * + *
+   * Action that adds splits to a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + * + * @return The addSplitPoints. + */ + com.google.spanner.executor.v1.AddSplitPointsAction getAddSplitPoints(); + + /** + * + * + *
+   * Action that adds splits to a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.AddSplitPointsAction add_split_points = 29; + */ + com.google.spanner.executor.v1.AddSplitPointsActionOrBuilder getAddSplitPointsOrBuilder(); + 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 index 372e2183196..14b971c3cff 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.executor.v1.AdminResult} */ -public final class AdminResult extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AdminResult extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.AdminResult) AdminResultOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AdminResult"); + } + // Use AdminResult.newBuilder() to construct. - private AdminResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AdminResult(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_AdminResult_fieldAccessorTable @@ -497,38 +503,38 @@ public static com.google.spanner.executor.v1.AdminResult parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -551,7 +557,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -565,7 +571,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.AdminResult} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.AdminResult) com.google.spanner.executor.v1.AdminResultOrBuilder { @@ -575,7 +581,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_AdminResult_fieldAccessorTable @@ -589,18 +595,18 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBackupResponseFieldBuilder(); - getOperationResponseFieldBuilder(); - getDatabaseResponseFieldBuilder(); - getInstanceResponseFieldBuilder(); - getInstanceConfigResponseFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupResponseFieldBuilder(); + internalGetOperationResponseFieldBuilder(); + internalGetDatabaseResponseFieldBuilder(); + internalGetInstanceResponseFieldBuilder(); + internalGetInstanceConfigResponseFieldBuilder(); } } @@ -702,39 +708,6 @@ private void buildPartial0(com.google.spanner.executor.v1.AdminResult result) { 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.AdminResult) { @@ -790,35 +763,37 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getBackupResponseFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBackupResponseFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( - getOperationResponseFieldBuilder().getBuilder(), extensionRegistry); + internalGetOperationResponseFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( - getDatabaseResponseFieldBuilder().getBuilder(), extensionRegistry); + internalGetDatabaseResponseFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( - getInstanceResponseFieldBuilder().getBuilder(), extensionRegistry); + internalGetInstanceResponseFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage( - getInstanceConfigResponseFieldBuilder().getBuilder(), extensionRegistry); + internalGetInstanceConfigResponseFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -842,7 +817,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.executor.v1.CloudBackupResponse backupResponse_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudBackupResponse, com.google.spanner.executor.v1.CloudBackupResponse.Builder, com.google.spanner.executor.v1.CloudBackupResponseOrBuilder> @@ -989,7 +964,7 @@ public Builder clearBackupResponse() { public com.google.spanner.executor.v1.CloudBackupResponse.Builder getBackupResponseBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getBackupResponseFieldBuilder().getBuilder(); + return internalGetBackupResponseFieldBuilder().getBuilder(); } /** @@ -1021,14 +996,14 @@ public com.google.spanner.executor.v1.CloudBackupResponse.Builder getBackupRespo * * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudBackupResponse, com.google.spanner.executor.v1.CloudBackupResponse.Builder, com.google.spanner.executor.v1.CloudBackupResponseOrBuilder> - getBackupResponseFieldBuilder() { + internalGetBackupResponseFieldBuilder() { if (backupResponseBuilder_ == null) { backupResponseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudBackupResponse, com.google.spanner.executor.v1.CloudBackupResponse.Builder, com.google.spanner.executor.v1.CloudBackupResponseOrBuilder>( @@ -1039,7 +1014,7 @@ public com.google.spanner.executor.v1.CloudBackupResponse.Builder getBackupRespo } private com.google.spanner.executor.v1.OperationResponse operationResponse_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.OperationResponse, com.google.spanner.executor.v1.OperationResponse.Builder, com.google.spanner.executor.v1.OperationResponseOrBuilder> @@ -1186,7 +1161,7 @@ public Builder clearOperationResponse() { public com.google.spanner.executor.v1.OperationResponse.Builder getOperationResponseBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getOperationResponseFieldBuilder().getBuilder(); + return internalGetOperationResponseFieldBuilder().getBuilder(); } /** @@ -1218,14 +1193,14 @@ public com.google.spanner.executor.v1.OperationResponse.Builder getOperationResp * * .google.spanner.executor.v1.OperationResponse operation_response = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.OperationResponse, com.google.spanner.executor.v1.OperationResponse.Builder, com.google.spanner.executor.v1.OperationResponseOrBuilder> - getOperationResponseFieldBuilder() { + internalGetOperationResponseFieldBuilder() { if (operationResponseBuilder_ == null) { operationResponseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.OperationResponse, com.google.spanner.executor.v1.OperationResponse.Builder, com.google.spanner.executor.v1.OperationResponseOrBuilder>( @@ -1236,7 +1211,7 @@ public com.google.spanner.executor.v1.OperationResponse.Builder getOperationResp } private com.google.spanner.executor.v1.CloudDatabaseResponse databaseResponse_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudDatabaseResponse, com.google.spanner.executor.v1.CloudDatabaseResponse.Builder, com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder> @@ -1385,7 +1360,7 @@ public Builder clearDatabaseResponse() { getDatabaseResponseBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getDatabaseResponseFieldBuilder().getBuilder(); + return internalGetDatabaseResponseFieldBuilder().getBuilder(); } /** @@ -1417,14 +1392,14 @@ public Builder clearDatabaseResponse() { * * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudDatabaseResponse, com.google.spanner.executor.v1.CloudDatabaseResponse.Builder, com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder> - getDatabaseResponseFieldBuilder() { + internalGetDatabaseResponseFieldBuilder() { if (databaseResponseBuilder_ == null) { databaseResponseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudDatabaseResponse, com.google.spanner.executor.v1.CloudDatabaseResponse.Builder, com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder>( @@ -1435,7 +1410,7 @@ public Builder clearDatabaseResponse() { } private com.google.spanner.executor.v1.CloudInstanceResponse instanceResponse_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudInstanceResponse, com.google.spanner.executor.v1.CloudInstanceResponse.Builder, com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder> @@ -1584,7 +1559,7 @@ public Builder clearInstanceResponse() { getInstanceResponseBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getInstanceResponseFieldBuilder().getBuilder(); + return internalGetInstanceResponseFieldBuilder().getBuilder(); } /** @@ -1616,14 +1591,14 @@ public Builder clearInstanceResponse() { * * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudInstanceResponse, com.google.spanner.executor.v1.CloudInstanceResponse.Builder, com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder> - getInstanceResponseFieldBuilder() { + internalGetInstanceResponseFieldBuilder() { if (instanceResponseBuilder_ == null) { instanceResponseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudInstanceResponse, com.google.spanner.executor.v1.CloudInstanceResponse.Builder, com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder>( @@ -1634,7 +1609,7 @@ public Builder clearInstanceResponse() { } private com.google.spanner.executor.v1.CloudInstanceConfigResponse instanceConfigResponse_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudInstanceConfigResponse, com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder, com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder> @@ -1792,7 +1767,7 @@ public Builder clearInstanceConfigResponse() { getInstanceConfigResponseBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getInstanceConfigResponseFieldBuilder().getBuilder(); + return internalGetInstanceConfigResponseFieldBuilder().getBuilder(); } /** @@ -1826,14 +1801,14 @@ public Builder clearInstanceConfigResponse() { * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudInstanceConfigResponse, com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder, com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder> - getInstanceConfigResponseFieldBuilder() { + internalGetInstanceConfigResponseFieldBuilder() { if (instanceConfigResponseBuilder_ == null) { instanceConfigResponseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloudInstanceConfigResponse, com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder, com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder>( @@ -1843,17 +1818,6 @@ public Builder clearInstanceConfigResponse() { 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) } 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 index 265c281020e..c94d4b47cea 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface AdminResultOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.AdminResult) 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 index d75516554b2..fb25206e041 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.BatchDmlAction} */ -public final class BatchDmlAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BatchDmlAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.BatchDmlAction) BatchDmlActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchDmlAction"); + } + // Use BatchDmlAction.newBuilder() to construct. - private BatchDmlAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BatchDmlAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_BatchDmlAction_fieldAccessorTable @@ -64,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.spanner.executor.v1.BatchDmlAction.Builder.class); } + private int bitField0_; public static final int UPDATES_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -140,6 +147,45 @@ public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdatesOrBuilder(i return updates_.get(index); } + public static final int LAST_STATEMENTS_FIELD_NUMBER = 2; + private boolean lastStatements_ = false; + + /** + * + * + *
+   * Whether to set this request with the last statement option in the
+   * transaction. The transaction should be committed after processing this
+   * request.
+   * 
+ * + * optional bool last_statements = 2; + * + * @return Whether the lastStatements field is set. + */ + @java.lang.Override + public boolean hasLastStatements() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Whether to set this request with the last statement option in the
+   * transaction. The transaction should be committed after processing this
+   * request.
+   * 
+ * + * optional bool last_statements = 2; + * + * @return The lastStatements. + */ + @java.lang.Override + public boolean getLastStatements() { + return lastStatements_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -157,6 +203,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < updates_.size(); i++) { output.writeMessage(1, updates_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(2, lastStatements_); + } getUnknownFields().writeTo(output); } @@ -169,6 +218,9 @@ public int getSerializedSize() { for (int i = 0; i < updates_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, updates_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, lastStatements_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -186,6 +238,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.spanner.executor.v1.BatchDmlAction) obj; if (!getUpdatesList().equals(other.getUpdatesList())) return false; + if (hasLastStatements() != other.hasLastStatements()) return false; + if (hasLastStatements()) { + if (getLastStatements() != other.getLastStatements()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -201,6 +257,10 @@ public int hashCode() { hash = (37 * hash) + UPDATES_FIELD_NUMBER; hash = (53 * hash) + getUpdatesList().hashCode(); } + if (hasLastStatements()) { + hash = (37 * hash) + LAST_STATEMENTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLastStatements()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -243,38 +303,38 @@ public static com.google.spanner.executor.v1.BatchDmlAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -297,7 +357,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -311,7 +371,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.BatchDmlAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.BatchDmlAction) com.google.spanner.executor.v1.BatchDmlActionOrBuilder { @@ -321,7 +381,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_BatchDmlAction_fieldAccessorTable @@ -333,7 +393,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.BatchDmlAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -348,6 +408,7 @@ public Builder clear() { updatesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); + lastStatements_ = false; return this; } @@ -397,39 +458,12 @@ private void buildPartialRepeatedFields(com.google.spanner.executor.v1.BatchDmlA 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); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lastStatements_ = lastStatements_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -463,14 +497,17 @@ public Builder mergeFrom(com.google.spanner.executor.v1.BatchDmlAction other) { updates_ = other.updates_; bitField0_ = (bitField0_ & ~0x00000001); updatesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getUpdatesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetUpdatesFieldBuilder() : null; } else { updatesBuilder_.addAllMessages(other.updates_); } } } + if (other.hasLastStatements()) { + setLastStatements(other.getLastStatements()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -510,6 +547,12 @@ public Builder mergeFrom( } break; } // case 10 + case 16: + { + lastStatements_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -539,7 +582,7 @@ private void ensureUpdatesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> @@ -798,7 +841,7 @@ public Builder removeUpdates(int index) { * repeated .google.spanner.executor.v1.QueryAction updates = 1; */ public com.google.spanner.executor.v1.QueryAction.Builder getUpdatesBuilder(int index) { - return getUpdatesFieldBuilder().getBuilder(index); + return internalGetUpdatesFieldBuilder().getBuilder(index); } /** @@ -846,7 +889,7 @@ public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdatesOrBuilder(i * repeated .google.spanner.executor.v1.QueryAction updates = 1; */ public com.google.spanner.executor.v1.QueryAction.Builder addUpdatesBuilder() { - return getUpdatesFieldBuilder() + return internalGetUpdatesFieldBuilder() .addBuilder(com.google.spanner.executor.v1.QueryAction.getDefaultInstance()); } @@ -860,7 +903,7 @@ public com.google.spanner.executor.v1.QueryAction.Builder addUpdatesBuilder() { * repeated .google.spanner.executor.v1.QueryAction updates = 1; */ public com.google.spanner.executor.v1.QueryAction.Builder addUpdatesBuilder(int index) { - return getUpdatesFieldBuilder() + return internalGetUpdatesFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.QueryAction.getDefaultInstance()); } @@ -875,17 +918,17 @@ public com.google.spanner.executor.v1.QueryAction.Builder addUpdatesBuilder(int */ public java.util.List getUpdatesBuilderList() { - return getUpdatesFieldBuilder().getBuilderList(); + return internalGetUpdatesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> - getUpdatesFieldBuilder() { + internalGetUpdatesFieldBuilder() { if (updatesBuilder_ == null) { updatesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder>( @@ -895,15 +938,84 @@ public com.google.spanner.executor.v1.QueryAction.Builder addUpdatesBuilder(int return updatesBuilder_; } + private boolean lastStatements_; + + /** + * + * + *
+     * Whether to set this request with the last statement option in the
+     * transaction. The transaction should be committed after processing this
+     * request.
+     * 
+ * + * optional bool last_statements = 2; + * + * @return Whether the lastStatements field is set. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean hasLastStatements() { + return ((bitField0_ & 0x00000002) != 0); } + /** + * + * + *
+     * Whether to set this request with the last statement option in the
+     * transaction. The transaction should be committed after processing this
+     * request.
+     * 
+ * + * optional bool last_statements = 2; + * + * @return The lastStatements. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public boolean getLastStatements() { + return lastStatements_; + } + + /** + * + * + *
+     * Whether to set this request with the last statement option in the
+     * transaction. The transaction should be committed after processing this
+     * request.
+     * 
+ * + * optional bool last_statements = 2; + * + * @param value The lastStatements to set. + * @return This builder for chaining. + */ + public Builder setLastStatements(boolean value) { + + lastStatements_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Whether to set this request with the last statement option in the
+     * transaction. The transaction should be committed after processing this
+     * request.
+     * 
+ * + * optional bool last_statements = 2; + * + * @return This builder for chaining. + */ + public Builder clearLastStatements() { + bitField0_ = (bitField0_ & ~0x00000002); + lastStatements_ = false; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.BatchDmlAction) 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 index 857f300a5ae..b2eefb53454 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface BatchDmlActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.BatchDmlAction) @@ -79,4 +81,34 @@ public interface BatchDmlActionOrBuilder * repeated .google.spanner.executor.v1.QueryAction updates = 1; */ com.google.spanner.executor.v1.QueryActionOrBuilder getUpdatesOrBuilder(int index); + + /** + * + * + *
+   * Whether to set this request with the last statement option in the
+   * transaction. The transaction should be committed after processing this
+   * request.
+   * 
+ * + * optional bool last_statements = 2; + * + * @return Whether the lastStatements field is set. + */ + boolean hasLastStatements(); + + /** + * + * + *
+   * Whether to set this request with the last statement option in the
+   * transaction. The transaction should be committed after processing this
+   * request.
+   * 
+ * + * optional bool last_statements = 2; + * + * @return The lastStatements. + */ + boolean getLastStatements(); } 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 index 6b0d15358bd..4f68b2ac15d 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.executor.v1.BatchPartition} */ -public final class BatchPartition extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BatchPartition extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.BatchPartition) BatchPartitionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchPartition"); + } + // Use BatchPartition.newBuilder() to construct. - private BatchPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BatchPartition(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +59,13 @@ private BatchPartition() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_BatchPartition_fieldAccessorTable @@ -269,10 +275,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeBytes(2, partitionToken_); } if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, table_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, table_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, index_); + com.google.protobuf.GeneratedMessage.writeString(output, 4, index_); } getUnknownFields().writeTo(output); } @@ -290,10 +296,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, partitionToken_); } if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, table_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, table_); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, index_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, index_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -386,38 +392,38 @@ public static com.google.spanner.executor.v1.BatchPartition parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -440,7 +446,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -455,7 +461,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.BatchPartition} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.BatchPartition) com.google.spanner.executor.v1.BatchPartitionOrBuilder { @@ -465,7 +471,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_BatchPartition_fieldAccessorTable @@ -477,7 +483,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.BatchPartition.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -543,39 +549,6 @@ private void buildPartial0(com.google.spanner.executor.v1.BatchPartition result) 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) { @@ -588,10 +561,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { 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) { + if (!other.getPartition().isEmpty()) { setPartition(other.getPartition()); } - if (other.getPartitionToken() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getPartitionToken().isEmpty()) { setPartitionToken(other.getPartitionToken()); } if (other.hasTable()) { @@ -1047,17 +1020,6 @@ public Builder setIndexBytes(com.google.protobuf.ByteString value) { 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) } 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 index f288fc4f94f..ec2e07dbf6e 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface BatchPartitionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.BatchPartition) 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 index 404901f3403..c278e607f75 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CancelOperationAction} */ -public final class CancelOperationAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CancelOperationAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CancelOperationAction) CancelOperationActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CancelOperationAction"); + } + // Use CancelOperationAction.newBuilder() to construct. - private CancelOperationAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CancelOperationAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CancelOperationAction_fieldAccessorTable @@ -131,8 +137,8 @@ public final boolean isInitialized() { @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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, operation_); } getUnknownFields().writeTo(output); } @@ -143,8 +149,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operation_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, operation_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -218,38 +224,38 @@ public static com.google.spanner.executor.v1.CancelOperationAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -272,7 +278,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -286,7 +292,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CancelOperationAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CancelOperationAction) com.google.spanner.executor.v1.CancelOperationActionOrBuilder { @@ -296,7 +302,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CancelOperationAction_fieldAccessorTable @@ -308,7 +314,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.CancelOperationAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -358,39 +364,6 @@ private void buildPartial0(com.google.spanner.executor.v1.CancelOperationAction } } - @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) { @@ -571,17 +544,6 @@ public Builder setOperationBytes(com.google.protobuf.ByteString value) { 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) } 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 index 995f8404738..20a22605de1 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CancelOperationActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CancelOperationAction) diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseAction.java index 8705ac750bf..8e7adf8ea95 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseAction.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,15 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction} */ -public final class ChangeQuorumCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ChangeQuorumCloudDatabaseAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) ChangeQuorumCloudDatabaseActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChangeQuorumCloudDatabaseAction"); + } + // Use ChangeQuorumCloudDatabaseAction.newBuilder() to construct. - private ChangeQuorumCloudDatabaseAction( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ChangeQuorumCloudDatabaseAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +56,13 @@ private ChangeQuorumCloudDatabaseAction() { servingLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ChangeQuorumCloudDatabaseAction(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_fieldAccessorTable @@ -219,10 +224,10 @@ public final boolean isInitialized() { @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_); + com.google.protobuf.GeneratedMessage.writeString(output, 1, databaseUri_); } for (int i = 0; i < servingLocations_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, servingLocations_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, servingLocations_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -234,7 +239,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, databaseUri_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, databaseUri_); } { int dataSize = 0; @@ -326,38 +331,38 @@ public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction par public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -381,7 +386,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -395,7 +400,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseActionOrBuilder { @@ -405,7 +410,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_fieldAccessorTable @@ -417,7 +422,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -477,39 +482,6 @@ private void buildPartial0( 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.ChangeQuorumCloudDatabaseAction) { @@ -906,17 +878,6 @@ public Builder addServingLocationsBytes(com.google.protobuf.ByteString value) { 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.ChangeQuorumCloudDatabaseAction) } diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseActionOrBuilder.java index c35b3e9f4d5..59c996dff72 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseActionOrBuilder.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeQuorumCloudDatabaseActionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ChangeQuorumCloudDatabaseActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction) 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 index d5217e28584..e0084b3729e 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -30,32 +31,37 @@ * * Protobuf type {@code google.spanner.executor.v1.ChangeStreamRecord} */ -public final class ChangeStreamRecord extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ChangeStreamRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ChangeStreamRecord) ChangeStreamRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChangeStreamRecord"); + } + // Use ChangeStreamRecord.newBuilder() to construct. - private ChangeStreamRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ChangeStreamRecord(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ChangeStreamRecord_fieldAccessorTable @@ -426,38 +432,38 @@ public static com.google.spanner.executor.v1.ChangeStreamRecord parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -480,7 +486,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -496,7 +502,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ChangeStreamRecord} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ChangeStreamRecord) com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder { @@ -506,7 +512,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ChangeStreamRecord_fieldAccessorTable @@ -518,7 +524,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.ChangeStreamRecord.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -590,39 +596,6 @@ private void buildPartialOneofs(com.google.spanner.executor.v1.ChangeStreamRecor } } - @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) { @@ -685,19 +658,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getDataChangeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetDataChangeFieldBuilder().getBuilder(), extensionRegistry); recordCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getChildPartitionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetChildPartitionFieldBuilder().getBuilder(), extensionRegistry); recordCase_ = 2; break; } // case 18 case 26: { - input.readMessage(getHeartbeatFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetHeartbeatFieldBuilder().getBuilder(), extensionRegistry); recordCase_ = 3; break; } // case 26 @@ -734,7 +710,7 @@ public Builder clearRecord() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DataChangeRecord, com.google.spanner.executor.v1.DataChangeRecord.Builder, com.google.spanner.executor.v1.DataChangeRecordOrBuilder> @@ -895,7 +871,7 @@ public Builder clearDataChange() { * .google.spanner.executor.v1.DataChangeRecord data_change = 1; */ public com.google.spanner.executor.v1.DataChangeRecord.Builder getDataChangeBuilder() { - return getDataChangeFieldBuilder().getBuilder(); + return internalGetDataChangeFieldBuilder().getBuilder(); } /** @@ -928,17 +904,17 @@ public com.google.spanner.executor.v1.DataChangeRecordOrBuilder getDataChangeOrB * * .google.spanner.executor.v1.DataChangeRecord data_change = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DataChangeRecord, com.google.spanner.executor.v1.DataChangeRecord.Builder, com.google.spanner.executor.v1.DataChangeRecordOrBuilder> - getDataChangeFieldBuilder() { + internalGetDataChangeFieldBuilder() { if (dataChangeBuilder_ == null) { if (!(recordCase_ == 1)) { record_ = com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance(); } dataChangeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DataChangeRecord, com.google.spanner.executor.v1.DataChangeRecord.Builder, com.google.spanner.executor.v1.DataChangeRecordOrBuilder>( @@ -952,7 +928,7 @@ public com.google.spanner.executor.v1.DataChangeRecordOrBuilder getDataChangeOrB return dataChangeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ChildPartitionsRecord, com.google.spanner.executor.v1.ChildPartitionsRecord.Builder, com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder> @@ -1114,7 +1090,7 @@ public Builder clearChildPartition() { * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; */ public com.google.spanner.executor.v1.ChildPartitionsRecord.Builder getChildPartitionBuilder() { - return getChildPartitionFieldBuilder().getBuilder(); + return internalGetChildPartitionFieldBuilder().getBuilder(); } /** @@ -1148,17 +1124,17 @@ public com.google.spanner.executor.v1.ChildPartitionsRecord.Builder getChildPart * * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ChildPartitionsRecord, com.google.spanner.executor.v1.ChildPartitionsRecord.Builder, com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder> - getChildPartitionFieldBuilder() { + internalGetChildPartitionFieldBuilder() { if (childPartitionBuilder_ == null) { if (!(recordCase_ == 2)) { record_ = com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance(); } childPartitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ChildPartitionsRecord, com.google.spanner.executor.v1.ChildPartitionsRecord.Builder, com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder>( @@ -1172,7 +1148,7 @@ public com.google.spanner.executor.v1.ChildPartitionsRecord.Builder getChildPart return childPartitionBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.HeartbeatRecord, com.google.spanner.executor.v1.HeartbeatRecord.Builder, com.google.spanner.executor.v1.HeartbeatRecordOrBuilder> @@ -1333,7 +1309,7 @@ public Builder clearHeartbeat() { * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; */ public com.google.spanner.executor.v1.HeartbeatRecord.Builder getHeartbeatBuilder() { - return getHeartbeatFieldBuilder().getBuilder(); + return internalGetHeartbeatFieldBuilder().getBuilder(); } /** @@ -1366,17 +1342,17 @@ public com.google.spanner.executor.v1.HeartbeatRecordOrBuilder getHeartbeatOrBui * * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.HeartbeatRecord, com.google.spanner.executor.v1.HeartbeatRecord.Builder, com.google.spanner.executor.v1.HeartbeatRecordOrBuilder> - getHeartbeatFieldBuilder() { + internalGetHeartbeatFieldBuilder() { if (heartbeatBuilder_ == null) { if (!(recordCase_ == 3)) { record_ = com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance(); } heartbeatBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.HeartbeatRecord, com.google.spanner.executor.v1.HeartbeatRecord.Builder, com.google.spanner.executor.v1.HeartbeatRecordOrBuilder>( @@ -1390,17 +1366,6 @@ public com.google.spanner.executor.v1.HeartbeatRecordOrBuilder getHeartbeatOrBui 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) } 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 index 9ba18c4b90a..ea4777d9ba0 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ChangeStreamRecordOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ChangeStreamRecord) 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 index 72ace8d2693..de5b768d3c6 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ChildPartitionsRecord} */ -public final class ChildPartitionsRecord extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ChildPartitionsRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ChildPartitionsRecord) ChildPartitionsRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChildPartitionsRecord"); + } + // Use ChildPartitionsRecord.newBuilder() to construct. - private ChildPartitionsRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ChildPartitionsRecord(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private ChildPartitionsRecord() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_fieldAccessorTable @@ -160,14 +166,24 @@ public interface ChildPartitionOrBuilder * * Protobuf type {@code google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition} */ - public static final class ChildPartition extends com.google.protobuf.GeneratedMessageV3 + public static final class ChildPartition extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition) ChildPartitionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChildPartition"); + } + // Use ChildPartition.newBuilder() to construct. - private ChildPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ChildPartition(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -176,19 +192,13 @@ private ChildPartition() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_fieldAccessorTable @@ -332,11 +342,11 @@ public final boolean isInitialized() { @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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, token_); } for (int i = 0; i < parentPartitionTokens_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( + com.google.protobuf.GeneratedMessage.writeString( output, 2, parentPartitionTokens_.getRaw(i)); } getUnknownFields().writeTo(output); @@ -348,8 +358,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, token_); } { int dataSize = 0; @@ -437,39 +447,39 @@ public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitio 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -493,8 +503,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -508,8 +517,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition) com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder { @@ -519,7 +527,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_fieldAccessorTable @@ -532,7 +540,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -590,41 +598,6 @@ private void buildPartial0( } } - @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) { @@ -1009,18 +982,6 @@ public Builder addParentPartitionTokensBytes(com.google.protobuf.ByteString valu 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) } @@ -1296,8 +1257,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getStartTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, recordSequence_); } for (int i = 0; i < childPartitions_.size(); i++) { output.writeMessage(3, childPartitions_.get(i)); @@ -1314,8 +1275,8 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, recordSequence_); } for (int i = 0; i < childPartitions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, childPartitions_.get(i)); @@ -1405,38 +1366,38 @@ public static com.google.spanner.executor.v1.ChildPartitionsRecord parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1459,7 +1420,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1473,7 +1434,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ChildPartitionsRecord} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ChildPartitionsRecord) com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder { @@ -1483,7 +1444,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_fieldAccessorTable @@ -1497,15 +1458,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStartTimeFieldBuilder(); - getChildPartitionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetChildPartitionsFieldBuilder(); } } @@ -1587,39 +1548,6 @@ private void buildPartial0(com.google.spanner.executor.v1.ChildPartitionsRecord 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.ChildPartitionsRecord) { @@ -1660,8 +1588,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.ChildPartitionsRecord ot childPartitions_ = other.childPartitions_; bitField0_ = (bitField0_ & ~0x00000004); childPartitionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getChildPartitionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetChildPartitionsFieldBuilder() : null; } else { childPartitionsBuilder_.addAllMessages(other.childPartitions_); @@ -1696,7 +1624,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -1741,7 +1670,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1891,7 +1820,7 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } /** @@ -1922,14 +1851,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_time = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { + internalGetStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2078,7 +2007,7 @@ private void ensureChildPartitionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition, com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder, com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder> @@ -2377,7 +2306,7 @@ public Builder removeChildPartitions(int index) { */ public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder getChildPartitionsBuilder(int index) { - return getChildPartitionsFieldBuilder().getBuilder(index); + return internalGetChildPartitionsFieldBuilder().getBuilder(index); } /** @@ -2434,7 +2363,7 @@ public Builder removeChildPartitions(int index) { */ public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder addChildPartitionsBuilder() { - return getChildPartitionsFieldBuilder() + return internalGetChildPartitionsFieldBuilder() .addBuilder( com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition .getDefaultInstance()); @@ -2453,7 +2382,7 @@ public Builder removeChildPartitions(int index) { */ public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder addChildPartitionsBuilder(int index) { - return getChildPartitionsFieldBuilder() + return internalGetChildPartitionsFieldBuilder() .addBuilder( index, com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition @@ -2474,17 +2403,17 @@ public Builder removeChildPartitions(int index) { public java.util.List< com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder> getChildPartitionsBuilderList() { - return getChildPartitionsFieldBuilder().getBuilderList(); + return internalGetChildPartitionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition, com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder, com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder> - getChildPartitionsFieldBuilder() { + internalGetChildPartitionsFieldBuilder() { if (childPartitionsBuilder_ == null) { childPartitionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition, com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder, com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder>( @@ -2497,17 +2426,6 @@ public Builder removeChildPartitions(int index) { 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) } 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 index 6652fb905fb..43faee8ccf0 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ChildPartitionsRecordOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ChildPartitionsRecord) 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 index 07b704f3c34..e40df76973b 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -36,32 +37,37 @@ * * Protobuf type {@code google.spanner.executor.v1.CloseBatchTransactionAction} */ -public final class CloseBatchTransactionAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CloseBatchTransactionAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloseBatchTransactionAction) CloseBatchTransactionActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloseBatchTransactionAction"); + } + // Use CloseBatchTransactionAction.newBuilder() to construct. - private CloseBatchTransactionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CloseBatchTransactionAction(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_fieldAccessorTable @@ -190,38 +196,38 @@ public static com.google.spanner.executor.v1.CloseBatchTransactionAction parseFr 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -245,7 +251,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -267,7 +273,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CloseBatchTransactionAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloseBatchTransactionAction) com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder { @@ -277,7 +283,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_fieldAccessorTable @@ -289,7 +295,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.CloseBatchTransactionAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -339,39 +345,6 @@ private void buildPartial0(com.google.spanner.executor.v1.CloseBatchTransactionA } } - @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) { @@ -495,17 +468,6 @@ public Builder clearCleanup() { 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) } 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 index 98e1e5c83a1..a5451ff1194 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CloseBatchTransactionActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloseBatchTransactionAction) 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 index 231127db99c..216dc3e8bbf 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CloudBackupResponse} */ -public final class CloudBackupResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CloudBackupResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloudBackupResponse) CloudBackupResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudBackupResponse"); + } + // Use CloudBackupResponse.newBuilder() to construct. - private CloudBackupResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CloudBackupResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private CloudBackupResponse() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloudBackupResponse_fieldAccessorTable @@ -348,8 +354,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getBackup()); @@ -371,8 +377,8 @@ public int getSerializedSize() { 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBackup()); @@ -468,38 +474,38 @@ public static com.google.spanner.executor.v1.CloudBackupResponse parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -522,7 +528,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -537,7 +543,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CloudBackupResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloudBackupResponse) com.google.spanner.executor.v1.CloudBackupResponseOrBuilder { @@ -547,7 +553,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloudBackupResponse_fieldAccessorTable @@ -561,16 +567,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getListedBackupsFieldBuilder(); - getListedBackupOperationsFieldBuilder(); - getBackupFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetListedBackupsFieldBuilder(); + internalGetListedBackupOperationsFieldBuilder(); + internalGetBackupFieldBuilder(); } } @@ -668,39 +674,6 @@ private void buildPartial0(com.google.spanner.executor.v1.CloudBackupResponse re 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.CloudBackupResponse) { @@ -733,8 +706,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.CloudBackupResponse othe listedBackups_ = other.listedBackups_; bitField0_ = (bitField0_ & ~0x00000001); listedBackupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getListedBackupsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetListedBackupsFieldBuilder() : null; } else { listedBackupsBuilder_.addAllMessages(other.listedBackups_); @@ -760,8 +733,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.CloudBackupResponse othe listedBackupOperations_ = other.listedBackupOperations_; bitField0_ = (bitField0_ & ~0x00000002); listedBackupOperationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getListedBackupOperationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetListedBackupOperationsFieldBuilder() : null; } else { listedBackupOperationsBuilder_.addAllMessages(other.listedBackupOperations_); @@ -835,7 +808,7 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetBackupFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -869,7 +842,7 @@ private void ensureListedBackupsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> @@ -1129,7 +1102,7 @@ public Builder removeListedBackups(int index) { * 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); + return internalGetListedBackupsFieldBuilder().getBuilder(index); } /** @@ -1178,7 +1151,7 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getListedBackupsOrBu * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; */ public com.google.spanner.admin.database.v1.Backup.Builder addListedBackupsBuilder() { - return getListedBackupsFieldBuilder() + return internalGetListedBackupsFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.Backup.getDefaultInstance()); } @@ -1192,7 +1165,7 @@ public com.google.spanner.admin.database.v1.Backup.Builder addListedBackupsBuild * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; */ public com.google.spanner.admin.database.v1.Backup.Builder addListedBackupsBuilder(int index) { - return getListedBackupsFieldBuilder() + return internalGetListedBackupsFieldBuilder() .addBuilder(index, com.google.spanner.admin.database.v1.Backup.getDefaultInstance()); } @@ -1207,17 +1180,17 @@ public com.google.spanner.admin.database.v1.Backup.Builder addListedBackupsBuild */ public java.util.List getListedBackupsBuilderList() { - return getListedBackupsFieldBuilder().getBuilderList(); + return internalGetListedBackupsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> - getListedBackupsFieldBuilder() { + internalGetListedBackupsFieldBuilder() { if (listedBackupsBuilder_ == null) { listedBackupsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder>( @@ -1241,7 +1214,7 @@ private void ensureListedBackupOperationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> @@ -1501,7 +1474,7 @@ public Builder removeListedBackupOperations(int index) { * repeated .google.longrunning.Operation listed_backup_operations = 2; */ public com.google.longrunning.Operation.Builder getListedBackupOperationsBuilder(int index) { - return getListedBackupOperationsFieldBuilder().getBuilder(index); + return internalGetListedBackupOperationsFieldBuilder().getBuilder(index); } /** @@ -1549,7 +1522,7 @@ public com.google.longrunning.OperationOrBuilder getListedBackupOperationsOrBuil * repeated .google.longrunning.Operation listed_backup_operations = 2; */ public com.google.longrunning.Operation.Builder addListedBackupOperationsBuilder() { - return getListedBackupOperationsFieldBuilder() + return internalGetListedBackupOperationsFieldBuilder() .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); } @@ -1563,7 +1536,7 @@ public com.google.longrunning.Operation.Builder addListedBackupOperationsBuilder * repeated .google.longrunning.Operation listed_backup_operations = 2; */ public com.google.longrunning.Operation.Builder addListedBackupOperationsBuilder(int index) { - return getListedBackupOperationsFieldBuilder() + return internalGetListedBackupOperationsFieldBuilder() .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); } @@ -1578,17 +1551,17 @@ public com.google.longrunning.Operation.Builder addListedBackupOperationsBuilder */ public java.util.List getListedBackupOperationsBuilderList() { - return getListedBackupOperationsFieldBuilder().getBuilderList(); + return internalGetListedBackupOperationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> - getListedBackupOperationsFieldBuilder() { + internalGetListedBackupOperationsFieldBuilder() { if (listedBackupOperationsBuilder_ == null) { listedBackupOperationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( @@ -1718,7 +1691,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> @@ -1863,7 +1836,7 @@ public Builder clearBackup() { public com.google.spanner.admin.database.v1.Backup.Builder getBackupBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getBackupFieldBuilder().getBuilder(); + return internalGetBackupFieldBuilder().getBuilder(); } /** @@ -1894,14 +1867,14 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() * * .google.spanner.admin.database.v1.Backup backup = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder> - getBackupFieldBuilder() { + internalGetBackupFieldBuilder() { if (backupBuilder_ == null) { backupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Backup, com.google.spanner.admin.database.v1.Backup.Builder, com.google.spanner.admin.database.v1.BackupOrBuilder>( @@ -1911,17 +1884,6 @@ public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() 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) } 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 index 44496a59a39..5b10cd1f537 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CloudBackupResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloudBackupResponse) 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 index b3ccef4d219..911942c101d 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CloudDatabaseResponse} */ -public final class CloudDatabaseResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CloudDatabaseResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloudDatabaseResponse) CloudDatabaseResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudDatabaseResponse"); + } + // Use CloudDatabaseResponse.newBuilder() to construct. - private CloudDatabaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CloudDatabaseResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private CloudDatabaseResponse() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloudDatabaseResponse_fieldAccessorTable @@ -349,8 +355,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getDatabase()); @@ -372,8 +378,8 @@ public int getSerializedSize() { 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDatabase()); @@ -469,38 +475,38 @@ public static com.google.spanner.executor.v1.CloudDatabaseResponse parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -523,7 +529,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -538,7 +544,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CloudDatabaseResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloudDatabaseResponse) com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder { @@ -548,7 +554,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloudDatabaseResponse_fieldAccessorTable @@ -562,16 +568,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getListedDatabasesFieldBuilder(); - getListedDatabaseOperationsFieldBuilder(); - getDatabaseFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetListedDatabasesFieldBuilder(); + internalGetListedDatabaseOperationsFieldBuilder(); + internalGetDatabaseFieldBuilder(); } } @@ -670,39 +676,6 @@ private void buildPartial0(com.google.spanner.executor.v1.CloudDatabaseResponse 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.CloudDatabaseResponse) { @@ -735,8 +708,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.CloudDatabaseResponse ot listedDatabases_ = other.listedDatabases_; bitField0_ = (bitField0_ & ~0x00000001); listedDatabasesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getListedDatabasesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetListedDatabasesFieldBuilder() : null; } else { listedDatabasesBuilder_.addAllMessages(other.listedDatabases_); @@ -762,8 +735,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.CloudDatabaseResponse ot listedDatabaseOperations_ = other.listedDatabaseOperations_; bitField0_ = (bitField0_ & ~0x00000002); listedDatabaseOperationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getListedDatabaseOperationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetListedDatabaseOperationsFieldBuilder() : null; } else { listedDatabaseOperationsBuilder_.addAllMessages(other.listedDatabaseOperations_); @@ -837,7 +810,8 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getDatabaseFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetDatabaseFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -872,7 +846,7 @@ private void ensureListedDatabasesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder> @@ -1135,7 +1109,7 @@ public Builder removeListedDatabases(int index) { */ public com.google.spanner.admin.database.v1.Database.Builder getListedDatabasesBuilder( int index) { - return getListedDatabasesFieldBuilder().getBuilder(index); + return internalGetListedDatabasesFieldBuilder().getBuilder(index); } /** @@ -1184,7 +1158,7 @@ public com.google.spanner.admin.database.v1.DatabaseOrBuilder getListedDatabases * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; */ public com.google.spanner.admin.database.v1.Database.Builder addListedDatabasesBuilder() { - return getListedDatabasesFieldBuilder() + return internalGetListedDatabasesFieldBuilder() .addBuilder(com.google.spanner.admin.database.v1.Database.getDefaultInstance()); } @@ -1199,7 +1173,7 @@ public com.google.spanner.admin.database.v1.Database.Builder addListedDatabasesB */ public com.google.spanner.admin.database.v1.Database.Builder addListedDatabasesBuilder( int index) { - return getListedDatabasesFieldBuilder() + return internalGetListedDatabasesFieldBuilder() .addBuilder(index, com.google.spanner.admin.database.v1.Database.getDefaultInstance()); } @@ -1214,17 +1188,17 @@ public com.google.spanner.admin.database.v1.Database.Builder addListedDatabasesB */ public java.util.List getListedDatabasesBuilderList() { - return getListedDatabasesFieldBuilder().getBuilderList(); + return internalGetListedDatabasesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder> - getListedDatabasesFieldBuilder() { + internalGetListedDatabasesFieldBuilder() { if (listedDatabasesBuilder_ == null) { listedDatabasesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder>( @@ -1248,7 +1222,7 @@ private void ensureListedDatabaseOperationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> @@ -1508,7 +1482,7 @@ public Builder removeListedDatabaseOperations(int index) { * repeated .google.longrunning.Operation listed_database_operations = 2; */ public com.google.longrunning.Operation.Builder getListedDatabaseOperationsBuilder(int index) { - return getListedDatabaseOperationsFieldBuilder().getBuilder(index); + return internalGetListedDatabaseOperationsFieldBuilder().getBuilder(index); } /** @@ -1557,7 +1531,7 @@ public com.google.longrunning.OperationOrBuilder getListedDatabaseOperationsOrBu * repeated .google.longrunning.Operation listed_database_operations = 2; */ public com.google.longrunning.Operation.Builder addListedDatabaseOperationsBuilder() { - return getListedDatabaseOperationsFieldBuilder() + return internalGetListedDatabaseOperationsFieldBuilder() .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); } @@ -1571,7 +1545,7 @@ public com.google.longrunning.Operation.Builder addListedDatabaseOperationsBuild * repeated .google.longrunning.Operation listed_database_operations = 2; */ public com.google.longrunning.Operation.Builder addListedDatabaseOperationsBuilder(int index) { - return getListedDatabaseOperationsFieldBuilder() + return internalGetListedDatabaseOperationsFieldBuilder() .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); } @@ -1586,17 +1560,17 @@ public com.google.longrunning.Operation.Builder addListedDatabaseOperationsBuild */ public java.util.List getListedDatabaseOperationsBuilderList() { - return getListedDatabaseOperationsFieldBuilder().getBuilderList(); + return internalGetListedDatabaseOperationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> - getListedDatabaseOperationsFieldBuilder() { + internalGetListedDatabaseOperationsFieldBuilder() { if (listedDatabaseOperationsBuilder_ == null) { listedDatabaseOperationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( @@ -1726,7 +1700,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.Database database_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder> @@ -1872,7 +1846,7 @@ public Builder clearDatabase() { public com.google.spanner.admin.database.v1.Database.Builder getDatabaseBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getDatabaseFieldBuilder().getBuilder(); + return internalGetDatabaseFieldBuilder().getBuilder(); } /** @@ -1903,14 +1877,14 @@ public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuild * * .google.spanner.admin.database.v1.Database database = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder> - getDatabaseFieldBuilder() { + internalGetDatabaseFieldBuilder() { if (databaseBuilder_ == null) { databaseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.Database, com.google.spanner.admin.database.v1.Database.Builder, com.google.spanner.admin.database.v1.DatabaseOrBuilder>( @@ -1920,17 +1894,6 @@ public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuild 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) } 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 index 5f7f9167e2f..ae9f5799c98 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CloudDatabaseResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloudDatabaseResponse) 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 index 4ba86717ec9..85079577198 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; -public final class CloudExecutorProto { +@com.google.protobuf.Generated +public final class CloudExecutorProto extends com.google.protobuf.GeneratedFile { private CloudExecutorProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudExecutorProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,335 +42,347 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_AdaptMessageAction_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_executor_v1_AdaptMessageAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_AdaptMessageAction_AttachmentsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_executor_v1_AdaptMessageAction_AttachmentsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_executor_v1_GetOperationAction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_executor_v1_QueryCancellationAction_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_executor_v1_QueryCancellationAction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_executor_v1_CancelOperationAction_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_executor_v1_CancelOperationAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_AddSplitPointsAction_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_executor_v1_AddSplitPointsAction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_executor_v1_StartBatchTransactionAction_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.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 + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_executor_v1_HeartbeatRecord_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_executor_v1_SpannerOptions_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_executor_v1_SpannerOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_executor_v1_SessionPoolOptions_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -386,7 +410,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\032SpannerAsyncActionResponse\022\021\n" + "\taction_id\030\001 \001(\005\022A\n" + "\007outcome\030\002" - + " \001(\01320.google.spanner.executor.v1.SpannerActionOutcome\"\361\n\n\r" + + " \001(\01320.google.spanner.executor.v1.SpannerActionOutcome\"\272\013\n\r" + "SpannerAction\022\025\n\r" + "database_path\030\001 \001(\t\022C\n" + "\017spanner_options\030\002 \001" @@ -418,7 +442,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\033execute_change_stream_query\0302 \001(\01324.google.spanner" + ".executor.v1.ExecuteChangeStreamQueryH\000\022Q\n" + "\022query_cancellation\0303 \001(\01323.google.spa" - + "nner.executor.v1.QueryCancellationActionH\000B\010\n" + + "nner.executor.v1.QueryCancellationActionH\000\022G\n\r" + + "adapt_message\0304" + + " \001(\0132..google.spanner.executor.v1.AdaptMessageActionH\000B\010\n" + "\006action\"\212\001\n\n" + "ReadAction\022\r\n" + "\005table\030\001 \001(\t\022\022\n" @@ -433,13 +459,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tParameter\022\014\n" + "\004name\030\001 \001(\t\022%\n" + "\004type\030\002 \001(\0132\027.google.spanner.v1.Type\0220\n" - + "\005value\030\003 \001(\0132!.google.spanner.executor.v1.Value\"\206\001\n" + + "\005value\030\003 \001(\0132!.google.spanner.executor.v1.Value\"\266\001\n" + "\tDmlAction\0227\n" + "\006update\030\001 \001(\0132\'.google.spanner.executor.v1.QueryAction\022$\n" - + "\027autocommit_if_supported\030\002 \001(\010H\000\210\001\001B\032\n" - + "\030_autocommit_if_supported\"J\n" + + "\027autocommit_if_supported\030\002 \001(\010H\000\210\001\001\022\033\n" + + "\016last_statement\030\003 \001(\010H\001\210\001\001B\032\n" + + "\030_autocommit_if_supportedB\021\n" + + "\017_last_statement\"|\n" + "\016BatchDmlAction\0228\n" - + "\007updates\030\001 \003(\0132\'.google.spanner.executor.v1.QueryAction\"\311\003\n" + + "\007updates\030\001 \003(\0132\'.google.spanner.executor.v1.QueryAction\022\034\n" + + "\017last_statements\030\002 \001(\010H\000\210\001\001B\022\n" + + "\020_last_statements\"\311\003\n" + "\005Value\022\021\n" + "\007is_null\030\001 \001(\010H\000\022\023\n" + "\tint_value\030\002 \001(\003H\000\022\024\n\n" @@ -488,33 +518,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005table\030\001 \001(\t\022E\n" + "\006insert\030\002" + " \001(\01325.google.spanner.executor.v1.MutationAction.InsertArgs\022E\n" - + "\006update\030\003 \001(\013" - + "25.google.spanner.executor.v1.MutationAction.UpdateArgs\022O\n" - + "\020insert_or_update\030\004 \001(" - + "\01325.google.spanner.executor.v1.MutationAction.InsertArgs\022F\n" - + "\007replace\030\005 \001(\01325.goog" - + "le.spanner.executor.v1.MutationAction.InsertArgs\0227\n" + + "\006update\030\003" + + " \001(\01325.google.spanner.executor.v1.MutationAction.UpdateArgs\022O\n" + + "\020insert_or_update\030\004" + + " \001(\01325.google.spanner.executor.v1.MutationAction.InsertArgs\022F\n" + + "\007replace\030\005" + + " \001(\01325.google.spanner.executor.v1.MutationAction.InsertArgs\0227\n" + "\013delete_keys\030\006 \001(\0132\".google.spanner.executor.v1.KeySet\"T\n" + "\024WriteMutationsAction\022<\n" + "\010mutation\030\001 \001(\0132*.google.spanner.executor.v1.MutationAction\"\337\002\n" + "\027PartitionedUpdateAction\022i\n" - + "\007options\030\001 \001(\0132S.google.spanner.executor.v1.PartitionedUpd" - + "ateAction.ExecutePartitionedUpdateOptionsH\000\210\001\001\0227\n" + + "\007options\030\001 \001(\0132S.google.spanner.executor.v1.Par" + + "titionedUpdateAction.ExecutePartitionedUpdateOptionsH\000\210\001\001\0227\n" + "\006update\030\002 \001(\0132\'.google.spanner.executor.v1.QueryAction\032\223\001\n" + "\037ExecutePartitionedUpdateOptions\022E\n" - + "\014rpc_priority\030\001 \001(" - + "\0162*.google.spanner.v1.RequestOptions.PriorityH\000\210\001\001\022\020\n" + + "\014rpc_priority\030\001" + + " \001(\0162*.google.spanner.v1.RequestOptions.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" + "\026StartTransactionAction\022A\n" - + "\013concurrency\030\001 \001(\0132\'.goog" - + "le.spanner.executor.v1.ConcurrencyH\000\210\001\001\0228\n" + + "\013concurrency\030\001" + + " \001(\0132\'.google.spanner.executor.v1.ConcurrencyH\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.TransactionExecutionOptionsH\001\210\001\001B\016\n" + + "\021execution_options\030\004 \001(" + + "\01327.google.spanner.executor.v1.TransactionExecutionOptionsH\001\210\001\001B\016\n" + "\014_concurrencyB\024\n" + "\022_execution_options\"\256\002\n" + "\013Concurrency\022\033\n" @@ -534,73 +564,80 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "key_column\030\003 \003(\0132*.google.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" + + "\004type\030\002 \001(\0132\027.google.spanner.v1.Type\"\357\001\n" + "\033TransactionExecutionOptions\022\022\n\n" - + "optimistic\030\001 \001(\010\"\230\001\n" + + "optimistic\030\001 \001(\010\022#\n" + + "\033exclude_from_change_streams\030\002 \001(\010\022\037\n" + + "\027serializable_optimistic\030\003 \001(\010\022%\n" + + "\035snapshot_isolation_optimistic\030\004 \001(\010\022&\n" + + "\036snapshot_isolation_pessimistic\030\005 \001(\010\022\'\n" + + "\037exclude_txn_from_change_streams\030\006 \001(\010\"\230\001\n" + "\027FinishTransactionAction\022F\n" - + "\004mode\030\001 \001(\01628.go" - + "ogle.spanner.executor.v1.FinishTransactionAction.Mode\"5\n" + + "\004mode\030\001 \001(\01628." + + "google.spanner.executor.v1.FinishTransactionAction.Mode\"5\n" + "\004Mode\022\024\n" + "\020MODE_UNSPECIFIED\020\000\022\n\n" + "\006COMMIT\020\001\022\013\n" - + "\007ABANDON\020\002\"\310\023\n" + + "\007ABANDON\020\002\"\226\024\n" + "\013AdminAction\022a\n" - + "\033create_user_instance_config\030\001 \001(" - + "\0132:.google.spanner.executor.v1.CreateUserInstanceConfigActionH\000\022a\n" - + "\033update_user_instance_config\030\002 \001(\0132:.google.spanner.ex" - + "ecutor.v1.UpdateUserInstanceConfigActionH\000\022a\n" - + "\033delete_user_instance_config\030\003 \001(\0132" - + ":.google.spanner.executor.v1.DeleteUserInstanceConfigActionH\000\022]\n" - + "\031get_cloud_instance_config\030\004" - + " \001(\01328.google.spanner.executor.v1.GetCloudInstanceConfigActionH\000\022[\n" - + "\025list_instance_configs\030\005 \001(\0132:.google.spa" - + "nner.executor.v1.ListCloudInstanceConfigsActionH\000\022V\n" - + "\025create_cloud_instance\030\006 \001(\013" - + "25.google.spanner.executor.v1.CreateCloudInstanceActionH\000\022V\n" + + "\033create_user_instance_config\030\001 " + + "\001(\0132:.google.spanner.executor.v1.CreateUserInstanceConfigActionH\000\022a\n" + + "\033update_user_instance_config\030\002 \001(\0132:.google.spanner." + + "executor.v1.UpdateUserInstanceConfigActionH\000\022a\n" + + "\033delete_user_instance_config\030\003 \001(" + + "\0132:.google.spanner.executor.v1.DeleteUserInstanceConfigActionH\000\022]\n" + + "\031get_cloud_instance_config\030\004 \001(\01328.google.spanner.exec" + + "utor.v1.GetCloudInstanceConfigActionH\000\022[\n" + + "\025list_instance_configs\030\005 \001(\0132:.google.s" + + "panner.executor.v1.ListCloudInstanceConfigsActionH\000\022V\n" + + "\025create_cloud_instance\030\006 \001" + + "(\01325.google.spanner.executor.v1.CreateCloudInstanceActionH\000\022V\n" + "\025update_cloud_instance\030\007" + " \001(\01325.google.spanner.executor.v1.UpdateCloudInstanceActionH\000\022V\n" + "\025delete_cloud_instance\030\010" + " \001(\01325.google.spanner.executor.v1.DeleteCloudInstanceActionH\000\022T\n" - + "\024list_cloud_instances\030\t \001(\01324.google.spanner" - + ".executor.v1.ListCloudInstancesActionH\000\022P\n" + + "\024list_cloud_instances\030\t \001(\01324.google.spann" + + "er.executor.v1.ListCloudInstancesActionH\000\022P\n" + "\022get_cloud_instance\030\n" + " \001(\01322.google.spanner.executor.v1.GetCloudInstanceActionH\000\022V\n" - + "\025create_cloud_database\030\013 \001(\01325.googl" - + "e.spanner.executor.v1.CreateCloudDatabaseActionH\000\022]\n" + + "\025create_cloud_database\030\013 \001(\01325.goo" + + "gle.spanner.executor.v1.CreateCloudDatabaseActionH\000\022]\n" + "\031update_cloud_database_ddl\030\014" + " \001(\01328.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionH\000\022V\n" + "\025update_cloud_database\030\033" + " \001(\01325.google.spanner.executor.v1.UpdateCloudDatabaseActionH\000\022R\n" + "\023drop_cloud_database\030\r" + " \001(\01323.google.spanner.executor.v1.DropCloudDatabaseActionH\000\022T\n" - + "\024list_cloud_databases\030\016 \001(\01324.google.span" - + "ner.executor.v1.ListCloudDatabasesActionH\000\022g\n" - + "\036list_cloud_database_operations\030\017 \001" - + "(\0132=.google.spanner.executor.v1.ListCloudDatabaseOperationsActionH\000\022X\n" - + "\026restore_cloud_database\030\020" - + " \001(\01326.google.spanner.executor.v1.RestoreCloudDatabaseActionH\000\022P\n" - + "\022get_cloud_database\030\021 \001(\01322.google.spann" - + "er.executor.v1.GetCloudDatabaseActionH\000\022R\n" - + "\023create_cloud_backup\030\022 \001(\01323.google.sp" - + "anner.executor.v1.CreateCloudBackupActionH\000\022N\n" - + "\021copy_cloud_backup\030\023 \001(\01321.google." - + "spanner.executor.v1.CopyCloudBackupActionH\000\022L\n" - + "\020get_cloud_backup\030\024 \001(\01320.google.s" - + "panner.executor.v1.GetCloudBackupActionH\000\022R\n" - + "\023update_cloud_backup\030\025 \001(\01323.google." - + "spanner.executor.v1.UpdateCloudBackupActionH\000\022R\n" - + "\023delete_cloud_backup\030\026 \001(\01323.goo" - + "gle.spanner.executor.v1.DeleteCloudBackupActionH\000\022P\n" - + "\022list_cloud_backups\030\027 \001(\01322." - + "google.spanner.executor.v1.ListCloudBackupsActionH\000\022c\n" + + "\024list_cloud_databases\030\016 \001(\01324.google.sp" + + "anner.executor.v1.ListCloudDatabasesActionH\000\022g\n" + + "\036list_cloud_database_operations\030\017" + + " \001(\0132=.google.spanner.executor.v1.ListCloudDatabaseOperationsActionH\000\022X\n" + + "\026restore_cloud_database\030\020 \001(\01326.google.spanner.e" + + "xecutor.v1.RestoreCloudDatabaseActionH\000\022P\n" + + "\022get_cloud_database\030\021 \001(\01322.google.spa" + + "nner.executor.v1.GetCloudDatabaseActionH\000\022R\n" + + "\023create_cloud_backup\030\022 \001(\01323.google." + + "spanner.executor.v1.CreateCloudBackupActionH\000\022N\n" + + "\021copy_cloud_backup\030\023 \001(\01321.googl" + + "e.spanner.executor.v1.CopyCloudBackupActionH\000\022L\n" + + "\020get_cloud_backup\030\024 \001(\01320.google" + + ".spanner.executor.v1.GetCloudBackupActionH\000\022R\n" + + "\023update_cloud_backup\030\025 \001(\01323.googl" + + "e.spanner.executor.v1.UpdateCloudBackupActionH\000\022R\n" + + "\023delete_cloud_backup\030\026 \001(\01323.g" + + "oogle.spanner.executor.v1.DeleteCloudBackupActionH\000\022P\n" + + "\022list_cloud_backups\030\027 \001(\0132" + + "2.google.spanner.executor.v1.ListCloudBackupsActionH\000\022c\n" + "\034list_cloud_backup_operations\030\030" + " \001(\0132;.google.spanner.executor.v1.ListCloudBackupOperationsActionH\000\022G\n\r" + "get_operation\030\031" + " \001(\0132..google.spanner.executor.v1.GetOperationActionH\000\022M\n" + "\020cancel_operation\030\032" + " \001(\01321.google.spanner.executor.v1.CancelOperationActionH\000\022c\n" - + "\034change_quorum_cloud_database\030\034 \001(\0132;.google.spanner." - + "executor.v1.ChangeQuorumCloudDatabaseActionH\000B\010\n" + + "\034change_quorum_cloud_database\030\034 \001(\0132;.google.spanne" + + "r.executor.v1.ChangeQuorumCloudDatabaseActionH\000\022L\n" + + "\020add_split_points\030\035 \001(\01320.goog" + + "le.spanner.executor.v1.AddSplitPointsActionH\000B\010\n" + "\006action\"\245\001\n" + "\036CreateUserInstanceConfigAction\022\026\n" + "\016user_config_id\030\001 \001(\t\022\022\n\n" @@ -629,7 +666,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tpage_size\030\002 \001(\005H\000\210\001\001\022\027\n\n" + "page_token\030\003 \001(\tH\001\210\001\001B\014\n\n" + "_page_sizeB\r\n" - + "\013_page_token\"\253\003\n" + + "\013_page_token\"\360\003\n" + "\031CreateCloudInstanceAction\022\023\n" + "\013instance_id\030\001 \001(\t\022\022\n\n" + "project_id\030\002 \001(\t\022\032\n" @@ -639,23 +676,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022autoscaling_config\030\007 \001(\01323.go" + "ogle.spanner.admin.instance.v1.AutoscalingConfigH\002\210\001\001\022Q\n" + "\006labels\030\005 \003(\0132A.google.s" - + "panner.executor.v1.CreateCloudInstanceAction.LabelsEntry\032-\n" + + "panner.executor.v1.CreateCloudInstanceAction.LabelsEntry\022C\n" + + "\007edition\030\010 \001(\01622.goog" + + "le.spanner.admin.instance.v1.Instance.Edition\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001B\r\n" + "\013_node_countB\023\n" + "\021_processing_unitsB\025\n" - + "\023_autoscaling_config\"\273\003\n" + + "\023_autoscaling_config\"\200\004\n" + "\031UpdateCloudInstanceAction\022\023\n" + "\013instance_id\030\001 \001(\t\022\022\n\n" + "project_id\030\002 \001(\t\022\031\n" + "\014display_name\030\003 \001(\tH\000\210\001\001\022\027\n\n" + "node_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.spanne" - + "r.admin.instance.v1.AutoscalingConfigH\003\210\001\001\022Q\n" - + "\006labels\030\006 \003(\0132A.google.spanner.exec" - + "utor.v1.UpdateCloudInstanceAction.LabelsEntry\032-\n" + + "\022autoscaling_config\030\007" + + " \001(\01323.google.spanner.admin.instance.v1.AutoscalingConfigH\003\210\001\001\022Q\n" + + "\006labels\030\006" + + " \003(\0132A.google.spanner.executor.v1.UpdateCloudInstanceAction.LabelsEntry\022C\n" + + "\007edition\030\010" + + " \001(\01622.google.spanner.admin.instance.v1.Instance.Edition\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001B\017\n\r" @@ -671,8 +712,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "project_id\030\002 \001(\t\022\023\n" + "\013database_id\030\003 \001(\t\022\025\n\r" + "sdl_statement\030\004 \003(\t\022M\n" - + "\021encryption_config\030\005" - + " \001(\01322.google.spanner.admin.database.v1.EncryptionConfig\022\024\n" + + "\021encryption_config\030\005 \001(\01322" + + ".google.spanner.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" @@ -697,7 +738,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\037ChangeQuorumCloudDatabaseAction\022\031\n" + "\014database_uri\030\001 \001(\tH\000\210\001\001\022\031\n" + "\021serving_locations\030\002 \003(\tB\017\n\r" - + "_database_uri\"j\n" + + "_database_uri\"\204\002\n" + + "\022AdaptMessageAction\022\024\n" + + "\014database_uri\030\001 \001(\t\022\020\n" + + "\010protocol\030\002 \001(\t\022\017\n" + + "\007payload\030\003 \001(\014\022T\n" + + "\013attachments\030\004 \003(\0132?.goog" + + "le.spanner.executor.v1.AdaptMessageAction.AttachmentsEntry\022\r\n" + + "\005query\030\005 \001(\t\022\034\n" + + "\024prepare_then_execute\030\006 \001(\010\0322\n" + + "\020AttachmentsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"j\n" + "\030ListCloudDatabasesAction\022\022\n\n" + "project_id\030\001 \001(\t\022\023\n" + "\013instance_id\030\002 \001(\t\022\021\n" @@ -706,7 +758,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030ListCloudInstancesAction\022\022\n\n" + "project_id\030\001 \001(\t\022\023\n" + "\006filter\030\002 \001(\tH\000\210\001\001\022\026\n" - + "\tpage_size\030\003 \001(\005H\001\210\001\001\022\027\n\n" + + "\tpage_size\030\003 \001(\005H\001\210\001\001\022\027\n" + + "\n" + "page_token\030\004 \001(\tH\002\210\001\001B\t\n" + "\007_filterB\014\n\n" + "_page_sizeB\r\n" @@ -726,9 +779,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tbackup_id\030\003 \001(\t\022\034\n" + "\024database_instance_id\030\004 \001(\t\022\023\n" + "\013database_id\030\005 \001(\t\022M\n" - + "\021encryption_config\030\007 \001(\01322" - + ".google.spanner.admin.database.v1.EncryptionConfig\"V\n" - + "\026GetCloudDatabaseAction\022\022\n\n" + + "\021encryption_config\030\007 \001(\0132" + + "2.google.spanner.admin.database.v1.EncryptionConfig\"V\n" + + "\026GetCloudDatabaseAction\022\022\n" + + "\n" + "project_id\030\001 \001(\t\022\023\n" + "\013instance_id\030\002 \001(\t\022\023\n" + "\013database_id\030\003 \001(\t\"\267\002\n" @@ -780,7 +834,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020long_running_sql\030\001 \001(\t\022\024\n" + "\014cancel_query\030\002 \001(\t\"*\n" + "\025CancelOperationAction\022\021\n" - + "\toperation\030\001 \001(\t\"\210\001\n" + + "\toperation\030\001 \001(\t\"\231\001\n" + + "\024AddSplitPointsAction\022\022\n\n" + + "project_id\030\001 \001(\t\022\023\n" + + "\013instance_id\030\002 \001(\t\022\023\n" + + "\013database_id\030\003 \001(\t\022C\n" + + "\014split_points\030\004" + + " \003(\0132-.google.spanner.admin.database.v1.SplitPoints\"\210\001\n" + "\033StartBatchTransactionAction\0224\n" + "\016batch_txn_time\030\001 \001(\0132\032.google.protobuf.TimestampH\000\022\r\n" + "\003tid\030\002 \001(\014H\000\022\033\n" @@ -822,41 +882,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020_partition_tokenB\031\n" + "\027_heartbeat_millisecondsB\023\n" + "\021_deadline_secondsB\026\n" - + "\024_cloud_database_role\"\242\005\n" + + "\024_cloud_database_role\"\200\006\n" + "\024SpannerActionOutcome\022\'\n" + "\006status\030\001 \001(\0132\022.google.rpc.StatusH\000\210\001\001\0224\n" + "\013commit_time\030\002" + " \001(\0132\032.google.protobuf.TimestampH\001\210\001\001\022@\n" + "\013read_result\030\003" + " \001(\0132&.google.spanner.executor.v1.ReadResultH\002\210\001\001\022B\n" - + "\014query_result\030\004 \001(\013" - + "2\'.google.spanner.executor.v1.QueryResultH\003\210\001\001\022\"\n" + + "\014query_result\030\004 \001(\0132\'." + + "google.spanner.executor.v1.QueryResultH\003\210\001\001\022\"\n" + "\025transaction_restarted\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.spanner.executor.v1.BatchPartition\022B\n" - + "\014admin_result\030\010 \001(\0132\'." - + "google.spanner.executor.v1.AdminResultH\006\210\001\001\022\031\n" + + "\014admin_result\030\010 \001(\0132\'.goo" + + "gle.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..google.spanner.executor.v1.ChangeStreamRecordB\t\n" + + " \003(\0132..google.spanner.executor.v1.ChangeStreamRecord\0222\n" + + "%snapshot_isolation_txn_read_timestamp\030\013 \001(\003H\007\210\001\001B\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_result\"\231\003\n" + + "_admin_resultB(\n" + + "&_snapshot_isolation_txn_read_timestamp\"\231\003\n" + "\013AdminResult\022H\n" - + "\017backup_response\030\001 \001(\0132/.google." - + "spanner.executor.v1.CloudBackupResponse\022I\n" - + "\022operation_response\030\002" - + " \001(\0132-.google.spanner.executor.v1.OperationResponse\022L\n" - + "\021database_response\030\003" - + " \001(\01321.google.spanner.executor.v1.CloudDatabaseResponse\022L\n" - + "\021instance_response\030\004" - + " \001(\01321.google.spanner.executor.v1.CloudInstanceResponse\022Y\n" - + "\030instance_config_response\030\005 \001(\01327.google.spanne" - + "r.executor.v1.CloudInstanceConfigResponse\"\353\001\n" + + "\017backup_response\030\001 \001(" + + "\0132/.google.spanner.executor.v1.CloudBackupResponse\022I\n" + + "\022operation_response\030\002 \001(\0132-" + + ".google.spanner.executor.v1.OperationResponse\022L\n" + + "\021database_response\030\003 \001(\01321.googl", + "e.spanner.executor.v1.CloudDatabaseResponse\022L\n" + + "\021instance_response\030\004 \001(\01321.google." + + "spanner.executor.v1.CloudInstanceResponse\022Y\n" + + "\030instance_config_response\030\005 \001(\01327.go" + + "ogle.spanner.executor.v1.CloudInstanceConfigResponse\"\353\001\n" + "\023CloudBackupResponse\022@\n" + "\016listed_backups\030\001 \003(\0132(.google.spanner.admin.database.v1.Backup\022?\n" + "\030listed_backup_operations\030\002" @@ -873,19 +935,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017next_page_token\030\002 \001(\t\022<\n" + "\010instance\030\003 \001(\0132*.google.spanner.admin.instance.v1.Instance\"\324\001\n" + "\033CloudInstanceConfigResponse\022Q\n" - + "\027listed_instance_configs\030\001 \003" - + "(\01320.google.spanner.admin.instance.v1.InstanceConfig\022\027\n" + + "\027listed_instance_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.google.spanner.admin.instance.v1.InstanceConfig\"\367\001\n" + + "\017instance_config\030\003 \001(\01320.goog" + + "le.spanner.admin.instance.v1.InstanceConfig\"\367\001\n" + "\025CloudDatabaseResponse\022D\n" - + "\020listed_databases\030\001 \003(\0132*.google.spanner.admin.database.v1.", - "Database\022A\n" + + "\020listed_databases\030\001" + + " \003(\0132*.google.spanner.admin.database.v1.Database\022A\n" + "\032listed_database_operations\030\002" + " \003(\0132\035.google.longrunning.Operation\022\027\n" + "\017next_page_token\030\003 \001(\t\022<\n" - + "\010database\030\004 \001(\0132*" - + ".google.spanner.admin.database.v1.Database\"\336\001\n\n" + + "\010database\030\004" + + " \001(\0132*.google.spanner.admin.database.v1.Database\"\336\001\n\n" + "ReadResult\022\r\n" + "\005table\030\001 \001(\t\022\022\n" + "\005index\030\002 \001(\tH\000\210\001\001\022\032\n\r" @@ -904,8 +966,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022ChangeStreamRecord\022C\n" + "\013data_change\030\001" + " \001(\0132,.google.spanner.executor.v1.DataChangeRecordH\000\022L\n" - + "\017child_partition\030\002 \001(\0132" - + "1.google.spanner.executor.v1.ChildPartitionsRecordH\000\022@\n" + + "\017child_partition\030\002" + + " \001(\01321.google.spanner.executor.v1.ChildPartitionsRecordH\000\022@\n" + "\theartbeat\030\003 \001(\0132+.google.spanner.executor.v1.HeartbeatRecordH\000B\010\n" + "\006record\"\330\004\n" + "\020DataChangeRecord\022/\n" @@ -914,8 +976,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\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.sp" - + "anner.executor.v1.DataChangeRecord.ColumnType\022>\n" + + "\014column_types\030\006 \003(\0132" + + "7.google.spanner.executor.v1.DataChangeRecord.ColumnType\022>\n" + "\004mods\030\007 \003(\01320.google.spanner.executor.v1.DataChangeRecord.Mod\022\020\n" + "\010mod_type\030\010 \001(\t\022\032\n" + "\022value_capture_type\030\t \001(\t\022\024\n" @@ -934,28 +996,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004keys\030\001 \001(\t\022\022\n\n" + "new_values\030\002 \001(\t\022\022\n\n" + "old_values\030\003 \001(\t\"\376\001\n" - + "\025ChildPartitionsRecord\022.\n" - + "\n" + + "\025ChildPartitionsRecord\022.\n\n" + "start_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.execut" - + "or.v1.ChildPartitionsRecord.ChildPartition\032@\n" + + "\020child_partitions\030\003 \003(\0132@.google.spa" + + "nner.executor.v1.ChildPartitionsRecord.ChildPartition\032@\n" + "\016ChildPartition\022\r\n" + "\005token\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.Timestamp\"^\n" + "\016SpannerOptions\022L\n" - + "\024session_pool_options\030\001" - + " \001(\0132..google.spanner.executor.v1.SessionPoolOptions\"-\n" + + "\024session_pool_options\030\001 \001(\0132." + + ".google.spanner.executor.v1.SessionPoolOptions\"-\n" + "\022SessionPoolOptions\022\027\n" + "\017use_multiplexed\030\001 \001(\0102\314\001\n" + "\024SpannerExecutorProxy\022\211\001\n" - + "\022ExecuteActionAsync\0225.google.spanner.executor.v1." - + "SpannerAsyncActionRequest\0326.google.spanner.executor.v1.SpannerAsyncActionRespons" - + "e\"\000(\0010\001\032(\312A%spanner-cloud-executor.googleapis.comBx\n" - + "\036com.google.spanner.executor.v1B\022CloudExecutorProtoP\001Z@cloud.google." - + "com/go/spanner/executor/apiv1/executorpb;executorpbb\006proto3" + + "\022ExecuteActionAsync\0225.google.spanner.e" + + "xecutor.v1.SpannerAsyncActionRequest\0326.google.spanner.executor.v1.SpannerAsyncAc" + + "tionResponse\"\000(\0010\001\032(\312A%spanner-cloud-executor.googleapis.comBx\n" + + "\036com.google.spanner.executor.v1B\022CloudExecutorProtoP\001Z@cl" + + "oud.google.com/go/spanner/executor/apiv1/executorpb;executorpbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -974,25 +1035,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.spanner.v1.TypeProto.getDescriptor(), }); internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(1); internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(2); internal_static_google_spanner_executor_v1_SpannerAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_SpannerAction_descriptor, new java.lang.String[] { "DatabasePath", @@ -1014,52 +1075,52 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExecutePartition", "ExecuteChangeStreamQuery", "QueryCancellation", + "AdaptMessage", "Action", }); internal_static_google_spanner_executor_v1_ReadAction_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_spanner_executor_v1_ReadAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_ReadAction_descriptor, new java.lang.String[] { "Table", "Index", "Column", "Keys", "Limit", }); internal_static_google_spanner_executor_v1_QueryAction_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_spanner_executor_v1_QueryAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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_descriptor.getNestedType(0); internal_static_google_spanner_executor_v1_QueryAction_Parameter_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(5); internal_static_google_spanner_executor_v1_DmlAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_DmlAction_descriptor, new java.lang.String[] { - "Update", "AutocommitIfSupported", + "Update", "AutocommitIfSupported", "LastStatement", }); internal_static_google_spanner_executor_v1_BatchDmlAction_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageType(6); internal_static_google_spanner_executor_v1_BatchDmlAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_BatchDmlAction_descriptor, new java.lang.String[] { - "Updates", + "Updates", "LastStatements", }); - internal_static_google_spanner_executor_v1_Value_descriptor = - getDescriptor().getMessageTypes().get(7); + internal_static_google_spanner_executor_v1_Value_descriptor = getDescriptor().getMessageType(7); internal_static_google_spanner_executor_v1_Value_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_Value_descriptor, new java.lang.String[] { "IsNull", @@ -1077,105 +1138,98 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ValueType", }); internal_static_google_spanner_executor_v1_KeyRange_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageType(8); internal_static_google_spanner_executor_v1_KeyRange_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_KeyRange_descriptor, new java.lang.String[] { "Start", "Limit", "Type", }); internal_static_google_spanner_executor_v1_KeySet_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageType(9); internal_static_google_spanner_executor_v1_KeySet_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(10); internal_static_google_spanner_executor_v1_ValueList_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(11); internal_static_google_spanner_executor_v1_MutationAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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_descriptor.getNestedType(0); internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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_descriptor.getNestedType(1); internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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_descriptor.getNestedType(2); internal_static_google_spanner_executor_v1_MutationAction_Mod_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(12); internal_static_google_spanner_executor_v1_WriteMutationsAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(13); internal_static_google_spanner_executor_v1_PartitionedUpdateAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_PartitionedUpdateAction_descriptor, new java.lang.String[] { "Options", "Update", }); 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_descriptor.getNestedType( + 0); internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_descriptor, new java.lang.String[] { "RpcPriority", "Tag", }); internal_static_google_spanner_executor_v1_StartTransactionAction_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageType(14); internal_static_google_spanner_executor_v1_StartTransactionAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_StartTransactionAction_descriptor, new java.lang.String[] { "Concurrency", "Table", "TransactionSeed", "ExecutionOptions", }); internal_static_google_spanner_executor_v1_Concurrency_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageType(15); internal_static_google_spanner_executor_v1_Concurrency_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_Concurrency_descriptor, new java.lang.String[] { "StalenessSeconds", @@ -1190,41 +1244,46 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConcurrencyMode", }); internal_static_google_spanner_executor_v1_TableMetadata_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageType(16); internal_static_google_spanner_executor_v1_TableMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(17); internal_static_google_spanner_executor_v1_ColumnMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(18); internal_static_google_spanner_executor_v1_TransactionExecutionOptions_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_TransactionExecutionOptions_descriptor, new java.lang.String[] { "Optimistic", + "ExcludeFromChangeStreams", + "SerializableOptimistic", + "SnapshotIsolationOptimistic", + "SnapshotIsolationPessimistic", + "ExcludeTxnFromChangeStreams", }); internal_static_google_spanner_executor_v1_FinishTransactionAction_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageType(19); internal_static_google_spanner_executor_v1_FinishTransactionAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(20); internal_static_google_spanner_executor_v1_AdminAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_AdminAction_descriptor, new java.lang.String[] { "CreateUserInstanceConfig", @@ -1255,62 +1314,62 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GetOperation", "CancelOperation", "ChangeQuorumCloudDatabase", + "AddSplitPoints", "Action", }); internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageType(21); internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(22); internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_descriptor, new java.lang.String[] { "UserConfigId", "ProjectId", "DisplayName", "Labels", }); internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_LabelsEntry_descriptor = internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_descriptor - .getNestedTypes() - .get(0); + .getNestedType(0); internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(23); internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(24); internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(25); internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_descriptor, new java.lang.String[] { "ProjectId", "PageSize", "PageToken", }); internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageType(26); internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor, new java.lang.String[] { "InstanceId", @@ -1320,21 +1379,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProcessingUnits", "AutoscalingConfig", "Labels", + "Edition", }); internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_LabelsEntry_descriptor = internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor - .getNestedTypes() - .get(0); + .getNestedType(0); internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(27); internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_descriptor, new java.lang.String[] { "InstanceId", @@ -1344,29 +1403,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProcessingUnits", "AutoscalingConfig", "Labels", + "Edition", }); internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_LabelsEntry_descriptor = internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_descriptor - .getNestedTypes() - .get(0); + .getNestedType(0); internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(28); internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(29); internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_descriptor, new java.lang.String[] { "InstanceId", @@ -1378,9 +1437,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProtoDescriptors", }); internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageType(30); internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_descriptor, new java.lang.String[] { "InstanceId", @@ -1391,65 +1450,81 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProtoDescriptors", }); internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageType(31); internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(32); internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_descriptor, new java.lang.String[] { "InstanceId", "ProjectId", "DatabaseId", }); internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageType(33); internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_ChangeQuorumCloudDatabaseAction_descriptor, new java.lang.String[] { "DatabaseUri", "ServingLocations", }); + internal_static_google_spanner_executor_v1_AdaptMessageAction_descriptor = + getDescriptor().getMessageType(34); + internal_static_google_spanner_executor_v1_AdaptMessageAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_executor_v1_AdaptMessageAction_descriptor, + new java.lang.String[] { + "DatabaseUri", "Protocol", "Payload", "Attachments", "Query", "PrepareThenExecute", + }); + internal_static_google_spanner_executor_v1_AdaptMessageAction_AttachmentsEntry_descriptor = + internal_static_google_spanner_executor_v1_AdaptMessageAction_descriptor.getNestedType(0); + internal_static_google_spanner_executor_v1_AdaptMessageAction_AttachmentsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_executor_v1_AdaptMessageAction_AttachmentsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageType(35); internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(36); internal_static_google_spanner_executor_v1_ListCloudInstancesAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_ListCloudInstancesAction_descriptor, new java.lang.String[] { "ProjectId", "Filter", "PageSize", "PageToken", }); internal_static_google_spanner_executor_v1_GetCloudInstanceAction_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageType(37); internal_static_google_spanner_executor_v1_GetCloudInstanceAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(38); internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(39); internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_descriptor, new java.lang.String[] { "ProjectId", @@ -1460,17 +1535,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EncryptionConfig", }); internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageType(40); internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(41); internal_static_google_spanner_executor_v1_CreateCloudBackupAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_CreateCloudBackupAction_descriptor, new java.lang.String[] { "ProjectId", @@ -1482,129 +1557,137 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EncryptionConfig", }); internal_static_google_spanner_executor_v1_CopyCloudBackupAction_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageType(42); internal_static_google_spanner_executor_v1_CopyCloudBackupAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(43); internal_static_google_spanner_executor_v1_GetCloudBackupAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(44); internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(45); internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(46); internal_static_google_spanner_executor_v1_ListCloudBackupsAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(47); internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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); + getDescriptor().getMessageType(48); internal_static_google_spanner_executor_v1_GetOperationAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_GetOperationAction_descriptor, new java.lang.String[] { "Operation", }); internal_static_google_spanner_executor_v1_QueryCancellationAction_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageType(49); internal_static_google_spanner_executor_v1_QueryCancellationAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_QueryCancellationAction_descriptor, new java.lang.String[] { "LongRunningSql", "CancelQuery", }); internal_static_google_spanner_executor_v1_CancelOperationAction_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageType(50); internal_static_google_spanner_executor_v1_CancelOperationAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_CancelOperationAction_descriptor, new java.lang.String[] { "Operation", }); + internal_static_google_spanner_executor_v1_AddSplitPointsAction_descriptor = + getDescriptor().getMessageType(51); + internal_static_google_spanner_executor_v1_AddSplitPointsAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_executor_v1_AddSplitPointsAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "DatabaseId", "SplitPoints", + }); internal_static_google_spanner_executor_v1_StartBatchTransactionAction_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageType(52); internal_static_google_spanner_executor_v1_StartBatchTransactionAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(51); + getDescriptor().getMessageType(53); internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(52); + getDescriptor().getMessageType(54); internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_descriptor, new java.lang.String[] { "Read", "Table", "DesiredBytesPerPartition", "MaxPartitionCount", }); internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_descriptor = - getDescriptor().getMessageTypes().get(53); + getDescriptor().getMessageType(55); internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_descriptor, new java.lang.String[] { "Query", "DesiredBytesPerPartition", }); internal_static_google_spanner_executor_v1_BatchPartition_descriptor = - getDescriptor().getMessageTypes().get(54); + getDescriptor().getMessageType(56); internal_static_google_spanner_executor_v1_BatchPartition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_BatchPartition_descriptor, new java.lang.String[] { "Partition", "PartitionToken", "Table", "Index", }); internal_static_google_spanner_executor_v1_ExecutePartitionAction_descriptor = - getDescriptor().getMessageTypes().get(55); + getDescriptor().getMessageType(57); internal_static_google_spanner_executor_v1_ExecutePartitionAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(56); + getDescriptor().getMessageType(58); internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_descriptor, new java.lang.String[] { "Name", @@ -1617,9 +1700,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CloudDatabaseRole", }); internal_static_google_spanner_executor_v1_SpannerActionOutcome_descriptor = - getDescriptor().getMessageTypes().get(57); + getDescriptor().getMessageType(59); internal_static_google_spanner_executor_v1_SpannerActionOutcome_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_SpannerActionOutcome_descriptor, new java.lang.String[] { "Status", @@ -1632,11 +1715,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AdminResult", "DmlRowsModified", "ChangeStreamRecords", + "SnapshotIsolationTxnReadTimestamp", }); internal_static_google_spanner_executor_v1_AdminResult_descriptor = - getDescriptor().getMessageTypes().get(58); + getDescriptor().getMessageType(60); internal_static_google_spanner_executor_v1_AdminResult_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_AdminResult_descriptor, new java.lang.String[] { "BackupResponse", @@ -1646,73 +1730,73 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstanceConfigResponse", }); internal_static_google_spanner_executor_v1_CloudBackupResponse_descriptor = - getDescriptor().getMessageTypes().get(59); + getDescriptor().getMessageType(61); internal_static_google_spanner_executor_v1_CloudBackupResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(60); + getDescriptor().getMessageType(62); internal_static_google_spanner_executor_v1_OperationResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(61); + getDescriptor().getMessageType(63); internal_static_google_spanner_executor_v1_CloudInstanceResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(62); + getDescriptor().getMessageType(64); internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(63); + getDescriptor().getMessageType(65); internal_static_google_spanner_executor_v1_CloudDatabaseResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(64); + getDescriptor().getMessageType(66); internal_static_google_spanner_executor_v1_ReadResult_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_ReadResult_descriptor, new java.lang.String[] { "Table", "Index", "RequestIndex", "Row", "RowType", }); internal_static_google_spanner_executor_v1_QueryResult_descriptor = - getDescriptor().getMessageTypes().get(65); + getDescriptor().getMessageType(67); internal_static_google_spanner_executor_v1_QueryResult_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_QueryResult_descriptor, new java.lang.String[] { "Row", "RowType", }); internal_static_google_spanner_executor_v1_ChangeStreamRecord_descriptor = - getDescriptor().getMessageTypes().get(66); + getDescriptor().getMessageType(68); internal_static_google_spanner_executor_v1_ChangeStreamRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(67); + getDescriptor().getMessageType(69); internal_static_google_spanner_executor_v1_DataChangeRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_DataChangeRecord_descriptor, new java.lang.String[] { "CommitTime", @@ -1730,73 +1814,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "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_descriptor.getNestedType(0); internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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_descriptor.getNestedType(1); internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(68); + getDescriptor().getMessageType(70); internal_static_google_spanner_executor_v1_ChildPartitionsRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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_descriptor.getNestedType( + 0); internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.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(69); + getDescriptor().getMessageType(71); internal_static_google_spanner_executor_v1_HeartbeatRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_HeartbeatRecord_descriptor, new java.lang.String[] { "HeartbeatTime", }); internal_static_google_spanner_executor_v1_SpannerOptions_descriptor = - getDescriptor().getMessageTypes().get(70); + getDescriptor().getMessageType(72); internal_static_google_spanner_executor_v1_SpannerOptions_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_SpannerOptions_descriptor, new java.lang.String[] { "SessionPoolOptions", }); internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor = - getDescriptor().getMessageTypes().get(71); + getDescriptor().getMessageType(73); internal_static_google_spanner_executor_v1_SessionPoolOptions_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor, new java.lang.String[] { "UseMultiplexed", }); - 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); + descriptor.resolveAllFeaturesImmutable(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); @@ -1808,6 +1882,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto.getDescriptor(); com.google.spanner.v1.SpannerProto.getDescriptor(); com.google.spanner.v1.TypeProto.getDescriptor(); + 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); } // @@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 index abb273adcab..9773de30729 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CloudInstanceConfigResponse} */ -public final class CloudInstanceConfigResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CloudInstanceConfigResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloudInstanceConfigResponse) CloudInstanceConfigResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudInstanceConfigResponse"); + } + // Use CloudInstanceConfigResponse.newBuilder() to construct. - private CloudInstanceConfigResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CloudInstanceConfigResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CloudInstanceConfigResponse() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_fieldAccessorTable @@ -276,8 +282,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getInstanceConfig()); @@ -296,8 +302,8 @@ public int getSerializedSize() { 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstanceConfig()); @@ -387,38 +393,38 @@ public static com.google.spanner.executor.v1.CloudInstanceConfigResponse parseFr 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -442,7 +448,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -457,7 +463,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CloudInstanceConfigResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloudInstanceConfigResponse) com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder { @@ -467,7 +473,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_fieldAccessorTable @@ -481,15 +487,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getListedInstanceConfigsFieldBuilder(); - getInstanceConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetListedInstanceConfigsFieldBuilder(); + internalGetInstanceConfigFieldBuilder(); } } @@ -572,39 +578,6 @@ private void buildPartial0(com.google.spanner.executor.v1.CloudInstanceConfigRes 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.CloudInstanceConfigResponse) { @@ -637,8 +610,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.CloudInstanceConfigRespo listedInstanceConfigs_ = other.listedInstanceConfigs_; bitField0_ = (bitField0_ & ~0x00000001); listedInstanceConfigsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getListedInstanceConfigsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetListedInstanceConfigsFieldBuilder() : null; } else { listedInstanceConfigsBuilder_.addAllMessages(other.listedInstanceConfigs_); @@ -701,7 +674,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -736,7 +710,7 @@ private void ensureListedInstanceConfigsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> @@ -1014,7 +988,7 @@ public Builder removeListedInstanceConfigs(int index) { */ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getListedInstanceConfigsBuilder(int index) { - return getListedInstanceConfigsFieldBuilder().getBuilder(index); + return internalGetListedInstanceConfigsFieldBuilder().getBuilder(index); } /** @@ -1067,7 +1041,7 @@ public Builder removeListedInstanceConfigs(int index) { */ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder addListedInstanceConfigsBuilder() { - return getListedInstanceConfigsFieldBuilder() + return internalGetListedInstanceConfigsFieldBuilder() .addBuilder(com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance()); } @@ -1083,7 +1057,7 @@ public Builder removeListedInstanceConfigs(int index) { */ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder addListedInstanceConfigsBuilder(int index) { - return getListedInstanceConfigsFieldBuilder() + return internalGetListedInstanceConfigsFieldBuilder() .addBuilder( index, com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance()); } @@ -1100,17 +1074,17 @@ public Builder removeListedInstanceConfigs(int index) { */ public java.util.List getListedInstanceConfigsBuilderList() { - return getListedInstanceConfigsFieldBuilder().getBuilderList(); + return internalGetListedInstanceConfigsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> - getListedInstanceConfigsFieldBuilder() { + internalGetListedInstanceConfigsFieldBuilder() { if (listedInstanceConfigsBuilder_ == null) { listedInstanceConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder>( @@ -1240,7 +1214,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.instance.v1.InstanceConfig instanceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> @@ -1387,7 +1361,7 @@ public Builder clearInstanceConfig() { public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceConfigBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getInstanceConfigFieldBuilder().getBuilder(); + return internalGetInstanceConfigFieldBuilder().getBuilder(); } /** @@ -1419,14 +1393,14 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceCo * * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> - getInstanceConfigFieldBuilder() { + internalGetInstanceConfigFieldBuilder() { if (instanceConfigBuilder_ == null) { instanceConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.InstanceConfig, com.google.spanner.admin.instance.v1.InstanceConfig.Builder, com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder>( @@ -1436,17 +1410,6 @@ public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceCo 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) } 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 index 480225e8156..83486d1db43 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CloudInstanceConfigResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloudInstanceConfigResponse) 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 index 68913513ab1..cb6e538edd9 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CloudInstanceResponse} */ -public final class CloudInstanceResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CloudInstanceResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloudInstanceResponse) CloudInstanceResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudInstanceResponse"); + } + // Use CloudInstanceResponse.newBuilder() to construct. - private CloudInstanceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CloudInstanceResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private CloudInstanceResponse() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloudInstanceResponse_fieldAccessorTable @@ -269,8 +275,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getInstance()); @@ -287,8 +293,8 @@ public int getSerializedSize() { 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstance()); @@ -378,38 +384,38 @@ public static com.google.spanner.executor.v1.CloudInstanceResponse parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -432,7 +438,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -447,7 +453,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CloudInstanceResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloudInstanceResponse) com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder { @@ -457,7 +463,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CloudInstanceResponse_fieldAccessorTable @@ -471,15 +477,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getListedInstancesFieldBuilder(); - getInstanceFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetListedInstancesFieldBuilder(); + internalGetInstanceFieldBuilder(); } } @@ -561,39 +567,6 @@ private void buildPartial0(com.google.spanner.executor.v1.CloudInstanceResponse 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.CloudInstanceResponse) { @@ -626,8 +599,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.CloudInstanceResponse ot listedInstances_ = other.listedInstances_; bitField0_ = (bitField0_ & ~0x00000001); listedInstancesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getListedInstancesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetListedInstancesFieldBuilder() : null; } else { listedInstancesBuilder_.addAllMessages(other.listedInstances_); @@ -689,7 +662,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -724,7 +698,7 @@ private void ensureListedInstancesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> @@ -987,7 +961,7 @@ public Builder removeListedInstances(int index) { */ public com.google.spanner.admin.instance.v1.Instance.Builder getListedInstancesBuilder( int index) { - return getListedInstancesFieldBuilder().getBuilder(index); + return internalGetListedInstancesFieldBuilder().getBuilder(index); } /** @@ -1036,7 +1010,7 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getListedInstances * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; */ public com.google.spanner.admin.instance.v1.Instance.Builder addListedInstancesBuilder() { - return getListedInstancesFieldBuilder() + return internalGetListedInstancesFieldBuilder() .addBuilder(com.google.spanner.admin.instance.v1.Instance.getDefaultInstance()); } @@ -1051,7 +1025,7 @@ public com.google.spanner.admin.instance.v1.Instance.Builder addListedInstancesB */ public com.google.spanner.admin.instance.v1.Instance.Builder addListedInstancesBuilder( int index) { - return getListedInstancesFieldBuilder() + return internalGetListedInstancesFieldBuilder() .addBuilder(index, com.google.spanner.admin.instance.v1.Instance.getDefaultInstance()); } @@ -1066,17 +1040,17 @@ public com.google.spanner.admin.instance.v1.Instance.Builder addListedInstancesB */ public java.util.List getListedInstancesBuilderList() { - return getListedInstancesFieldBuilder().getBuilderList(); + return internalGetListedInstancesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> - getListedInstancesFieldBuilder() { + internalGetListedInstancesFieldBuilder() { if (listedInstancesBuilder_ == null) { listedInstancesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder>( @@ -1206,7 +1180,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.instance.v1.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> @@ -1352,7 +1326,7 @@ public Builder clearInstance() { public com.google.spanner.admin.instance.v1.Instance.Builder getInstanceBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getInstanceFieldBuilder().getBuilder(); + return internalGetInstanceFieldBuilder().getBuilder(); } /** @@ -1383,14 +1357,14 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild * * .google.spanner.admin.instance.v1.Instance instance = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder> - getInstanceFieldBuilder() { + internalGetInstanceFieldBuilder() { if (instanceBuilder_ == null) { instanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.Instance, com.google.spanner.admin.instance.v1.Instance.Builder, com.google.spanner.admin.instance.v1.InstanceOrBuilder>( @@ -1400,17 +1374,6 @@ public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuild 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) } 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 index 5e9290f1b57..37efde132bb 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CloudInstanceResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloudInstanceResponse) 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 index 96035abfcf7..ba2787df35b 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ColumnMetadata} */ -public final class ColumnMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ColumnMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ColumnMetadata) ColumnMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ColumnMetadata"); + } + // Use ColumnMetadata.newBuilder() to construct. - private ColumnMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ColumnMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ColumnMetadata_fieldAccessorTable @@ -181,8 +187,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getType()); @@ -196,8 +202,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); @@ -282,38 +288,38 @@ public static com.google.spanner.executor.v1.ColumnMetadata parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -336,7 +342,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -350,7 +356,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ColumnMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ColumnMetadata) com.google.spanner.executor.v1.ColumnMetadataOrBuilder { @@ -360,7 +366,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ColumnMetadata_fieldAccessorTable @@ -374,14 +380,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTypeFieldBuilder(); } } @@ -442,39 +448,6 @@ private void buildPartial0(com.google.spanner.executor.v1.ColumnMetadata result) 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.ColumnMetadata) { @@ -529,7 +502,7 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -664,7 +637,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.Type type_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> @@ -807,7 +780,7 @@ public Builder clearType() { public com.google.spanner.v1.Type.Builder getTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTypeFieldBuilder().getBuilder(); + return internalGetTypeFieldBuilder().getBuilder(); } /** @@ -836,14 +809,14 @@ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { * * .google.spanner.v1.Type type = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> - getTypeFieldBuilder() { + internalGetTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder>(getType(), getParentForChildren(), isClean()); @@ -852,17 +825,6 @@ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { 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) } 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 index 671196dd4b4..979b87da083 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ColumnMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ColumnMetadata) 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 index 39baf4fdefb..d50f497cf33 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.Concurrency} */ -public final class Concurrency extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Concurrency extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.Concurrency) ConcurrencyOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Concurrency"); + } + // Use Concurrency.newBuilder() to construct. - private Concurrency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Concurrency(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_Concurrency_fieldAccessorTable @@ -483,8 +489,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (snapshotEpochRead_ != false) { output.writeBool(7, snapshotEpochRead_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotEpochRootTable_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, snapshotEpochRootTable_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshotEpochRootTable_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, snapshotEpochRootTable_); } if (batchReadTimestampMicros_ != 0L) { output.writeInt64(9, batchReadTimestampMicros_); @@ -531,8 +537,8 @@ public int getSerializedSize() { 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshotEpochRootTable_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, snapshotEpochRootTable_); } if (batchReadTimestampMicros_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, batchReadTimestampMicros_); @@ -674,38 +680,38 @@ public static com.google.spanner.executor.v1.Concurrency parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -728,7 +734,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -742,7 +748,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.Concurrency} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.Concurrency) com.google.spanner.executor.v1.ConcurrencyOrBuilder { @@ -752,7 +758,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_Concurrency_fieldAccessorTable @@ -764,7 +770,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.Concurrency.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -830,39 +836,6 @@ private void buildPartialOneofs(com.google.spanner.executor.v1.Concurrency resul 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) { @@ -1717,17 +1690,6 @@ public Builder clearBatchReadTimestampMicros() { 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) } 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 index c7cda46370a..4fed9fa7f70 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ConcurrencyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.Concurrency) 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 index 2af96fbda5e..0a1dea9e414 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CopyCloudBackupAction} */ -public final class CopyCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CopyCloudBackupAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CopyCloudBackupAction) CopyCloudBackupActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CopyCloudBackupAction"); + } + // Use CopyCloudBackupAction.newBuilder() to construct. - private CopyCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CopyCloudBackupAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private CopyCloudBackupAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CopyCloudBackupAction_fieldAccessorTable @@ -353,17 +359,17 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, backupId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, sourceBackup_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getExpireTime()); @@ -377,17 +383,17 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, backupId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, sourceBackup_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExpireTime()); @@ -481,38 +487,38 @@ public static com.google.spanner.executor.v1.CopyCloudBackupAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -535,7 +541,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -549,7 +555,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CopyCloudBackupAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CopyCloudBackupAction) com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder { @@ -559,7 +565,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CopyCloudBackupAction_fieldAccessorTable @@ -573,14 +579,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getExpireTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpireTimeFieldBuilder(); } } @@ -653,39 +659,6 @@ private void buildPartial0(com.google.spanner.executor.v1.CopyCloudBackupAction 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.CopyCloudBackupAction) { @@ -774,7 +747,8 @@ public Builder mergeFrom( } // case 34 case 42: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -1252,7 +1226,7 @@ public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp expireTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1418,7 +1392,7 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } /** @@ -1455,14 +1429,14 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpireTimeFieldBuilder() { + internalGetExpireTimeFieldBuilder() { if (expireTimeBuilder_ == null) { expireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1472,17 +1446,6 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { 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) } 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 index bc5edb17136..9c1acde0f99 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CopyCloudBackupActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CopyCloudBackupAction) 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 index e9e6c3ccad7..d1dc1060482 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CreateCloudBackupAction} */ -public final class CreateCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateCloudBackupAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CreateCloudBackupAction) CreateCloudBackupActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateCloudBackupAction"); + } + // Use CreateCloudBackupAction.newBuilder() to construct. - private CreateCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateCloudBackupAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private CreateCloudBackupAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CreateCloudBackupAction_fieldAccessorTable @@ -465,17 +471,17 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, backupId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, databaseId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getExpireTime()); @@ -495,17 +501,17 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, backupId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, databaseId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExpireTime()); @@ -621,38 +627,38 @@ public static com.google.spanner.executor.v1.CreateCloudBackupAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -676,7 +682,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -690,7 +696,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CreateCloudBackupAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CreateCloudBackupAction) com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder { @@ -700,7 +706,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CreateCloudBackupAction_fieldAccessorTable @@ -714,16 +720,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getExpireTimeFieldBuilder(); - getVersionTimeFieldBuilder(); - getEncryptionConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpireTimeFieldBuilder(); + internalGetVersionTimeFieldBuilder(); + internalGetEncryptionConfigFieldBuilder(); } } @@ -816,39 +822,6 @@ private void buildPartial0(com.google.spanner.executor.v1.CreateCloudBackupActio 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) { @@ -943,20 +916,22 @@ public Builder mergeFrom( } // case 34 case 42: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 case 50: { - input.readMessage(getVersionTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetVersionTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 case 58: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 @@ -1434,7 +1409,7 @@ public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp expireTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1600,7 +1575,7 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } /** @@ -1637,14 +1612,14 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpireTimeFieldBuilder() { + internalGetExpireTimeFieldBuilder() { if (expireTimeBuilder_ == null) { expireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1655,7 +1630,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { } private com.google.protobuf.Timestamp versionTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1814,7 +1789,7 @@ public Builder clearVersionTime() { public com.google.protobuf.Timestamp.Builder getVersionTimeBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getVersionTimeFieldBuilder().getBuilder(); + return internalGetVersionTimeFieldBuilder().getBuilder(); } /** @@ -1849,14 +1824,14 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { * * optional .google.protobuf.Timestamp version_time = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getVersionTimeFieldBuilder() { + internalGetVersionTimeFieldBuilder() { if (versionTimeBuilder_ == null) { versionTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1867,7 +1842,7 @@ public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { } private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> @@ -2024,7 +1999,7 @@ public Builder clearEncryptionConfig() { getEncryptionConfigBuilder() { bitField0_ |= 0x00000040; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } /** @@ -2058,14 +2033,14 @@ public Builder clearEncryptionConfig() { * * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>( @@ -2075,17 +2050,6 @@ public Builder clearEncryptionConfig() { return encryptionConfigBuilder_; } - @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) } 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 index 24fe91eb710..ac639243b49 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CreateCloudBackupActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CreateCloudBackupAction) 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 index c752f7e053b..deae557eaeb 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CreateCloudDatabaseAction} */ -public final class CreateCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateCloudDatabaseAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CreateCloudDatabaseAction) CreateCloudDatabaseActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateCloudDatabaseAction"); + } + // Use CreateCloudDatabaseAction.newBuilder() to construct. - private CreateCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateCloudDatabaseAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +60,13 @@ private CreateCloudDatabaseAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_fieldAccessorTable @@ -460,23 +466,23 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, databaseId_); } for (int i = 0; i < sdlStatement_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sdlStatement_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 4, sdlStatement_.getRaw(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getEncryptionConfig()); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, dialect_); + com.google.protobuf.GeneratedMessage.writeString(output, 6, dialect_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeBytes(7, protoDescriptors_); @@ -490,14 +496,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, databaseId_); } { int dataSize = 0; @@ -511,7 +517,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEncryptionConfig()); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, dialect_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, dialect_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(7, protoDescriptors_); @@ -623,38 +629,38 @@ public static com.google.spanner.executor.v1.CreateCloudDatabaseAction parseFrom 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -678,7 +684,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -692,7 +698,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CreateCloudDatabaseAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CreateCloudDatabaseAction) com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder { @@ -702,7 +708,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_fieldAccessorTable @@ -716,14 +722,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncryptionConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncryptionConfigFieldBuilder(); } } @@ -808,39 +814,6 @@ private void buildPartial0(com.google.spanner.executor.v1.CreateCloudDatabaseAct 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) { @@ -944,7 +917,7 @@ public Builder mergeFrom( case 42: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -1496,7 +1469,7 @@ public Builder addSdlStatementBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> @@ -1653,7 +1626,7 @@ public Builder clearEncryptionConfig() { getEncryptionConfigBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } /** @@ -1687,14 +1660,14 @@ public Builder clearEncryptionConfig() { * * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>( @@ -1880,17 +1853,6 @@ public Builder clearProtoDescriptors() { 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) } 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 index 140a1dbb555..2760710196b 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CreateCloudDatabaseActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CreateCloudDatabaseAction) 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 index 3612abbe1b2..6f49bbbaf03 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CreateCloudInstanceAction} */ -public final class CreateCloudInstanceAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateCloudInstanceAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CreateCloudInstanceAction) CreateCloudInstanceActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateCloudInstanceAction"); + } + // Use CreateCloudInstanceAction.newBuilder() to construct. - private CreateCloudInstanceAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateCloudInstanceAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,12 +55,7 @@ private CreateCloudInstanceAction() { instanceId_ = ""; projectId_ = ""; instanceConfigId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateCloudInstanceAction(); + edition_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -69,7 +76,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_fieldAccessorTable @@ -478,6 +485,45 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { return map.get(key); } + public static final int EDITION_FIELD_NUMBER = 8; + private int edition_ = 0; + + /** + * + * + *
+   * The edition of the instance.
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The enum numeric value on the wire for edition. + */ + @java.lang.Override + public int getEditionValue() { + return edition_; + } + + /** + * + * + *
+   * The edition of the instance.
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The edition. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.Instance.Edition getEdition() { + com.google.spanner.admin.instance.v1.Instance.Edition result = + com.google.spanner.admin.instance.v1.Instance.Edition.forNumber(edition_); + return result == null + ? com.google.spanner.admin.instance.v1.Instance.Edition.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -492,19 +538,19 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceConfigId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instanceConfigId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, instanceConfigId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(4, nodeCount_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(6, processingUnits_); @@ -512,6 +558,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(7, getAutoscalingConfig()); } + if (edition_ + != com.google.spanner.admin.instance.v1.Instance.Edition.EDITION_UNSPECIFIED.getNumber()) { + output.writeEnum(8, edition_); + } getUnknownFields().writeTo(output); } @@ -521,14 +571,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceConfigId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instanceConfigId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, instanceConfigId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, nodeCount_); @@ -549,6 +599,10 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAutoscalingConfig()); } + if (edition_ + != com.google.spanner.admin.instance.v1.Instance.Edition.EDITION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, edition_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -581,6 +635,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAutoscalingConfig().equals(other.getAutoscalingConfig())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (edition_ != other.edition_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -614,6 +669,8 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } + hash = (37 * hash) + EDITION_FIELD_NUMBER; + hash = (53 * hash) + edition_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -656,38 +713,38 @@ public static com.google.spanner.executor.v1.CreateCloudInstanceAction parseFrom 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -711,7 +768,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -725,7 +782,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CreateCloudInstanceAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CreateCloudInstanceAction) com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder { @@ -757,7 +814,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_fieldAccessorTable @@ -771,14 +828,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAutoscalingConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAutoscalingConfigFieldBuilder(); } } @@ -797,6 +854,7 @@ public Builder clear() { autoscalingConfigBuilder_ = null; } internalGetMutableLabels().clear(); + edition_ = 0; return this; } @@ -862,42 +920,12 @@ private void buildPartial0(com.google.spanner.executor.v1.CreateCloudInstanceAct result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.edition_ = edition_; + } 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) { @@ -937,6 +965,9 @@ public Builder mergeFrom(com.google.spanner.executor.v1.CreateCloudInstanceActio } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000040; + if (other.edition_ != 0) { + setEditionValue(other.getEditionValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1008,10 +1039,16 @@ public Builder mergeFrom( case 58: { input.readMessage( - getAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 58 + case 64: + { + edition_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1509,7 +1546,7 @@ public Builder clearProcessingUnits() { } private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig, com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> @@ -1680,7 +1717,7 @@ public Builder clearAutoscalingConfig() { getAutoscalingConfigBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getAutoscalingConfigFieldBuilder().getBuilder(); + return internalGetAutoscalingConfigFieldBuilder().getBuilder(); } /** @@ -1718,14 +1755,14 @@ public Builder clearAutoscalingConfig() { * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig, com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> - getAutoscalingConfigFieldBuilder() { + internalGetAutoscalingConfigFieldBuilder() { if (autoscalingConfigBuilder_ == null) { autoscalingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig, com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder>( @@ -1907,15 +1944,101 @@ public Builder putAllLabels(java.util.Map va return this; } + private int edition_ = 0; + + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The enum numeric value on the wire for edition. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public int getEditionValue() { + return edition_; + } + + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @param value The enum numeric value on the wire for edition to set. + * @return This builder for chaining. + */ + public Builder setEditionValue(int value) { + edition_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; } + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The edition. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public com.google.spanner.admin.instance.v1.Instance.Edition getEdition() { + com.google.spanner.admin.instance.v1.Instance.Edition result = + com.google.spanner.admin.instance.v1.Instance.Edition.forNumber(edition_); + return result == null + ? com.google.spanner.admin.instance.v1.Instance.Edition.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @param value The edition to set. + * @return This builder for chaining. + */ + public Builder setEdition(com.google.spanner.admin.instance.v1.Instance.Edition value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + edition_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return This builder for chaining. + */ + public Builder clearEdition() { + bitField0_ = (bitField0_ & ~0x00000080); + edition_ = 0; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.CreateCloudInstanceAction) 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 index e06922e8f0c..85a3715f09e 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CreateCloudInstanceActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CreateCloudInstanceAction) @@ -262,4 +264,30 @@ java.lang.String getLabelsOrDefault( * map<string, string> labels = 5; */ java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The edition of the instance.
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The enum numeric value on the wire for edition. + */ + int getEditionValue(); + + /** + * + * + *
+   * The edition of the instance.
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The edition. + */ + com.google.spanner.admin.instance.v1.Instance.Edition getEdition(); } 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 index 5d938161787..6cd1d04f938 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,15 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.CreateUserInstanceConfigAction} */ -public final class CreateUserInstanceConfigAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateUserInstanceConfigAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CreateUserInstanceConfigAction) CreateUserInstanceConfigActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateUserInstanceConfigAction"); + } + // Use CreateUserInstanceConfigAction.newBuilder() to construct. - private CreateUserInstanceConfigAction( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateUserInstanceConfigAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +58,13 @@ private CreateUserInstanceConfigAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_fieldAccessorTable @@ -317,14 +322,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(userConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userConfigId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseConfigId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, baseConfigId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(baseConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, baseConfigId_); } for (int i = 0; i < replicas_.size(); i++) { output.writeMessage(4, replicas_.get(i)); @@ -338,14 +343,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(userConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userConfigId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseConfigId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, baseConfigId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(baseConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, baseConfigId_); } for (int i = 0; i < replicas_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, replicas_.get(i)); @@ -433,38 +438,38 @@ public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction pars 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -488,7 +493,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -502,7 +507,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.CreateUserInstanceConfigAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CreateUserInstanceConfigAction) com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder { @@ -512,7 +517,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_fieldAccessorTable @@ -524,7 +529,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.CreateUserInstanceConfigAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -605,39 +610,6 @@ private void buildPartial0( } } - @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) { @@ -686,8 +658,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.CreateUserInstanceConfig replicas_ = other.replicas_; bitField0_ = (bitField0_ & ~0x00000008); replicasBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getReplicasFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReplicasFieldBuilder() : null; } else { replicasBuilder_.addAllMessages(other.replicas_); @@ -1115,7 +1087,7 @@ private void ensureReplicasIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaInfo, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder> @@ -1375,7 +1347,7 @@ public Builder removeReplicas(int index) { * 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); + return internalGetReplicasFieldBuilder().getBuilder(index); } /** @@ -1424,7 +1396,7 @@ public com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder getReplicasOrBu * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; */ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuilder() { - return getReplicasFieldBuilder() + return internalGetReplicasFieldBuilder() .addBuilder(com.google.spanner.admin.instance.v1.ReplicaInfo.getDefaultInstance()); } @@ -1438,7 +1410,7 @@ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuild * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; */ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuilder(int index) { - return getReplicasFieldBuilder() + return internalGetReplicasFieldBuilder() .addBuilder(index, com.google.spanner.admin.instance.v1.ReplicaInfo.getDefaultInstance()); } @@ -1453,17 +1425,17 @@ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuild */ public java.util.List getReplicasBuilderList() { - return getReplicasFieldBuilder().getBuilderList(); + return internalGetReplicasFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaInfo, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder> - getReplicasFieldBuilder() { + internalGetReplicasFieldBuilder() { if (replicasBuilder_ == null) { replicasBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.admin.instance.v1.ReplicaInfo, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder>( @@ -1473,17 +1445,6 @@ public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuild 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) } 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 index 242a1e91ca5..0f72401a577 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface CreateUserInstanceConfigActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CreateUserInstanceConfigAction) 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 index 487bab681c0..56b81536c80 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord} */ -public final class DataChangeRecord extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DataChangeRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DataChangeRecord) DataChangeRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataChangeRecord"); + } + // Use DataChangeRecord.newBuilder() to construct. - private DataChangeRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DataChangeRecord(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -50,19 +62,13 @@ private DataChangeRecord() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DataChangeRecord_fieldAccessorTable @@ -164,14 +170,24 @@ public interface ColumnTypeOrBuilder * * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord.ColumnType} */ - public static final class ColumnType extends com.google.protobuf.GeneratedMessageV3 + public static final class ColumnType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DataChangeRecord.ColumnType) ColumnTypeOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ColumnType"); + } + // Use ColumnType.newBuilder() to construct. - private ColumnType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ColumnType(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -180,19 +196,13 @@ private ColumnType() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_fieldAccessorTable @@ -359,11 +369,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); } if (isPrimaryKey_ != false) { output.writeBool(3, isPrimaryKey_); @@ -380,11 +390,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); } if (isPrimaryKey_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isPrimaryKey_); @@ -473,38 +483,38 @@ public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType parseFr 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -528,8 +538,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -543,8 +552,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord.ColumnType} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DataChangeRecord.ColumnType) com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder { @@ -554,7 +562,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_fieldAccessorTable @@ -566,7 +574,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.DataChangeRecord.ColumnType.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -630,41 +638,6 @@ private void buildPartial0( } } - @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) { @@ -1098,18 +1071,6 @@ public Builder clearOrdinalPosition() { 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) } @@ -1260,14 +1221,24 @@ public interface ModOrBuilder * * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord.Mod} */ - public static final class Mod extends com.google.protobuf.GeneratedMessageV3 + public static final class Mod extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DataChangeRecord.Mod) ModOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Mod"); + } + // Use Mod.newBuilder() to construct. - private Mod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Mod(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1277,19 +1248,13 @@ private Mod() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_fieldAccessorTable @@ -1475,14 +1440,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(keys_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, keys_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newValues_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, newValues_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(newValues_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, newValues_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oldValues_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, oldValues_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(oldValues_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, oldValues_); } getUnknownFields().writeTo(output); } @@ -1493,14 +1458,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(keys_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, keys_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newValues_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, newValues_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(newValues_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, newValues_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oldValues_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, oldValues_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(oldValues_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, oldValues_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -1580,38 +1545,38 @@ public static com.google.spanner.executor.v1.DataChangeRecord.Mod parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1635,8 +1600,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1650,8 +1614,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord.Mod} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DataChangeRecord.Mod) com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder { @@ -1661,7 +1624,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_fieldAccessorTable @@ -1673,7 +1636,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.DataChangeRecord.Mod.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1731,41 +1694,6 @@ private void buildPartial0(com.google.spanner.executor.v1.DataChangeRecord.Mod r } } - @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) { @@ -2200,18 +2128,6 @@ public Builder setOldValuesBytes(com.google.protobuf.ByteString value) { 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) } @@ -2883,17 +2799,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getCommitTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, recordSequence_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, transactionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, table_); } for (int i = 0; i < columnTypes_.size(); i++) { output.writeMessage(6, columnTypes_.get(i)); @@ -2901,11 +2817,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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.GeneratedMessage.isStringEmpty(modType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, modType_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueCaptureType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, valueCaptureType_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valueCaptureType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, valueCaptureType_); } if (recordCount_ != 0L) { output.writeInt64(10, recordCount_); @@ -2913,8 +2829,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (partitionCount_ != 0L) { output.writeInt64(11, partitionCount_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionTag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, transactionTag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionTag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, transactionTag_); } if (isSystemTransaction_ != false) { output.writeBool(13, isSystemTransaction_); @@ -2931,17 +2847,17 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { 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.GeneratedMessage.isStringEmpty(recordSequence_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, recordSequence_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, transactionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + size += com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, table_); } for (int i = 0; i < columnTypes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, columnTypes_.get(i)); @@ -2949,11 +2865,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(modType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, modType_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueCaptureType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, valueCaptureType_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(valueCaptureType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, valueCaptureType_); } if (recordCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, recordCount_); @@ -2961,8 +2877,8 @@ public int getSerializedSize() { 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionTag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, transactionTag_); } if (isSystemTransaction_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, isSystemTransaction_); @@ -3084,38 +3000,38 @@ public static com.google.spanner.executor.v1.DataChangeRecord parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -3138,7 +3054,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3152,7 +3068,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DataChangeRecord) com.google.spanner.executor.v1.DataChangeRecordOrBuilder { @@ -3162,7 +3078,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DataChangeRecord_fieldAccessorTable @@ -3176,16 +3092,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCommitTimeFieldBuilder(); - getColumnTypesFieldBuilder(); - getModsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCommitTimeFieldBuilder(); + internalGetColumnTypesFieldBuilder(); + internalGetModsFieldBuilder(); } } @@ -3319,39 +3235,6 @@ private void buildPartial0(com.google.spanner.executor.v1.DataChangeRecord resul 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.DataChangeRecord) { @@ -3405,8 +3288,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.DataChangeRecord other) columnTypes_ = other.columnTypes_; bitField0_ = (bitField0_ & ~0x00000020); columnTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getColumnTypesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetColumnTypesFieldBuilder() : null; } else { columnTypesBuilder_.addAllMessages(other.columnTypes_); @@ -3432,8 +3315,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.DataChangeRecord other) mods_ = other.mods_; bitField0_ = (bitField0_ & ~0x00000040); modsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getModsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetModsFieldBuilder() : null; } else { modsBuilder_.addAllMessages(other.mods_); @@ -3492,7 +3375,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getCommitTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCommitTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -3604,7 +3488,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp commitTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -3749,7 +3633,7 @@ public Builder clearCommitTime() { public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getCommitTimeFieldBuilder().getBuilder(); + return internalGetCommitTimeFieldBuilder().getBuilder(); } /** @@ -3780,14 +3664,14 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { * * .google.protobuf.Timestamp commit_time = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCommitTimeFieldBuilder() { + internalGetCommitTimeFieldBuilder() { if (commitTimeBuilder_ == null) { commitTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -4206,7 +4090,7 @@ private void ensureColumnTypesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.DataChangeRecord.ColumnType, com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder, com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder> @@ -4487,7 +4371,7 @@ public Builder removeColumnTypes(int index) { */ public com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder getColumnTypesBuilder( int index) { - return getColumnTypesFieldBuilder().getBuilder(index); + return internalGetColumnTypesFieldBuilder().getBuilder(index); } /** @@ -4541,7 +4425,7 @@ public com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder getCol */ public com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder addColumnTypesBuilder() { - return getColumnTypesFieldBuilder() + return internalGetColumnTypesFieldBuilder() .addBuilder( com.google.spanner.executor.v1.DataChangeRecord.ColumnType.getDefaultInstance()); } @@ -4558,7 +4442,7 @@ public com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder getCol */ public com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder addColumnTypesBuilder( int index) { - return getColumnTypesFieldBuilder() + return internalGetColumnTypesFieldBuilder() .addBuilder( index, com.google.spanner.executor.v1.DataChangeRecord.ColumnType.getDefaultInstance()); @@ -4576,17 +4460,17 @@ public com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder addCol */ public java.util.List getColumnTypesBuilderList() { - return getColumnTypesFieldBuilder().getBuilderList(); + return internalGetColumnTypesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.DataChangeRecord.ColumnType, com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder, com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder> - getColumnTypesFieldBuilder() { + internalGetColumnTypesFieldBuilder() { if (columnTypesBuilder_ == null) { columnTypesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.DataChangeRecord.ColumnType, com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder, com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder>( @@ -4606,7 +4490,7 @@ private void ensureModsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.DataChangeRecord.Mod, com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder, com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder> @@ -4866,7 +4750,7 @@ public Builder removeMods(int index) { * 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); + return internalGetModsFieldBuilder().getBuilder(index); } /** @@ -4915,7 +4799,7 @@ public com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder getModsOrBui * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; */ public com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder addModsBuilder() { - return getModsFieldBuilder() + return internalGetModsFieldBuilder() .addBuilder(com.google.spanner.executor.v1.DataChangeRecord.Mod.getDefaultInstance()); } @@ -4929,7 +4813,7 @@ public com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder addModsBuilde * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; */ public com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder addModsBuilder(int index) { - return getModsFieldBuilder() + return internalGetModsFieldBuilder() .addBuilder( index, com.google.spanner.executor.v1.DataChangeRecord.Mod.getDefaultInstance()); } @@ -4945,17 +4829,17 @@ public com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder addModsBuilde */ public java.util.List getModsBuilderList() { - return getModsFieldBuilder().getBuilderList(); + return internalGetModsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.DataChangeRecord.Mod, com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder, com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder> - getModsFieldBuilder() { + internalGetModsFieldBuilder() { if (modsBuilder_ == null) { modsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.DataChangeRecord.Mod, com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder, com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder>( @@ -5466,17 +5350,6 @@ public Builder clearIsSystemTransaction() { 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) } 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 index d1d7ff40a0d..e14b7c5a006 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface DataChangeRecordOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DataChangeRecord) 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 index c90b3dabb56..6d26b911de5 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.DeleteCloudBackupAction} */ -public final class DeleteCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteCloudBackupAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DeleteCloudBackupAction) DeleteCloudBackupActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteCloudBackupAction"); + } + // Use DeleteCloudBackupAction.newBuilder() to construct. - private DeleteCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteCloudBackupAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private DeleteCloudBackupAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_fieldAccessorTable @@ -239,14 +245,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, backupId_); } getUnknownFields().writeTo(output); } @@ -257,14 +263,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, backupId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -344,38 +350,38 @@ public static com.google.spanner.executor.v1.DeleteCloudBackupAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -399,7 +405,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -413,7 +419,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.DeleteCloudBackupAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DeleteCloudBackupAction) com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder { @@ -423,7 +429,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_fieldAccessorTable @@ -435,7 +441,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.DeleteCloudBackupAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -493,39 +499,6 @@ private void buildPartial0(com.google.spanner.executor.v1.DeleteCloudBackupActio } } - @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) { @@ -950,17 +923,6 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { 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) } 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 index a00d015c9f5..f896c6a3717 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface DeleteCloudBackupActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DeleteCloudBackupAction) 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 index 418c2e21aca..3a3e5fbd6c5 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.DeleteCloudInstanceAction} */ -public final class DeleteCloudInstanceAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteCloudInstanceAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DeleteCloudInstanceAction) DeleteCloudInstanceActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteCloudInstanceAction"); + } + // Use DeleteCloudInstanceAction.newBuilder() to construct. - private DeleteCloudInstanceAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteCloudInstanceAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private DeleteCloudInstanceAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_fieldAccessorTable @@ -185,11 +191,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } getUnknownFields().writeTo(output); } @@ -200,11 +206,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -281,38 +287,38 @@ public static com.google.spanner.executor.v1.DeleteCloudInstanceAction parseFrom 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -336,7 +342,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -350,7 +356,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.DeleteCloudInstanceAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DeleteCloudInstanceAction) com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder { @@ -360,7 +366,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_fieldAccessorTable @@ -372,7 +378,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.DeleteCloudInstanceAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -426,39 +432,6 @@ private void buildPartial0(com.google.spanner.executor.v1.DeleteCloudInstanceAct } } - @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) { @@ -761,17 +734,6 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { 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) } 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 index 9891c64eb93..ac90394f58a 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface DeleteCloudInstanceActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DeleteCloudInstanceAction) 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 index fcf9b626729..e31d83470e1 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,15 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.DeleteUserInstanceConfigAction} */ -public final class DeleteUserInstanceConfigAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteUserInstanceConfigAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DeleteUserInstanceConfigAction) DeleteUserInstanceConfigActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteUserInstanceConfigAction"); + } + // Use DeleteUserInstanceConfigAction.newBuilder() to construct. - private DeleteUserInstanceConfigAction( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteUserInstanceConfigAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +56,13 @@ private DeleteUserInstanceConfigAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_fieldAccessorTable @@ -186,11 +191,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(userConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userConfigId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } getUnknownFields().writeTo(output); } @@ -201,11 +206,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(userConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userConfigId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -282,38 +287,38 @@ public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction pars 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -337,7 +342,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -351,7 +356,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.DeleteUserInstanceConfigAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DeleteUserInstanceConfigAction) com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder { @@ -361,7 +366,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_fieldAccessorTable @@ -373,7 +378,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -429,39 +434,6 @@ private void buildPartial0( } } - @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) { @@ -765,17 +737,6 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { 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) } 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 index 488dfdf372e..87afb9605b3 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface DeleteUserInstanceConfigActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DeleteUserInstanceConfigAction) 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 index 588432d6ff3..19206b84b17 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.executor.v1.DmlAction} */ -public final class DmlAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DmlAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DmlAction) DmlActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DmlAction"); + } + // Use DmlAction.newBuilder() to construct. - private DmlAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DmlAction(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DmlAction_fieldAccessorTable @@ -153,6 +159,45 @@ public boolean getAutocommitIfSupported() { return autocommitIfSupported_; } + public static final int LAST_STATEMENT_FIELD_NUMBER = 3; + private boolean lastStatement_ = false; + + /** + * + * + *
+   * Whether to set this DML statement as the last statement in the
+   * transaction. The transaction should be committed after processing this DML
+   * statement.
+   * 
+ * + * optional bool last_statement = 3; + * + * @return Whether the lastStatement field is set. + */ + @java.lang.Override + public boolean hasLastStatement() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Whether to set this DML statement as the last statement in the
+   * transaction. The transaction should be committed after processing this DML
+   * statement.
+   * 
+ * + * optional bool last_statement = 3; + * + * @return The lastStatement. + */ + @java.lang.Override + public boolean getLastStatement() { + return lastStatement_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -173,6 +218,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(2, autocommitIfSupported_); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(3, lastStatement_); + } getUnknownFields().writeTo(output); } @@ -188,6 +236,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, autocommitIfSupported_); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, lastStatement_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -211,6 +262,10 @@ public boolean equals(final java.lang.Object obj) { if (hasAutocommitIfSupported()) { if (getAutocommitIfSupported() != other.getAutocommitIfSupported()) return false; } + if (hasLastStatement() != other.hasLastStatement()) return false; + if (hasLastStatement()) { + if (getLastStatement() != other.getLastStatement()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,6 +285,10 @@ public int hashCode() { hash = (37 * hash) + AUTOCOMMIT_IF_SUPPORTED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutocommitIfSupported()); } + if (hasLastStatement()) { + hash = (37 * hash) + LAST_STATEMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLastStatement()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -272,38 +331,38 @@ public static com.google.spanner.executor.v1.DmlAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -326,7 +385,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -340,7 +399,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.DmlAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DmlAction) com.google.spanner.executor.v1.DmlActionOrBuilder { @@ -350,7 +409,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DmlAction_fieldAccessorTable @@ -364,14 +423,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getUpdateFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateFieldBuilder(); } } @@ -385,6 +444,7 @@ public Builder clear() { updateBuilder_ = null; } autocommitIfSupported_ = false; + lastStatement_ = false; return this; } @@ -430,42 +490,13 @@ private void buildPartial0(com.google.spanner.executor.v1.DmlAction result) { result.autocommitIfSupported_ = autocommitIfSupported_; to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lastStatement_ = lastStatement_; + 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.DmlAction) { @@ -484,6 +515,9 @@ public Builder mergeFrom(com.google.spanner.executor.v1.DmlAction other) { if (other.hasAutocommitIfSupported()) { setAutocommitIfSupported(other.getAutocommitIfSupported()); } + if (other.hasLastStatement()) { + setLastStatement(other.getLastStatement()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -512,7 +546,7 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getUpdateFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetUpdateFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -522,6 +556,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 24: + { + lastStatement_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -542,7 +582,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.executor.v1.QueryAction update_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> @@ -687,7 +727,7 @@ public Builder clearUpdate() { public com.google.spanner.executor.v1.QueryAction.Builder getUpdateBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getUpdateFieldBuilder().getBuilder(); + return internalGetUpdateFieldBuilder().getBuilder(); } /** @@ -718,14 +758,14 @@ public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdateOrBuilder() * * .google.spanner.executor.v1.QueryAction update = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> - getUpdateFieldBuilder() { + internalGetUpdateFieldBuilder() { if (updateBuilder_ == null) { updateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder>( @@ -811,15 +851,84 @@ public Builder clearAutocommitIfSupported() { return this; } + private boolean lastStatement_; + + /** + * + * + *
+     * Whether to set this DML statement as the last statement in the
+     * transaction. The transaction should be committed after processing this DML
+     * statement.
+     * 
+ * + * optional bool last_statement = 3; + * + * @return Whether the lastStatement field is set. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean hasLastStatement() { + return ((bitField0_ & 0x00000004) != 0); } + /** + * + * + *
+     * Whether to set this DML statement as the last statement in the
+     * transaction. The transaction should be committed after processing this DML
+     * statement.
+     * 
+ * + * optional bool last_statement = 3; + * + * @return The lastStatement. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public boolean getLastStatement() { + return lastStatement_; + } + + /** + * + * + *
+     * Whether to set this DML statement as the last statement in the
+     * transaction. The transaction should be committed after processing this DML
+     * statement.
+     * 
+ * + * optional bool last_statement = 3; + * + * @param value The lastStatement to set. + * @return This builder for chaining. + */ + public Builder setLastStatement(boolean value) { + + lastStatement_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Whether to set this DML statement as the last statement in the
+     * transaction. The transaction should be committed after processing this DML
+     * statement.
+     * 
+ * + * optional bool last_statement = 3; + * + * @return This builder for chaining. + */ + public Builder clearLastStatement() { + bitField0_ = (bitField0_ & ~0x00000004); + lastStatement_ = false; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.DmlAction) 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 index b7a5ebfd67f..9f4ec9ebc82 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface DmlActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DmlAction) @@ -88,4 +90,34 @@ public interface DmlActionOrBuilder * @return The autocommitIfSupported. */ boolean getAutocommitIfSupported(); + + /** + * + * + *
+   * Whether to set this DML statement as the last statement in the
+   * transaction. The transaction should be committed after processing this DML
+   * statement.
+   * 
+ * + * optional bool last_statement = 3; + * + * @return Whether the lastStatement field is set. + */ + boolean hasLastStatement(); + + /** + * + * + *
+   * Whether to set this DML statement as the last statement in the
+   * transaction. The transaction should be committed after processing this DML
+   * statement.
+   * 
+ * + * optional bool last_statement = 3; + * + * @return The lastStatement. + */ + boolean getLastStatement(); } 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 index 966185694ce..735e11106b7 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.DropCloudDatabaseAction} */ -public final class DropCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DropCloudDatabaseAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DropCloudDatabaseAction) DropCloudDatabaseActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DropCloudDatabaseAction"); + } + // Use DropCloudDatabaseAction.newBuilder() to construct. - private DropCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DropCloudDatabaseAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private DropCloudDatabaseAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_fieldAccessorTable @@ -239,14 +245,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, databaseId_); } getUnknownFields().writeTo(output); } @@ -257,14 +263,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, databaseId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -344,38 +350,38 @@ public static com.google.spanner.executor.v1.DropCloudDatabaseAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -399,7 +405,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -413,7 +419,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.DropCloudDatabaseAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DropCloudDatabaseAction) com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder { @@ -423,7 +429,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_fieldAccessorTable @@ -435,7 +441,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.DropCloudDatabaseAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -493,39 +499,6 @@ private void buildPartial0(com.google.spanner.executor.v1.DropCloudDatabaseActio } } - @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) { @@ -950,17 +923,6 @@ public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { 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) } 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 index 41bc4146276..e4ab5af63ad 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface DropCloudDatabaseActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DropCloudDatabaseAction) 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 index f53cfc728c1..f605cdc4132 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ExecuteChangeStreamQuery} */ -public final class ExecuteChangeStreamQuery extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ExecuteChangeStreamQuery extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ExecuteChangeStreamQuery) ExecuteChangeStreamQueryOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExecuteChangeStreamQuery"); + } + // Use ExecuteChangeStreamQuery.newBuilder() to construct. - private ExecuteChangeStreamQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExecuteChangeStreamQuery(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private ExecuteChangeStreamQuery() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_fieldAccessorTable @@ -526,8 +532,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getStartTime()); @@ -536,10 +542,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(3, getEndTime()); } if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, partitionToken_); + com.google.protobuf.GeneratedMessage.writeString(output, 4, partitionToken_); } for (int i = 0; i < readOptions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, readOptions_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 5, readOptions_.getRaw(i)); } if (((bitField0_ & 0x00000008) != 0)) { output.writeInt32(6, heartbeatMilliseconds_); @@ -548,7 +554,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeInt64(7, deadlineSeconds_); } if (((bitField0_ & 0x00000020) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, cloudDatabaseRole_); + com.google.protobuf.GeneratedMessage.writeString(output, 8, cloudDatabaseRole_); } getUnknownFields().writeTo(output); } @@ -559,8 +565,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); @@ -569,7 +575,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); } if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, partitionToken_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, partitionToken_); } { int dataSize = 0; @@ -586,7 +592,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, deadlineSeconds_); } if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, cloudDatabaseRole_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, cloudDatabaseRole_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -713,38 +719,38 @@ public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -768,7 +774,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -782,7 +788,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ExecuteChangeStreamQuery} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ExecuteChangeStreamQuery) com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder { @@ -792,7 +798,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_fieldAccessorTable @@ -806,15 +812,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStartTimeFieldBuilder(); - getEndTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); } } @@ -909,39 +915,6 @@ private void buildPartial0(com.google.spanner.executor.v1.ExecuteChangeStreamQue 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) { @@ -1026,13 +999,14 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -1198,7 +1172,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1348,7 +1322,7 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } /** @@ -1379,14 +1353,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_time = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { + internalGetStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1397,7 +1371,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1547,7 +1521,7 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } /** @@ -1578,14 +1552,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * optional .google.protobuf.Timestamp end_time = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { + internalGetEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2196,17 +2170,6 @@ public Builder setCloudDatabaseRoleBytes(com.google.protobuf.ByteString value) { 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) } 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 index ac70abde36d..8883d60f917 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ExecuteChangeStreamQueryOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ExecuteChangeStreamQuery) 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 index 972799a9267..873ea820e11 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -30,32 +31,37 @@ * * Protobuf type {@code google.spanner.executor.v1.ExecutePartitionAction} */ -public final class ExecutePartitionAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ExecutePartitionAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ExecutePartitionAction) ExecutePartitionActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExecutePartitionAction"); + } + // Use ExecutePartitionAction.newBuilder() to construct. - private ExecutePartitionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExecutePartitionAction(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ExecutePartitionAction_fieldAccessorTable @@ -224,38 +230,38 @@ public static com.google.spanner.executor.v1.ExecutePartitionAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -279,7 +285,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -295,7 +301,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ExecutePartitionAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ExecutePartitionAction) com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder { @@ -305,7 +311,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ExecutePartitionAction_fieldAccessorTable @@ -319,14 +325,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPartitionFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPartitionFieldBuilder(); } } @@ -383,39 +389,6 @@ private void buildPartial0(com.google.spanner.executor.v1.ExecutePartitionAction 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.ExecutePartitionAction) { @@ -460,7 +433,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getPartitionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPartitionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -484,7 +458,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.executor.v1.BatchPartition partition_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.BatchPartition, com.google.spanner.executor.v1.BatchPartition.Builder, com.google.spanner.executor.v1.BatchPartitionOrBuilder> @@ -630,7 +604,7 @@ public Builder clearPartition() { public com.google.spanner.executor.v1.BatchPartition.Builder getPartitionBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getPartitionFieldBuilder().getBuilder(); + return internalGetPartitionFieldBuilder().getBuilder(); } /** @@ -661,14 +635,14 @@ public com.google.spanner.executor.v1.BatchPartitionOrBuilder getPartitionOrBuil * * .google.spanner.executor.v1.BatchPartition partition = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.BatchPartition, com.google.spanner.executor.v1.BatchPartition.Builder, com.google.spanner.executor.v1.BatchPartitionOrBuilder> - getPartitionFieldBuilder() { + internalGetPartitionFieldBuilder() { if (partitionBuilder_ == null) { partitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.BatchPartition, com.google.spanner.executor.v1.BatchPartition.Builder, com.google.spanner.executor.v1.BatchPartitionOrBuilder>( @@ -678,17 +652,6 @@ public com.google.spanner.executor.v1.BatchPartitionOrBuilder getPartitionOrBuil 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) } 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 index e5cddd9f86b..d68a98c2da9 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ExecutePartitionActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ExecutePartitionAction) 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 index 8871d325e8a..2b986acb481 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.FinishTransactionAction} */ -public final class FinishTransactionAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class FinishTransactionAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.FinishTransactionAction) FinishTransactionActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FinishTransactionAction"); + } + // Use FinishTransactionAction.newBuilder() to construct. - private FinishTransactionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FinishTransactionAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_FinishTransactionAction_fieldAccessorTable @@ -107,6 +113,16 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Mode"); + } + /** * * @@ -198,7 +214,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.executor.v1.FinishTransactionAction.getDescriptor() .getEnumTypes() .get(0); @@ -371,38 +387,38 @@ public static com.google.spanner.executor.v1.FinishTransactionAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -426,7 +442,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -440,7 +456,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.FinishTransactionAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.FinishTransactionAction) com.google.spanner.executor.v1.FinishTransactionActionOrBuilder { @@ -450,7 +466,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_FinishTransactionAction_fieldAccessorTable @@ -462,7 +478,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.FinishTransactionAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -512,39 +528,6 @@ private void buildPartial0(com.google.spanner.executor.v1.FinishTransactionActio } } - @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) { @@ -714,17 +697,6 @@ public Builder clearMode() { 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) } 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 index 2211a63e1de..5192a3203e2 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface FinishTransactionActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.FinishTransactionAction) 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 index 2b39b3dca4b..86782df7640 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,33 +30,38 @@ * * Protobuf type {@code google.spanner.executor.v1.GenerateDbPartitionsForQueryAction} */ -public final class GenerateDbPartitionsForQueryAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GenerateDbPartitionsForQueryAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) GenerateDbPartitionsForQueryActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GenerateDbPartitionsForQueryAction"); + } + // Use GenerateDbPartitionsForQueryAction.newBuilder() to construct. private GenerateDbPartitionsForQueryAction( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_fieldAccessorTable @@ -275,39 +281,39 @@ public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -331,7 +337,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -346,7 +352,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.GenerateDbPartitionsForQueryAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder { @@ -356,7 +362,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_fieldAccessorTable @@ -371,14 +377,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getQueryFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetQueryFieldBuilder(); } } @@ -442,39 +448,6 @@ private void buildPartial0( 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) { @@ -524,7 +497,7 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getQueryFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetQueryFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -554,7 +527,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.executor.v1.QueryAction query_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> @@ -699,7 +672,7 @@ public Builder clearQuery() { public com.google.spanner.executor.v1.QueryAction.Builder getQueryBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getQueryFieldBuilder().getBuilder(); + return internalGetQueryFieldBuilder().getBuilder(); } /** @@ -730,14 +703,14 @@ public com.google.spanner.executor.v1.QueryActionOrBuilder getQueryOrBuilder() { * * .google.spanner.executor.v1.QueryAction query = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> - getQueryFieldBuilder() { + internalGetQueryFieldBuilder() { if (queryBuilder_ == null) { queryBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder>( @@ -823,17 +796,6 @@ public Builder clearDesiredBytesPerPartition() { 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) } 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 index 8cf654e3936..417c35af6d4 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface GenerateDbPartitionsForQueryActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) 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 index c245448745a..f3d0c178534 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,15 +30,26 @@ * * Protobuf type {@code google.spanner.executor.v1.GenerateDbPartitionsForReadAction} */ -public final class GenerateDbPartitionsForReadAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GenerateDbPartitionsForReadAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GenerateDbPartitionsForReadAction) GenerateDbPartitionsForReadActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GenerateDbPartitionsForReadAction"); + } + // Use GenerateDbPartitionsForReadAction.newBuilder() to construct. private GenerateDbPartitionsForReadAction( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_fieldAccessorTable @@ -411,38 +417,38 @@ public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction p 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -466,7 +472,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -481,7 +487,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.GenerateDbPartitionsForReadAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GenerateDbPartitionsForReadAction) com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder { @@ -491,7 +497,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_fieldAccessorTable @@ -505,15 +511,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getReadFieldBuilder(); - getTableFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetReadFieldBuilder(); + internalGetTableFieldBuilder(); } } @@ -603,39 +609,6 @@ private void buildPartial0( 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) { @@ -673,8 +646,8 @@ public Builder mergeFrom( table_ = other.table_; bitField0_ = (bitField0_ & ~0x00000002); tableBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTableFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTableFieldBuilder() : null; } else { tableBuilder_.addAllMessages(other.table_); @@ -715,7 +688,7 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getReadFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetReadFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -764,7 +737,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.executor.v1.ReadAction read_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ReadAction, com.google.spanner.executor.v1.ReadAction.Builder, com.google.spanner.executor.v1.ReadActionOrBuilder> @@ -909,7 +882,7 @@ public Builder clearRead() { public com.google.spanner.executor.v1.ReadAction.Builder getReadBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getReadFieldBuilder().getBuilder(); + return internalGetReadFieldBuilder().getBuilder(); } /** @@ -940,14 +913,14 @@ public com.google.spanner.executor.v1.ReadActionOrBuilder getReadOrBuilder() { * * .google.spanner.executor.v1.ReadAction read = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ReadAction, com.google.spanner.executor.v1.ReadAction.Builder, com.google.spanner.executor.v1.ReadActionOrBuilder> - getReadFieldBuilder() { + internalGetReadFieldBuilder() { if (readBuilder_ == null) { readBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ReadAction, com.google.spanner.executor.v1.ReadAction.Builder, com.google.spanner.executor.v1.ReadActionOrBuilder>( @@ -967,7 +940,7 @@ private void ensureTableIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.TableMetadata, com.google.spanner.executor.v1.TableMetadata.Builder, com.google.spanner.executor.v1.TableMetadataOrBuilder> @@ -1226,7 +1199,7 @@ public Builder removeTable(int index) { * repeated .google.spanner.executor.v1.TableMetadata table = 2; */ public com.google.spanner.executor.v1.TableMetadata.Builder getTableBuilder(int index) { - return getTableFieldBuilder().getBuilder(index); + return internalGetTableFieldBuilder().getBuilder(index); } /** @@ -1274,7 +1247,7 @@ public com.google.spanner.executor.v1.TableMetadataOrBuilder getTableOrBuilder(i * repeated .google.spanner.executor.v1.TableMetadata table = 2; */ public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder() { - return getTableFieldBuilder() + return internalGetTableFieldBuilder() .addBuilder(com.google.spanner.executor.v1.TableMetadata.getDefaultInstance()); } @@ -1288,7 +1261,7 @@ public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder() { * repeated .google.spanner.executor.v1.TableMetadata table = 2; */ public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder(int index) { - return getTableFieldBuilder() + return internalGetTableFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.TableMetadata.getDefaultInstance()); } @@ -1303,17 +1276,17 @@ public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder(int */ public java.util.List getTableBuilderList() { - return getTableFieldBuilder().getBuilderList(); + return internalGetTableFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.TableMetadata, com.google.spanner.executor.v1.TableMetadata.Builder, com.google.spanner.executor.v1.TableMetadataOrBuilder> - getTableFieldBuilder() { + internalGetTableFieldBuilder() { if (tableBuilder_ == null) { tableBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.TableMetadata, com.google.spanner.executor.v1.TableMetadata.Builder, com.google.spanner.executor.v1.TableMetadataOrBuilder>( @@ -1475,17 +1448,6 @@ public Builder clearMaxPartitionCount() { 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) } 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 index 7926a47a12a..ee1632fb6dc 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface GenerateDbPartitionsForReadActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GenerateDbPartitionsForReadAction) 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 index 4472731f50a..e57bdb7e348 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.GetCloudBackupAction} */ -public final class GetCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetCloudBackupAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetCloudBackupAction) GetCloudBackupActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetCloudBackupAction"); + } + // Use GetCloudBackupAction.newBuilder() to construct. - private GetCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetCloudBackupAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private GetCloudBackupAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetCloudBackupAction_fieldAccessorTable @@ -239,14 +245,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, backupId_); } getUnknownFields().writeTo(output); } @@ -257,14 +263,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, backupId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -344,38 +350,38 @@ public static com.google.spanner.executor.v1.GetCloudBackupAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -398,7 +404,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -412,7 +418,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.GetCloudBackupAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetCloudBackupAction) com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder { @@ -422,7 +428,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetCloudBackupAction_fieldAccessorTable @@ -434,7 +440,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.GetCloudBackupAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -492,39 +498,6 @@ private void buildPartial0(com.google.spanner.executor.v1.GetCloudBackupAction r } } - @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) { @@ -949,17 +922,6 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { 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) } 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 index 825230d52af..a42478d1132 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface GetCloudBackupActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetCloudBackupAction) 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 index 97c98098824..fc799e82d6c 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.GetCloudDatabaseAction} */ -public final class GetCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetCloudDatabaseAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetCloudDatabaseAction) GetCloudDatabaseActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetCloudDatabaseAction"); + } + // Use GetCloudDatabaseAction.newBuilder() to construct. - private GetCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetCloudDatabaseAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private GetCloudDatabaseAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_fieldAccessorTable @@ -239,14 +245,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, databaseId_); } getUnknownFields().writeTo(output); } @@ -257,14 +263,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, databaseId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -344,38 +350,38 @@ public static com.google.spanner.executor.v1.GetCloudDatabaseAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -399,7 +405,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -413,7 +419,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.GetCloudDatabaseAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetCloudDatabaseAction) com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder { @@ -423,7 +429,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_fieldAccessorTable @@ -435,7 +441,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.GetCloudDatabaseAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -493,39 +499,6 @@ private void buildPartial0(com.google.spanner.executor.v1.GetCloudDatabaseAction } } - @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) { @@ -950,17 +923,6 @@ public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { 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) } 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 index 3e7f3e1e41b..b33e2d8bfad 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface GetCloudDatabaseActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetCloudDatabaseAction) 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 index 032ffa1a2db..7fde64569b5 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.GetCloudInstanceAction} */ -public final class GetCloudInstanceAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetCloudInstanceAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetCloudInstanceAction) GetCloudInstanceActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetCloudInstanceAction"); + } + // Use GetCloudInstanceAction.newBuilder() to construct. - private GetCloudInstanceAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetCloudInstanceAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GetCloudInstanceAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetCloudInstanceAction_fieldAccessorTable @@ -187,11 +193,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } getUnknownFields().writeTo(output); } @@ -202,11 +208,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -283,38 +289,38 @@ public static com.google.spanner.executor.v1.GetCloudInstanceAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -338,7 +344,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -352,7 +358,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.GetCloudInstanceAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetCloudInstanceAction) com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder { @@ -362,7 +368,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetCloudInstanceAction_fieldAccessorTable @@ -374,7 +380,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.GetCloudInstanceAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -428,39 +434,6 @@ private void buildPartial0(com.google.spanner.executor.v1.GetCloudInstanceAction } } - @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) { @@ -768,17 +741,6 @@ public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { 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) } 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 index d96e778a18b..05811d3ae4b 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface GetCloudInstanceActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetCloudInstanceAction) 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 index 39f9e535e2f..fd37c45e375 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.GetCloudInstanceConfigAction} */ -public final class GetCloudInstanceConfigAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetCloudInstanceConfigAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetCloudInstanceConfigAction) GetCloudInstanceConfigActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetCloudInstanceConfigAction"); + } + // Use GetCloudInstanceConfigAction.newBuilder() to construct. - private GetCloudInstanceConfigAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetCloudInstanceConfigAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GetCloudInstanceConfigAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_fieldAccessorTable @@ -185,11 +191,11 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(instanceConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceConfigId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } getUnknownFields().writeTo(output); } @@ -200,11 +206,11 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(instanceConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceConfigId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -281,38 +287,38 @@ public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction parseF 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -336,7 +342,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -350,7 +356,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.GetCloudInstanceConfigAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetCloudInstanceConfigAction) com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder { @@ -360,7 +366,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_fieldAccessorTable @@ -372,7 +378,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.GetCloudInstanceConfigAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -426,39 +432,6 @@ private void buildPartial0(com.google.spanner.executor.v1.GetCloudInstanceConfig } } - @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) { @@ -761,17 +734,6 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { 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) } 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 index 40c708917cc..d4517c60c82 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface GetCloudInstanceConfigActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetCloudInstanceConfigAction) 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 index d75958b690c..e1612142993 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.GetOperationAction} */ -public final class GetOperationAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetOperationAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetOperationAction) GetOperationActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetOperationAction"); + } + // Use GetOperationAction.newBuilder() to construct. - private GetOperationAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetOperationAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetOperationAction_fieldAccessorTable @@ -131,8 +137,8 @@ public final boolean isInitialized() { @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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, operation_); } getUnknownFields().writeTo(output); } @@ -143,8 +149,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operation_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, operation_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -218,38 +224,38 @@ public static com.google.spanner.executor.v1.GetOperationAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -272,7 +278,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -286,7 +292,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.GetOperationAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetOperationAction) com.google.spanner.executor.v1.GetOperationActionOrBuilder { @@ -296,7 +302,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_GetOperationAction_fieldAccessorTable @@ -308,7 +314,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.GetOperationAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -358,39 +364,6 @@ private void buildPartial0(com.google.spanner.executor.v1.GetOperationAction res } } - @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) { @@ -571,17 +544,6 @@ public Builder setOperationBytes(com.google.protobuf.ByteString value) { 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) } 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 index 4cb0884fa84..01de76b42ec 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface GetOperationActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetOperationAction) 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 index 48dfa25975f..e7b5e27ed78 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.executor.v1.HeartbeatRecord} */ -public final class HeartbeatRecord extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class HeartbeatRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.HeartbeatRecord) HeartbeatRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartbeatRecord"); + } + // Use HeartbeatRecord.newBuilder() to construct. - private HeartbeatRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private HeartbeatRecord(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_HeartbeatRecord_fieldAccessorTable @@ -222,38 +228,38 @@ public static com.google.spanner.executor.v1.HeartbeatRecord parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -276,7 +282,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -290,7 +296,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.HeartbeatRecord} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.HeartbeatRecord) com.google.spanner.executor.v1.HeartbeatRecordOrBuilder { @@ -300,7 +306,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_HeartbeatRecord_fieldAccessorTable @@ -314,14 +320,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getHeartbeatTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetHeartbeatTimeFieldBuilder(); } } @@ -379,39 +385,6 @@ private void buildPartial0(com.google.spanner.executor.v1.HeartbeatRecord result 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.HeartbeatRecord) { @@ -455,7 +428,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getHeartbeatTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetHeartbeatTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -479,7 +453,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp heartbeatTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -624,7 +598,7 @@ public Builder clearHeartbeatTime() { public com.google.protobuf.Timestamp.Builder getHeartbeatTimeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getHeartbeatTimeFieldBuilder().getBuilder(); + return internalGetHeartbeatTimeFieldBuilder().getBuilder(); } /** @@ -655,14 +629,14 @@ public com.google.protobuf.TimestampOrBuilder getHeartbeatTimeOrBuilder() { * * .google.protobuf.Timestamp heartbeat_time = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getHeartbeatTimeFieldBuilder() { + internalGetHeartbeatTimeFieldBuilder() { if (heartbeatTimeBuilder_ == null) { heartbeatTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -672,17 +646,6 @@ public com.google.protobuf.TimestampOrBuilder getHeartbeatTimeOrBuilder() { 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) } 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 index ecf807750d2..e2ba4d9b723 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface HeartbeatRecordOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.HeartbeatRecord) 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 index 100e9f61134..1abd7c7d77d 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -34,14 +35,25 @@ * * Protobuf type {@code google.spanner.executor.v1.KeyRange} */ -public final class KeyRange extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class KeyRange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.KeyRange) KeyRangeOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "KeyRange"); + } + // Use KeyRange.newBuilder() to construct. - private KeyRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private KeyRange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -49,19 +61,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_KeyRange_fieldAccessorTable @@ -134,6 +140,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + /** * * @@ -251,7 +267,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.executor.v1.KeyRange.getDescriptor().getEnumTypes().get(0); } @@ -567,38 +583,38 @@ public static com.google.spanner.executor.v1.KeyRange parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -621,7 +637,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -641,7 +657,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.KeyRange} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.KeyRange) com.google.spanner.executor.v1.KeyRangeOrBuilder { @@ -651,7 +667,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_KeyRange_fieldAccessorTable @@ -665,15 +681,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStartFieldBuilder(); - getLimitFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartFieldBuilder(); + internalGetLimitFieldBuilder(); } } @@ -744,39 +760,6 @@ private void buildPartial0(com.google.spanner.executor.v1.KeyRange result) { 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) { @@ -796,7 +779,7 @@ public Builder mergeFrom(com.google.spanner.executor.v1.KeyRange other) { mergeLimit(other.getLimit()); } if (other.hasType()) { - setType(other.getType()); + setTypeValue(other.getTypeValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -826,13 +809,13 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getStartFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetStartFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getLimitFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetLimitFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -862,7 +845,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.executor.v1.ValueList start_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> @@ -1021,7 +1004,7 @@ public Builder clearStart() { public com.google.spanner.executor.v1.ValueList.Builder getStartBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getStartFieldBuilder().getBuilder(); + return internalGetStartFieldBuilder().getBuilder(); } /** @@ -1056,14 +1039,14 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getStartOrBuilder() { * * .google.spanner.executor.v1.ValueList start = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> - getStartFieldBuilder() { + internalGetStartFieldBuilder() { if (startBuilder_ == null) { startBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder>( @@ -1074,7 +1057,7 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getStartOrBuilder() { } private com.google.spanner.executor.v1.ValueList limit_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> @@ -1219,7 +1202,7 @@ public Builder clearLimit() { public com.google.spanner.executor.v1.ValueList.Builder getLimitBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getLimitFieldBuilder().getBuilder(); + return internalGetLimitFieldBuilder().getBuilder(); } /** @@ -1250,14 +1233,14 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getLimitOrBuilder() { * * .google.spanner.executor.v1.ValueList limit = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> - getLimitFieldBuilder() { + internalGetLimitFieldBuilder() { if (limitBuilder_ == null) { limitBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder>( @@ -1378,17 +1361,6 @@ public Builder clearType() { 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) } 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 index 146e86506a0..19db055c907 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface KeyRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.KeyRange) 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 index d7fb7501ba5..569f3f28134 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -30,14 +31,25 @@ * * Protobuf type {@code google.spanner.executor.v1.KeySet} */ -public final class KeySet extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class KeySet extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.KeySet) KeySetOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "KeySet"); + } + // Use KeySet.newBuilder() to construct. - private KeySet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private KeySet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private KeySet() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_KeySet_fieldAccessorTable @@ -371,38 +377,38 @@ public static com.google.spanner.executor.v1.KeySet parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -425,7 +431,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -441,7 +447,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.KeySet} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.KeySet) com.google.spanner.executor.v1.KeySetOrBuilder { @@ -451,7 +457,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_KeySet_fieldAccessorTable @@ -463,7 +469,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.KeySet.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -549,39 +555,6 @@ private void buildPartial0(com.google.spanner.executor.v1.KeySet result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.executor.v1.KeySet) { @@ -613,8 +586,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.KeySet other) { point_ = other.point_; bitField0_ = (bitField0_ & ~0x00000001); pointBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPointFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPointFieldBuilder() : null; } else { pointBuilder_.addAllMessages(other.point_); @@ -640,8 +613,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.KeySet other) { range_ = other.range_; bitField0_ = (bitField0_ & ~0x00000002); rangeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRangeFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRangeFieldBuilder() : null; } else { rangeBuilder_.addAllMessages(other.range_); @@ -738,7 +711,7 @@ private void ensurePointIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> @@ -1023,7 +996,7 @@ public Builder removePoint(int index) { * repeated .google.spanner.executor.v1.ValueList point = 1; */ public com.google.spanner.executor.v1.ValueList.Builder getPointBuilder(int index) { - return getPointFieldBuilder().getBuilder(index); + return internalGetPointFieldBuilder().getBuilder(index); } /** @@ -1077,7 +1050,7 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getPointOrBuilder(int i * repeated .google.spanner.executor.v1.ValueList point = 1; */ public com.google.spanner.executor.v1.ValueList.Builder addPointBuilder() { - return getPointFieldBuilder() + return internalGetPointFieldBuilder() .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -1093,7 +1066,7 @@ public com.google.spanner.executor.v1.ValueList.Builder addPointBuilder() { * repeated .google.spanner.executor.v1.ValueList point = 1; */ public com.google.spanner.executor.v1.ValueList.Builder addPointBuilder(int index) { - return getPointFieldBuilder() + return internalGetPointFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -1109,17 +1082,17 @@ public com.google.spanner.executor.v1.ValueList.Builder addPointBuilder(int inde * repeated .google.spanner.executor.v1.ValueList point = 1; */ public java.util.List getPointBuilderList() { - return getPointFieldBuilder().getBuilderList(); + return internalGetPointFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> - getPointFieldBuilder() { + internalGetPointFieldBuilder() { if (pointBuilder_ == null) { pointBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder>( @@ -1139,7 +1112,7 @@ private void ensureRangeIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.KeyRange, com.google.spanner.executor.v1.KeyRange.Builder, com.google.spanner.executor.v1.KeyRangeOrBuilder> @@ -1398,7 +1371,7 @@ public Builder removeRange(int index) { * repeated .google.spanner.executor.v1.KeyRange range = 2; */ public com.google.spanner.executor.v1.KeyRange.Builder getRangeBuilder(int index) { - return getRangeFieldBuilder().getBuilder(index); + return internalGetRangeFieldBuilder().getBuilder(index); } /** @@ -1446,7 +1419,7 @@ public com.google.spanner.executor.v1.KeyRangeOrBuilder getRangeOrBuilder(int in * repeated .google.spanner.executor.v1.KeyRange range = 2; */ public com.google.spanner.executor.v1.KeyRange.Builder addRangeBuilder() { - return getRangeFieldBuilder() + return internalGetRangeFieldBuilder() .addBuilder(com.google.spanner.executor.v1.KeyRange.getDefaultInstance()); } @@ -1460,7 +1433,7 @@ public com.google.spanner.executor.v1.KeyRange.Builder addRangeBuilder() { * repeated .google.spanner.executor.v1.KeyRange range = 2; */ public com.google.spanner.executor.v1.KeyRange.Builder addRangeBuilder(int index) { - return getRangeFieldBuilder() + return internalGetRangeFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.KeyRange.getDefaultInstance()); } @@ -1474,17 +1447,17 @@ public com.google.spanner.executor.v1.KeyRange.Builder addRangeBuilder(int index * repeated .google.spanner.executor.v1.KeyRange range = 2; */ public java.util.List getRangeBuilderList() { - return getRangeFieldBuilder().getBuilderList(); + return internalGetRangeFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.KeyRange, com.google.spanner.executor.v1.KeyRange.Builder, com.google.spanner.executor.v1.KeyRangeOrBuilder> - getRangeFieldBuilder() { + internalGetRangeFieldBuilder() { if (rangeBuilder_ == null) { rangeBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.KeyRange, com.google.spanner.executor.v1.KeyRange.Builder, com.google.spanner.executor.v1.KeyRangeOrBuilder>( @@ -1556,17 +1529,6 @@ public Builder clearAll() { 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) } 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 index 606efab3fc8..eea2bd4f6e0 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface KeySetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.KeySet) 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 index 9db292983e4..27d39e09ff2 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,15 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ListCloudBackupOperationsAction} */ -public final class ListCloudBackupOperationsAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListCloudBackupOperationsAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudBackupOperationsAction) ListCloudBackupOperationsActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCloudBackupOperationsAction"); + } + // Use ListCloudBackupOperationsAction.newBuilder() to construct. - private ListCloudBackupOperationsAction( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListCloudBackupOperationsAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +58,13 @@ private ListCloudBackupOperationsAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_fieldAccessorTable @@ -328,20 +333,20 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pageToken_); } getUnknownFields().writeTo(output); } @@ -352,20 +357,20 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -451,38 +456,38 @@ public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction par 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -506,7 +511,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -520,7 +525,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ListCloudBackupOperationsAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudBackupOperationsAction) com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder { @@ -530,7 +535,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_fieldAccessorTable @@ -542,7 +547,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.ListCloudBackupOperationsAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -610,39 +615,6 @@ private void buildPartial0( } } - @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) { @@ -1293,17 +1265,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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) } 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 index ebc2d7f48a4..88915e7c847 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ListCloudBackupOperationsActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudBackupOperationsAction) 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 index c390c5f1f81..f9c2f246ab9 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ListCloudBackupsAction} */ -public final class ListCloudBackupsAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListCloudBackupsAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudBackupsAction) ListCloudBackupsActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCloudBackupsAction"); + } + // Use ListCloudBackupsAction.newBuilder() to construct. - private ListCloudBackupsAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListCloudBackupsAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private ListCloudBackupsAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudBackupsAction_fieldAccessorTable @@ -323,20 +329,20 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pageToken_); } getUnknownFields().writeTo(output); } @@ -347,20 +353,20 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -446,38 +452,38 @@ public static com.google.spanner.executor.v1.ListCloudBackupsAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -501,7 +507,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -515,7 +521,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ListCloudBackupsAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudBackupsAction) com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder { @@ -525,7 +531,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudBackupsAction_fieldAccessorTable @@ -537,7 +543,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.ListCloudBackupsAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -603,39 +609,6 @@ private void buildPartial0(com.google.spanner.executor.v1.ListCloudBackupsAction } } - @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) { @@ -1275,17 +1248,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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) } 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 index 8c474b05e3d..4a8ee9bdc71 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ListCloudBackupsActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudBackupsAction) 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 index 8b78eb77866..8eb8a9a81d9 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,15 +29,26 @@ * * Protobuf type {@code google.spanner.executor.v1.ListCloudDatabaseOperationsAction} */ -public final class ListCloudDatabaseOperationsAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListCloudDatabaseOperationsAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudDatabaseOperationsAction) ListCloudDatabaseOperationsActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCloudDatabaseOperationsAction"); + } + // Use ListCloudDatabaseOperationsAction.newBuilder() to construct. private ListCloudDatabaseOperationsAction( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +59,13 @@ private ListCloudDatabaseOperationsAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_fieldAccessorTable @@ -330,20 +336,20 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pageToken_); } getUnknownFields().writeTo(output); } @@ -354,20 +360,20 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -453,38 +459,38 @@ public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction p 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -508,7 +514,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -522,7 +528,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ListCloudDatabaseOperationsAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudDatabaseOperationsAction) com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder { @@ -532,7 +538,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_fieldAccessorTable @@ -544,7 +550,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -612,39 +618,6 @@ private void buildPartial0( } } - @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) { @@ -1301,17 +1274,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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) } 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 index da6d64705ac..885c26988d9 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ListCloudDatabaseOperationsActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudDatabaseOperationsAction) 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 index fa8d5b23f5e..863aabdbdf8 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ListCloudDatabasesAction} */ -public final class ListCloudDatabasesAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListCloudDatabasesAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudDatabasesAction) ListCloudDatabasesActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCloudDatabasesAction"); + } + // Use ListCloudDatabasesAction.newBuilder() to construct. - private ListCloudDatabasesAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListCloudDatabasesAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListCloudDatabasesAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_fieldAccessorTable @@ -263,17 +269,17 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -284,17 +290,17 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -377,38 +383,38 @@ public static com.google.spanner.executor.v1.ListCloudDatabasesAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -432,7 +438,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -446,7 +452,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ListCloudDatabasesAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudDatabasesAction) com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder { @@ -456,7 +462,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_fieldAccessorTable @@ -468,7 +474,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.ListCloudDatabasesAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -530,39 +536,6 @@ private void buildPartial0(com.google.spanner.executor.v1.ListCloudDatabasesActi } } - @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) { @@ -1065,17 +1038,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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) } 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 index 2822b743a8d..5e877fe4601 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ListCloudDatabasesActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudDatabasesAction) 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 index 8aaf4bdb788..07783c3dc33 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,15 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ListCloudInstanceConfigsAction} */ -public final class ListCloudInstanceConfigsAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListCloudInstanceConfigsAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudInstanceConfigsAction) ListCloudInstanceConfigsActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCloudInstanceConfigsAction"); + } + // Use ListCloudInstanceConfigsAction.newBuilder() to construct. - private ListCloudInstanceConfigsAction( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListCloudInstanceConfigsAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +56,13 @@ private ListCloudInstanceConfigsAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_fieldAccessorTable @@ -243,14 +248,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(2, pageSize_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } getUnknownFields().writeTo(output); } @@ -261,14 +266,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.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 += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -358,38 +363,38 @@ public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction pars 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -413,7 +418,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -427,7 +432,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ListCloudInstanceConfigsAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudInstanceConfigsAction) com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder { @@ -437,7 +442,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_fieldAccessorTable @@ -449,7 +454,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -513,39 +518,6 @@ private void buildPartial0( 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) { @@ -955,17 +927,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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) } 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 index 999637a43fa..f5605722c40 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ListCloudInstanceConfigsActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudInstanceConfigsAction) 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 index c26e682bf71..8c75267e142 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,28 +14,40 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** * * *
- * Action that lists Cloud Spanner databases.
+ * Action that lists Cloud Spanner instances.
  * 
* * Protobuf type {@code google.spanner.executor.v1.ListCloudInstancesAction} */ -public final class ListCloudInstancesAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListCloudInstancesAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudInstancesAction) ListCloudInstancesActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCloudInstancesAction"); + } + // Use ListCloudInstancesAction.newBuilder() to construct. - private ListCloudInstancesAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListCloudInstancesAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListCloudInstancesAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudInstancesAction_fieldAccessorTable @@ -330,17 +336,17 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(3, pageSize_); } if (((bitField0_ & 0x00000004) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); } getUnknownFields().writeTo(output); } @@ -351,17 +357,17 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + size += com.google.protobuf.GeneratedMessage.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 += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -459,38 +465,38 @@ public static com.google.spanner.executor.v1.ListCloudInstancesAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -514,7 +520,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -523,12 +529,12 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Action that lists Cloud Spanner databases.
+   * Action that lists Cloud Spanner instances.
    * 
* * Protobuf type {@code google.spanner.executor.v1.ListCloudInstancesAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudInstancesAction) com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder { @@ -538,7 +544,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ListCloudInstancesAction_fieldAccessorTable @@ -550,7 +556,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.ListCloudInstancesAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -617,39 +623,6 @@ private void buildPartial0(com.google.spanner.executor.v1.ListCloudInstancesActi 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) { @@ -1231,17 +1204,6 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { 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) } 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 index f16c93ec6d7..05a23503d17 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ListCloudInstancesActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudInstancesAction) 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 index 36ac9dc1563..e1b8bc62386 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.MutationAction} */ -public final class MutationAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MutationAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.MutationAction) MutationActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MutationAction"); + } + // Use MutationAction.newBuilder() to construct. - private MutationAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MutationAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_MutationAction_fieldAccessorTable @@ -244,14 +250,24 @@ public interface InsertArgsOrBuilder * * Protobuf type {@code google.spanner.executor.v1.MutationAction.InsertArgs} */ - public static final class InsertArgs extends com.google.protobuf.GeneratedMessageV3 + public static final class InsertArgs extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.MutationAction.InsertArgs) InsertArgsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InsertArgs"); + } + // Use InsertArgs.newBuilder() to construct. - private InsertArgs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private InsertArgs(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -261,19 +277,13 @@ private InsertArgs() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_fieldAccessorTable @@ -516,7 +526,7 @@ public final boolean isInitialized() { @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)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, column_.getRaw(i)); } for (int i = 0; i < type_.size(); i++) { output.writeMessage(2, type_.get(i)); @@ -631,38 +641,38 @@ public static com.google.spanner.executor.v1.MutationAction.InsertArgs parseFrom 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -686,8 +696,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -701,8 +710,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.executor.v1.MutationAction.InsertArgs} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.MutationAction.InsertArgs) com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder { @@ -712,7 +720,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_fieldAccessorTable @@ -724,7 +732,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.MutationAction.InsertArgs.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -812,41 +820,6 @@ private void buildPartial0(com.google.spanner.executor.v1.MutationAction.InsertA } } - @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) { @@ -889,8 +862,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.MutationAction.InsertArg type_ = other.type_; bitField0_ = (bitField0_ & ~0x00000002); typeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTypeFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTypeFieldBuilder() : null; } else { typeBuilder_.addAllMessages(other.type_); @@ -916,8 +889,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.MutationAction.InsertArg values_ = other.values_; bitField0_ = (bitField0_ & ~0x00000004); valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getValuesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetValuesFieldBuilder() : null; } else { valuesBuilder_.addAllMessages(other.values_); @@ -1193,7 +1166,7 @@ private void ensureTypeIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> @@ -1449,7 +1422,7 @@ public Builder removeType(int index) { * repeated .google.spanner.v1.Type type = 2; */ public com.google.spanner.v1.Type.Builder getTypeBuilder(int index) { - return getTypeFieldBuilder().getBuilder(index); + return internalGetTypeFieldBuilder().getBuilder(index); } /** @@ -1496,7 +1469,8 @@ public java.util.List getTypeOrBu * repeated .google.spanner.v1.Type type = 2; */ public com.google.spanner.v1.Type.Builder addTypeBuilder() { - return getTypeFieldBuilder().addBuilder(com.google.spanner.v1.Type.getDefaultInstance()); + return internalGetTypeFieldBuilder() + .addBuilder(com.google.spanner.v1.Type.getDefaultInstance()); } /** @@ -1509,7 +1483,7 @@ public com.google.spanner.v1.Type.Builder addTypeBuilder() { * repeated .google.spanner.v1.Type type = 2; */ public com.google.spanner.v1.Type.Builder addTypeBuilder(int index) { - return getTypeFieldBuilder() + return internalGetTypeFieldBuilder() .addBuilder(index, com.google.spanner.v1.Type.getDefaultInstance()); } @@ -1523,17 +1497,17 @@ public com.google.spanner.v1.Type.Builder addTypeBuilder(int index) { * repeated .google.spanner.v1.Type type = 2; */ public java.util.List getTypeBuilderList() { - return getTypeFieldBuilder().getBuilderList(); + return internalGetTypeFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> - getTypeFieldBuilder() { + internalGetTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder>( @@ -1553,7 +1527,7 @@ private void ensureValuesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> @@ -1812,7 +1786,7 @@ public Builder removeValues(int index) { * repeated .google.spanner.executor.v1.ValueList values = 3; */ public com.google.spanner.executor.v1.ValueList.Builder getValuesBuilder(int index) { - return getValuesFieldBuilder().getBuilder(index); + return internalGetValuesFieldBuilder().getBuilder(index); } /** @@ -1860,7 +1834,7 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getValuesOrBuilder(int * repeated .google.spanner.executor.v1.ValueList values = 3; */ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder() { - return getValuesFieldBuilder() + return internalGetValuesFieldBuilder() .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -1874,7 +1848,7 @@ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder() { * repeated .google.spanner.executor.v1.ValueList values = 3; */ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder(int index) { - return getValuesFieldBuilder() + return internalGetValuesFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -1889,17 +1863,17 @@ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder(int ind */ public java.util.List getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); + return internalGetValuesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> - getValuesFieldBuilder() { + internalGetValuesFieldBuilder() { if (valuesBuilder_ == null) { valuesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder>( @@ -1909,18 +1883,6 @@ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder(int ind 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) } @@ -2153,14 +2115,24 @@ public interface UpdateArgsOrBuilder * * Protobuf type {@code google.spanner.executor.v1.MutationAction.UpdateArgs} */ - public static final class UpdateArgs extends com.google.protobuf.GeneratedMessageV3 + public static final class UpdateArgs extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.MutationAction.UpdateArgs) UpdateArgsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateArgs"); + } + // Use UpdateArgs.newBuilder() to construct. - private UpdateArgs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateArgs(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -2170,19 +2142,13 @@ private UpdateArgs() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_fieldAccessorTable @@ -2425,7 +2391,7 @@ public final boolean isInitialized() { @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)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, column_.getRaw(i)); } for (int i = 0; i < type_.size(); i++) { output.writeMessage(2, type_.get(i)); @@ -2540,38 +2506,38 @@ public static com.google.spanner.executor.v1.MutationAction.UpdateArgs parseFrom 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2595,8 +2561,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2610,8 +2575,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.executor.v1.MutationAction.UpdateArgs} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.MutationAction.UpdateArgs) com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder { @@ -2621,7 +2585,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_fieldAccessorTable @@ -2633,7 +2597,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.MutationAction.UpdateArgs.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2721,41 +2685,6 @@ private void buildPartial0(com.google.spanner.executor.v1.MutationAction.UpdateA } } - @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) { @@ -2798,8 +2727,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.MutationAction.UpdateArg type_ = other.type_; bitField0_ = (bitField0_ & ~0x00000002); typeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTypeFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTypeFieldBuilder() : null; } else { typeBuilder_.addAllMessages(other.type_); @@ -2825,8 +2754,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.MutationAction.UpdateArg values_ = other.values_; bitField0_ = (bitField0_ & ~0x00000004); valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getValuesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetValuesFieldBuilder() : null; } else { valuesBuilder_.addAllMessages(other.values_); @@ -3102,7 +3031,7 @@ private void ensureTypeIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> @@ -3358,7 +3287,7 @@ public Builder removeType(int index) { * repeated .google.spanner.v1.Type type = 2; */ public com.google.spanner.v1.Type.Builder getTypeBuilder(int index) { - return getTypeFieldBuilder().getBuilder(index); + return internalGetTypeFieldBuilder().getBuilder(index); } /** @@ -3405,7 +3334,8 @@ public java.util.List getTypeOrBu * repeated .google.spanner.v1.Type type = 2; */ public com.google.spanner.v1.Type.Builder addTypeBuilder() { - return getTypeFieldBuilder().addBuilder(com.google.spanner.v1.Type.getDefaultInstance()); + return internalGetTypeFieldBuilder() + .addBuilder(com.google.spanner.v1.Type.getDefaultInstance()); } /** @@ -3418,7 +3348,7 @@ public com.google.spanner.v1.Type.Builder addTypeBuilder() { * repeated .google.spanner.v1.Type type = 2; */ public com.google.spanner.v1.Type.Builder addTypeBuilder(int index) { - return getTypeFieldBuilder() + return internalGetTypeFieldBuilder() .addBuilder(index, com.google.spanner.v1.Type.getDefaultInstance()); } @@ -3432,17 +3362,17 @@ public com.google.spanner.v1.Type.Builder addTypeBuilder(int index) { * repeated .google.spanner.v1.Type type = 2; */ public java.util.List getTypeBuilderList() { - return getTypeFieldBuilder().getBuilderList(); + return internalGetTypeFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> - getTypeFieldBuilder() { + internalGetTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder>( @@ -3462,7 +3392,7 @@ private void ensureValuesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> @@ -3721,7 +3651,7 @@ public Builder removeValues(int index) { * repeated .google.spanner.executor.v1.ValueList values = 3; */ public com.google.spanner.executor.v1.ValueList.Builder getValuesBuilder(int index) { - return getValuesFieldBuilder().getBuilder(index); + return internalGetValuesFieldBuilder().getBuilder(index); } /** @@ -3769,7 +3699,7 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getValuesOrBuilder(int * repeated .google.spanner.executor.v1.ValueList values = 3; */ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder() { - return getValuesFieldBuilder() + return internalGetValuesFieldBuilder() .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -3783,7 +3713,7 @@ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder() { * repeated .google.spanner.executor.v1.ValueList values = 3; */ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder(int index) { - return getValuesFieldBuilder() + return internalGetValuesFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -3798,17 +3728,17 @@ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder(int ind */ public java.util.List getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); + return internalGetValuesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> - getValuesFieldBuilder() { + internalGetValuesFieldBuilder() { if (valuesBuilder_ == null) { valuesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder>( @@ -3818,18 +3748,6 @@ public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder(int ind 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) } @@ -4113,14 +4031,24 @@ public interface ModOrBuilder * * Protobuf type {@code google.spanner.executor.v1.MutationAction.Mod} */ - public static final class Mod extends com.google.protobuf.GeneratedMessageV3 + public static final class Mod extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.MutationAction.Mod) ModOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Mod"); + } + // Use Mod.newBuilder() to construct. - private Mod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Mod(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -4128,19 +4056,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_MutationAction_Mod_fieldAccessorTable @@ -4486,8 +4408,8 @@ public final boolean isInitialized() { @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, table_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getInsert()); @@ -4513,8 +4435,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, table_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInsert()); @@ -4643,38 +4565,38 @@ public static com.google.spanner.executor.v1.MutationAction.Mod parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -4697,8 +4619,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -4714,8 +4635,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.executor.v1.MutationAction.Mod} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.MutationAction.Mod) com.google.spanner.executor.v1.MutationAction.ModOrBuilder { @@ -4725,7 +4645,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_MutationAction_Mod_fieldAccessorTable @@ -4739,18 +4659,18 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInsertFieldBuilder(); - getUpdateFieldBuilder(); - getInsertOrUpdateFieldBuilder(); - getReplaceFieldBuilder(); - getDeleteKeysFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInsertFieldBuilder(); + internalGetUpdateFieldBuilder(); + internalGetInsertOrUpdateFieldBuilder(); + internalGetReplaceFieldBuilder(); + internalGetDeleteKeysFieldBuilder(); } } @@ -4849,41 +4769,6 @@ private void buildPartial0(com.google.spanner.executor.v1.MutationAction.Mod res 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.MutationAction.Mod) { @@ -4951,32 +4836,36 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getInsertFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInsertFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getUpdateFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( - getInsertOrUpdateFieldBuilder().getBuilder(), extensionRegistry); + internalGetInsertOrUpdateFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { - input.readMessage(getReplaceFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetReplaceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 case 50: { - input.readMessage(getDeleteKeysFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetDeleteKeysFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 @@ -5111,7 +5000,7 @@ public Builder setTableBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.executor.v1.MutationAction.InsertArgs insert_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.InsertArgs, com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> @@ -5266,7 +5155,7 @@ public Builder clearInsert() { public com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder getInsertBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getInsertFieldBuilder().getBuilder(); + return internalGetInsertFieldBuilder().getBuilder(); } /** @@ -5300,14 +5189,14 @@ public com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder getInser * * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.InsertArgs, com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> - getInsertFieldBuilder() { + internalGetInsertFieldBuilder() { if (insertBuilder_ == null) { insertBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.InsertArgs, com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder>( @@ -5318,7 +5207,7 @@ public com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder getInser } private com.google.spanner.executor.v1.MutationAction.UpdateArgs update_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.UpdateArgs, com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder, com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder> @@ -5466,7 +5355,7 @@ public Builder clearUpdate() { public com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder getUpdateBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getUpdateFieldBuilder().getBuilder(); + return internalGetUpdateFieldBuilder().getBuilder(); } /** @@ -5498,14 +5387,14 @@ public com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder getUpdat * * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.UpdateArgs, com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder, com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder> - getUpdateFieldBuilder() { + internalGetUpdateFieldBuilder() { if (updateBuilder_ == null) { updateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.UpdateArgs, com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder, com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder>( @@ -5516,7 +5405,7 @@ public com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder getUpdat } private com.google.spanner.executor.v1.MutationAction.InsertArgs insertOrUpdate_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.InsertArgs, com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> @@ -5667,7 +5556,7 @@ public Builder clearInsertOrUpdate() { getInsertOrUpdateBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getInsertOrUpdateFieldBuilder().getBuilder(); + return internalGetInsertOrUpdateFieldBuilder().getBuilder(); } /** @@ -5699,14 +5588,14 @@ public Builder clearInsertOrUpdate() { * * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.InsertArgs, com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> - getInsertOrUpdateFieldBuilder() { + internalGetInsertOrUpdateFieldBuilder() { if (insertOrUpdateBuilder_ == null) { insertOrUpdateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.InsertArgs, com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder>( @@ -5717,7 +5606,7 @@ public Builder clearInsertOrUpdate() { } private com.google.spanner.executor.v1.MutationAction.InsertArgs replace_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.InsertArgs, com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> @@ -5865,7 +5754,7 @@ public Builder clearReplace() { public com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder getReplaceBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getReplaceFieldBuilder().getBuilder(); + return internalGetReplaceFieldBuilder().getBuilder(); } /** @@ -5897,14 +5786,14 @@ public com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder getRepla * * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.InsertArgs, com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> - getReplaceFieldBuilder() { + internalGetReplaceFieldBuilder() { if (replaceBuilder_ == null) { replaceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction.InsertArgs, com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder>( @@ -5915,7 +5804,7 @@ public com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder getRepla } private com.google.spanner.executor.v1.KeySet deleteKeys_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.KeySet, com.google.spanner.executor.v1.KeySet.Builder, com.google.spanner.executor.v1.KeySetOrBuilder> @@ -6060,7 +5949,7 @@ public Builder clearDeleteKeys() { public com.google.spanner.executor.v1.KeySet.Builder getDeleteKeysBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getDeleteKeysFieldBuilder().getBuilder(); + return internalGetDeleteKeysFieldBuilder().getBuilder(); } /** @@ -6091,14 +5980,14 @@ public com.google.spanner.executor.v1.KeySetOrBuilder getDeleteKeysOrBuilder() { * * .google.spanner.executor.v1.KeySet delete_keys = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.KeySet, com.google.spanner.executor.v1.KeySet.Builder, com.google.spanner.executor.v1.KeySetOrBuilder> - getDeleteKeysFieldBuilder() { + internalGetDeleteKeysFieldBuilder() { if (deleteKeysBuilder_ == null) { deleteKeysBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.KeySet, com.google.spanner.executor.v1.KeySet.Builder, com.google.spanner.executor.v1.KeySetOrBuilder>( @@ -6108,18 +5997,6 @@ public com.google.spanner.executor.v1.KeySetOrBuilder getDeleteKeysOrBuilder() { 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) } @@ -6351,38 +6228,38 @@ public static com.google.spanner.executor.v1.MutationAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -6405,7 +6282,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -6419,7 +6296,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.MutationAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.MutationAction) com.google.spanner.executor.v1.MutationActionOrBuilder { @@ -6429,7 +6306,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_MutationAction_fieldAccessorTable @@ -6441,7 +6318,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.MutationAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -6507,39 +6384,6 @@ 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) { @@ -6571,8 +6415,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.MutationAction other) { mod_ = other.mod_; bitField0_ = (bitField0_ & ~0x00000001); modBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getModFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetModFieldBuilder() : null; } else { modBuilder_.addAllMessages(other.mod_); @@ -6648,7 +6492,7 @@ private void ensureModIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.MutationAction.Mod, com.google.spanner.executor.v1.MutationAction.Mod.Builder, com.google.spanner.executor.v1.MutationAction.ModOrBuilder> @@ -6908,7 +6752,7 @@ public Builder removeMod(int index) { * 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); + return internalGetModFieldBuilder().getBuilder(index); } /** @@ -6956,7 +6800,7 @@ public com.google.spanner.executor.v1.MutationAction.ModOrBuilder getModOrBuilde * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; */ public com.google.spanner.executor.v1.MutationAction.Mod.Builder addModBuilder() { - return getModFieldBuilder() + return internalGetModFieldBuilder() .addBuilder(com.google.spanner.executor.v1.MutationAction.Mod.getDefaultInstance()); } @@ -6970,7 +6814,7 @@ public com.google.spanner.executor.v1.MutationAction.Mod.Builder addModBuilder() * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; */ public com.google.spanner.executor.v1.MutationAction.Mod.Builder addModBuilder(int index) { - return getModFieldBuilder() + return internalGetModFieldBuilder() .addBuilder( index, com.google.spanner.executor.v1.MutationAction.Mod.getDefaultInstance()); } @@ -6986,17 +6830,17 @@ public com.google.spanner.executor.v1.MutationAction.Mod.Builder addModBuilder(i */ public java.util.List getModBuilderList() { - return getModFieldBuilder().getBuilderList(); + return internalGetModFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.MutationAction.Mod, com.google.spanner.executor.v1.MutationAction.Mod.Builder, com.google.spanner.executor.v1.MutationAction.ModOrBuilder> - getModFieldBuilder() { + internalGetModFieldBuilder() { if (modBuilder_ == null) { modBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.MutationAction.Mod, com.google.spanner.executor.v1.MutationAction.Mod.Builder, com.google.spanner.executor.v1.MutationAction.ModOrBuilder>( @@ -7006,17 +6850,6 @@ public com.google.spanner.executor.v1.MutationAction.Mod.Builder addModBuilder(i 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) } 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 index 5700c3a2812..06622159be6 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface MutationActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.MutationAction) 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 index 1f6a2b03988..7e35e7eb968 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.OperationResponse} */ -public final class OperationResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class OperationResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.OperationResponse) OperationResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationResponse"); + } + // Use OperationResponse.newBuilder() to construct. - private OperationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private OperationResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private OperationResponse() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_OperationResponse_fieldAccessorTable @@ -263,8 +269,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getOperation()); @@ -281,8 +287,8 @@ public int getSerializedSize() { 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOperation()); @@ -372,38 +378,38 @@ public static com.google.spanner.executor.v1.OperationResponse parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -426,7 +432,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -440,7 +446,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.OperationResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.OperationResponse) com.google.spanner.executor.v1.OperationResponseOrBuilder { @@ -450,7 +456,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_OperationResponse_fieldAccessorTable @@ -464,15 +470,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getListedOperationsFieldBuilder(); - getOperationFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetListedOperationsFieldBuilder(); + internalGetOperationFieldBuilder(); } } @@ -554,39 +560,6 @@ private void buildPartial0(com.google.spanner.executor.v1.OperationResponse resu 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.OperationResponse) { @@ -619,8 +592,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.OperationResponse other) listedOperations_ = other.listedOperations_; bitField0_ = (bitField0_ & ~0x00000001); listedOperationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getListedOperationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetListedOperationsFieldBuilder() : null; } else { listedOperationsBuilder_.addAllMessages(other.listedOperations_); @@ -681,7 +654,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getOperationFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOperationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -715,7 +689,7 @@ private void ensureListedOperationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> @@ -974,7 +948,7 @@ public Builder removeListedOperations(int index) { * repeated .google.longrunning.Operation listed_operations = 1; */ public com.google.longrunning.Operation.Builder getListedOperationsBuilder(int index) { - return getListedOperationsFieldBuilder().getBuilder(index); + return internalGetListedOperationsFieldBuilder().getBuilder(index); } /** @@ -1022,7 +996,7 @@ public com.google.longrunning.OperationOrBuilder getListedOperationsOrBuilder(in * repeated .google.longrunning.Operation listed_operations = 1; */ public com.google.longrunning.Operation.Builder addListedOperationsBuilder() { - return getListedOperationsFieldBuilder() + return internalGetListedOperationsFieldBuilder() .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); } @@ -1036,7 +1010,7 @@ public com.google.longrunning.Operation.Builder addListedOperationsBuilder() { * repeated .google.longrunning.Operation listed_operations = 1; */ public com.google.longrunning.Operation.Builder addListedOperationsBuilder(int index) { - return getListedOperationsFieldBuilder() + return internalGetListedOperationsFieldBuilder() .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); } @@ -1051,17 +1025,17 @@ public com.google.longrunning.Operation.Builder addListedOperationsBuilder(int i */ public java.util.List getListedOperationsBuilderList() { - return getListedOperationsFieldBuilder().getBuilderList(); + return internalGetListedOperationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> - getListedOperationsFieldBuilder() { + internalGetListedOperationsFieldBuilder() { if (listedOperationsBuilder_ == null) { listedOperationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( @@ -1191,7 +1165,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { } private com.google.longrunning.Operation operation_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> @@ -1336,7 +1310,7 @@ public Builder clearOperation() { public com.google.longrunning.Operation.Builder getOperationBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getOperationFieldBuilder().getBuilder(); + return internalGetOperationFieldBuilder().getBuilder(); } /** @@ -1367,14 +1341,14 @@ public com.google.longrunning.OperationOrBuilder getOperationOrBuilder() { * * .google.longrunning.Operation operation = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> - getOperationFieldBuilder() { + internalGetOperationFieldBuilder() { if (operationBuilder_ == null) { operationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( @@ -1384,17 +1358,6 @@ public com.google.longrunning.OperationOrBuilder getOperationOrBuilder() { 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) } 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 index 209ede1f53b..e14a77029a4 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface OperationResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.OperationResponse) 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 index eb41323041f..409b254f30d 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.executor.v1.PartitionedUpdateAction} */ -public final class PartitionedUpdateAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PartitionedUpdateAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.PartitionedUpdateAction) PartitionedUpdateActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartitionedUpdateAction"); + } + // Use PartitionedUpdateAction.newBuilder() to construct. - private PartitionedUpdateAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartitionedUpdateAction(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_fieldAccessorTable @@ -152,15 +158,25 @@ public interface ExecutePartitionedUpdateOptionsOrBuilder * google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions} */ public static final class ExecutePartitionedUpdateOptions - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions) ExecutePartitionedUpdateOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExecutePartitionedUpdateOptions"); + } + // Use ExecutePartitionedUpdateOptions.newBuilder() to construct. private ExecutePartitionedUpdateOptions( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -169,19 +185,13 @@ private ExecutePartitionedUpdateOptions() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_fieldAccessorTable @@ -333,7 +343,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeEnum(1, rpcPriority_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + com.google.protobuf.GeneratedMessage.writeString(output, 2, tag_); } getUnknownFields().writeTo(output); } @@ -348,7 +358,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, rpcPriority_); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tag_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -448,7 +458,7 @@ public int hashCode() { 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); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.PartitionedUpdateAction @@ -456,14 +466,14 @@ public int hashCode() { parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.PartitionedUpdateAction @@ -471,14 +481,14 @@ public int hashCode() { parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.PartitionedUpdateAction @@ -487,7 +497,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -512,8 +522,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -522,8 +531,7 @@ protected Builder newBuilderForType( * Protobuf type {@code * google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions) com.google.spanner.executor.v1.PartitionedUpdateAction @@ -534,7 +542,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_fieldAccessorTable @@ -549,7 +557,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -616,41 +624,6 @@ private void buildPartial0( 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 @@ -674,7 +647,7 @@ public Builder mergeFrom( == com.google.spanner.executor.v1.PartitionedUpdateAction .ExecutePartitionedUpdateOptions.getDefaultInstance()) return this; if (other.hasRpcPriority()) { - setRpcPriority(other.getRpcPriority()); + setRpcPriorityValue(other.getRpcPriorityValue()); } if (other.hasTag()) { tag_ = other.tag_; @@ -975,18 +948,6 @@ public Builder setTagBytes(com.google.protobuf.ByteString value) { 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) } @@ -1285,38 +1246,38 @@ public static com.google.spanner.executor.v1.PartitionedUpdateAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1340,7 +1301,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1355,7 +1316,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.PartitionedUpdateAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.PartitionedUpdateAction) com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder { @@ -1365,7 +1326,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_fieldAccessorTable @@ -1379,15 +1340,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getOptionsFieldBuilder(); - getUpdateFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOptionsFieldBuilder(); + internalGetUpdateFieldBuilder(); } } @@ -1453,39 +1414,6 @@ private void buildPartial0(com.google.spanner.executor.v1.PartitionedUpdateActio 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) { @@ -1533,13 +1461,13 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetUpdateFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -1564,7 +1492,7 @@ public Builder mergeFrom( private com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions, com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions .Builder, @@ -1738,7 +1666,7 @@ public Builder clearOptions() { getOptionsBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOptionsFieldBuilder().getBuilder(); + return internalGetOptionsFieldBuilder().getBuilder(); } /** @@ -1776,16 +1704,16 @@ public Builder clearOptions() { * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions, com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions .Builder, com.google.spanner.executor.v1.PartitionedUpdateAction .ExecutePartitionedUpdateOptionsOrBuilder> - getOptionsFieldBuilder() { + internalGetOptionsFieldBuilder() { if (optionsBuilder_ == null) { optionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.PartitionedUpdateAction .ExecutePartitionedUpdateOptions, com.google.spanner.executor.v1.PartitionedUpdateAction @@ -1799,7 +1727,7 @@ public Builder clearOptions() { } private com.google.spanner.executor.v1.QueryAction update_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> @@ -1944,7 +1872,7 @@ public Builder clearUpdate() { public com.google.spanner.executor.v1.QueryAction.Builder getUpdateBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateFieldBuilder().getBuilder(); + return internalGetUpdateFieldBuilder().getBuilder(); } /** @@ -1975,14 +1903,14 @@ public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdateOrBuilder() * * .google.spanner.executor.v1.QueryAction update = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> - getUpdateFieldBuilder() { + internalGetUpdateFieldBuilder() { if (updateBuilder_ == null) { updateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder>( @@ -1992,17 +1920,6 @@ public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdateOrBuilder() 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) } 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 index dba9e84c6b0..b369d382833 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface PartitionedUpdateActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.PartitionedUpdateAction) 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 index bf1183f6c37..80f44547aae 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.QueryAction} */ -public final class QueryAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class QueryAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.QueryAction) QueryActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryAction"); + } + // Use QueryAction.newBuilder() to construct. - private QueryAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private QueryAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private QueryAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_QueryAction_fieldAccessorTable @@ -180,14 +186,24 @@ public interface ParameterOrBuilder * * Protobuf type {@code google.spanner.executor.v1.QueryAction.Parameter} */ - public static final class Parameter extends com.google.protobuf.GeneratedMessageV3 + public static final class Parameter extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.QueryAction.Parameter) ParameterOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Parameter"); + } + // Use Parameter.newBuilder() to construct. - private Parameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Parameter(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -195,19 +211,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_QueryAction_Parameter_fieldAccessorTable @@ -382,8 +392,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getType()); @@ -400,8 +410,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); @@ -497,38 +507,38 @@ public static com.google.spanner.executor.v1.QueryAction.Parameter parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -552,8 +562,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -567,8 +576,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.executor.v1.QueryAction.Parameter} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.QueryAction.Parameter) com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder { @@ -578,7 +586,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_QueryAction_Parameter_fieldAccessorTable @@ -592,15 +600,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTypeFieldBuilder(); - getValueFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTypeFieldBuilder(); + internalGetValueFieldBuilder(); } } @@ -670,41 +678,6 @@ private void buildPartial0(com.google.spanner.executor.v1.QueryAction.Parameter 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.QueryAction.Parameter) { @@ -763,13 +736,13 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getValueFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetValueFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -904,7 +877,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.Type type_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> @@ -1047,7 +1020,7 @@ public Builder clearType() { public com.google.spanner.v1.Type.Builder getTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTypeFieldBuilder().getBuilder(); + return internalGetTypeFieldBuilder().getBuilder(); } /** @@ -1076,14 +1049,14 @@ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { * * .google.spanner.v1.Type type = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> - getTypeFieldBuilder() { + internalGetTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder>( @@ -1094,7 +1067,7 @@ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { } private com.google.spanner.executor.v1.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.Value, com.google.spanner.executor.v1.Value.Builder, com.google.spanner.executor.v1.ValueOrBuilder> @@ -1239,7 +1212,7 @@ public Builder clearValue() { public com.google.spanner.executor.v1.Value.Builder getValueBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getValueFieldBuilder().getBuilder(); + return internalGetValueFieldBuilder().getBuilder(); } /** @@ -1270,14 +1243,14 @@ public com.google.spanner.executor.v1.ValueOrBuilder getValueOrBuilder() { * * .google.spanner.executor.v1.Value value = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.Value, com.google.spanner.executor.v1.Value.Builder, com.google.spanner.executor.v1.ValueOrBuilder> - getValueFieldBuilder() { + internalGetValueFieldBuilder() { if (valueBuilder_ == null) { valueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.Value, com.google.spanner.executor.v1.Value.Builder, com.google.spanner.executor.v1.ValueOrBuilder>( @@ -1287,18 +1260,6 @@ public com.google.spanner.executor.v1.ValueOrBuilder getValueOrBuilder() { 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) } @@ -1495,8 +1456,8 @@ public final boolean isInitialized() { @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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, sql_); } for (int i = 0; i < params_.size(); i++) { output.writeMessage(2, params_.get(i)); @@ -1510,8 +1471,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sql_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sql_); } for (int i = 0; i < params_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, params_.get(i)); @@ -1593,38 +1554,38 @@ public static com.google.spanner.executor.v1.QueryAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1647,7 +1608,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1661,7 +1622,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.QueryAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.QueryAction) com.google.spanner.executor.v1.QueryActionOrBuilder { @@ -1671,7 +1632,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_QueryAction_fieldAccessorTable @@ -1683,7 +1644,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.QueryAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1753,39 +1714,6 @@ private void buildPartial0(com.google.spanner.executor.v1.QueryAction result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.executor.v1.QueryAction) { @@ -1822,8 +1750,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.QueryAction other) { params_ = other.params_; bitField0_ = (bitField0_ & ~0x00000002); paramsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getParamsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetParamsFieldBuilder() : null; } else { paramsBuilder_.addAllMessages(other.params_); @@ -2017,7 +1945,7 @@ private void ensureParamsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.QueryAction.Parameter, com.google.spanner.executor.v1.QueryAction.Parameter.Builder, com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder> @@ -2280,7 +2208,7 @@ public Builder removeParams(int index) { */ public com.google.spanner.executor.v1.QueryAction.Parameter.Builder getParamsBuilder( int index) { - return getParamsFieldBuilder().getBuilder(index); + return internalGetParamsFieldBuilder().getBuilder(index); } /** @@ -2329,7 +2257,7 @@ public com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder getParamsOr * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; */ public com.google.spanner.executor.v1.QueryAction.Parameter.Builder addParamsBuilder() { - return getParamsFieldBuilder() + return internalGetParamsFieldBuilder() .addBuilder(com.google.spanner.executor.v1.QueryAction.Parameter.getDefaultInstance()); } @@ -2344,7 +2272,7 @@ public com.google.spanner.executor.v1.QueryAction.Parameter.Builder addParamsBui */ public com.google.spanner.executor.v1.QueryAction.Parameter.Builder addParamsBuilder( int index) { - return getParamsFieldBuilder() + return internalGetParamsFieldBuilder() .addBuilder( index, com.google.spanner.executor.v1.QueryAction.Parameter.getDefaultInstance()); } @@ -2360,17 +2288,17 @@ public com.google.spanner.executor.v1.QueryAction.Parameter.Builder addParamsBui */ public java.util.List getParamsBuilderList() { - return getParamsFieldBuilder().getBuilderList(); + return internalGetParamsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.QueryAction.Parameter, com.google.spanner.executor.v1.QueryAction.Parameter.Builder, com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder> - getParamsFieldBuilder() { + internalGetParamsFieldBuilder() { if (paramsBuilder_ == null) { paramsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.QueryAction.Parameter, com.google.spanner.executor.v1.QueryAction.Parameter.Builder, com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder>( @@ -2380,17 +2308,6 @@ public com.google.spanner.executor.v1.QueryAction.Parameter.Builder addParamsBui 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) } 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 index ed7de173c07..f1e479598c0 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface QueryActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.QueryAction) diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryCancellationAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryCancellationAction.java index d1fd4b5f116..ffe852b0941 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryCancellationAction.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryCancellationAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.executor.v1.QueryCancellationAction} */ -public final class QueryCancellationAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class QueryCancellationAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.QueryCancellationAction) QueryCancellationActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryCancellationAction"); + } + // Use QueryCancellationAction.newBuilder() to construct. - private QueryCancellationAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private QueryCancellationAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private QueryCancellationAction() { cancelQuery_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryCancellationAction(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_QueryCancellationAction_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_QueryCancellationAction_fieldAccessorTable @@ -186,11 +192,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longRunningSql_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, longRunningSql_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(longRunningSql_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, longRunningSql_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cancelQuery_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cancelQuery_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cancelQuery_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cancelQuery_); } getUnknownFields().writeTo(output); } @@ -201,11 +207,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(longRunningSql_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, longRunningSql_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(longRunningSql_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, longRunningSql_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cancelQuery_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cancelQuery_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cancelQuery_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cancelQuery_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -282,38 +288,38 @@ public static com.google.spanner.executor.v1.QueryCancellationAction parseFrom( public static com.google.spanner.executor.v1.QueryCancellationAction parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.QueryCancellationAction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.executor.v1.QueryCancellationAction parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.QueryCancellationAction parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.executor.v1.QueryCancellationAction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.QueryCancellationAction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -337,7 +343,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -352,7 +358,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.QueryCancellationAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.QueryCancellationAction) com.google.spanner.executor.v1.QueryCancellationActionOrBuilder { @@ -362,7 +368,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_QueryCancellationAction_fieldAccessorTable @@ -374,7 +380,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.QueryCancellationAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -428,39 +434,6 @@ private void buildPartial0(com.google.spanner.executor.v1.QueryCancellationActio } } - @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.QueryCancellationAction) { @@ -763,17 +736,6 @@ public Builder setCancelQueryBytes(com.google.protobuf.ByteString value) { 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.QueryCancellationAction) } diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryCancellationActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryCancellationActionOrBuilder.java index 785008751a9..74bf2fe5e7f 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryCancellationActionOrBuilder.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryCancellationActionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface QueryCancellationActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.QueryCancellationAction) 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 index 94944dec3fe..23bde12400c 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.QueryResult} */ -public final class QueryResult extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class QueryResult extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.QueryResult) QueryResultOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryResult"); + } + // Use QueryResult.newBuilder() to construct. - private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private QueryResult(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_QueryResult_fieldAccessorTable @@ -312,38 +318,38 @@ public static com.google.spanner.executor.v1.QueryResult parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -366,7 +372,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -380,7 +386,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.QueryResult} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.QueryResult) com.google.spanner.executor.v1.QueryResultOrBuilder { @@ -390,7 +396,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_QueryResult_fieldAccessorTable @@ -404,15 +410,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRowFieldBuilder(); - getRowTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRowFieldBuilder(); + internalGetRowTypeFieldBuilder(); } } @@ -489,39 +495,6 @@ private void buildPartial0(com.google.spanner.executor.v1.QueryResult result) { 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) { @@ -553,8 +526,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.QueryResult other) { row_ = other.row_; bitField0_ = (bitField0_ & ~0x00000001); rowBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRowFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRowFieldBuilder() : null; } else { rowBuilder_.addAllMessages(other.row_); @@ -605,7 +578,7 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getRowTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetRowTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -638,7 +611,7 @@ private void ensureRowIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> @@ -910,7 +883,7 @@ public Builder removeRow(int index) { * repeated .google.spanner.executor.v1.ValueList row = 1; */ public com.google.spanner.executor.v1.ValueList.Builder getRowBuilder(int index) { - return getRowFieldBuilder().getBuilder(index); + return internalGetRowFieldBuilder().getBuilder(index); } /** @@ -961,7 +934,7 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getRowOrBuilder(int ind * repeated .google.spanner.executor.v1.ValueList row = 1; */ public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder() { - return getRowFieldBuilder() + return internalGetRowFieldBuilder() .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -976,7 +949,7 @@ public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder() { * repeated .google.spanner.executor.v1.ValueList row = 1; */ public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder(int index) { - return getRowFieldBuilder() + return internalGetRowFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -991,17 +964,17 @@ public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder(int index) * repeated .google.spanner.executor.v1.ValueList row = 1; */ public java.util.List getRowBuilderList() { - return getRowFieldBuilder().getBuilderList(); + return internalGetRowFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> - getRowFieldBuilder() { + internalGetRowFieldBuilder() { if (rowBuilder_ == null) { rowBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder>( @@ -1012,7 +985,7 @@ public java.util.List getRowBu } private com.google.spanner.v1.StructType rowType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> @@ -1155,7 +1128,7 @@ public Builder clearRowType() { public com.google.spanner.v1.StructType.Builder getRowTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRowTypeFieldBuilder().getBuilder(); + return internalGetRowTypeFieldBuilder().getBuilder(); } /** @@ -1184,14 +1157,14 @@ public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { * * optional .google.spanner.v1.StructType row_type = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> - getRowTypeFieldBuilder() { + internalGetRowTypeFieldBuilder() { if (rowTypeBuilder_ == null) { rowTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder>( @@ -1201,17 +1174,6 @@ public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { 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) } 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 index 7d1a2da8c06..70fd618004b 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface QueryResultOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.QueryResult) 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 index 16eb9b93ebc..5a915125408 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ReadAction} */ -public final class ReadAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ReadAction) ReadActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadAction"); + } + // Use ReadAction.newBuilder() to construct. - private ReadAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ReadAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ReadAction_fieldAccessorTable @@ -339,14 +345,14 @@ public final boolean isInitialized() { @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, table_); } if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, index_); + com.google.protobuf.GeneratedMessage.writeString(output, 2, index_); } for (int i = 0; i < column_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, column_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, column_.getRaw(i)); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getKeys()); @@ -363,11 +369,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, table_); } if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, index_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, index_); } { int dataSize = 0; @@ -479,38 +485,38 @@ public static com.google.spanner.executor.v1.ReadAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -533,7 +539,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -547,7 +553,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ReadAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ReadAction) com.google.spanner.executor.v1.ReadActionOrBuilder { @@ -557,7 +563,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ReadAction_fieldAccessorTable @@ -571,14 +577,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getKeysFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeysFieldBuilder(); } } @@ -653,39 +659,6 @@ private void buildPartial0(com.google.spanner.executor.v1.ReadAction result) { 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) { @@ -771,7 +744,7 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getKeysFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetKeysFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1221,7 +1194,7 @@ public Builder addColumnBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.executor.v1.KeySet keys_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.KeySet, com.google.spanner.executor.v1.KeySet.Builder, com.google.spanner.executor.v1.KeySetOrBuilder> @@ -1364,7 +1337,7 @@ public Builder clearKeys() { public com.google.spanner.executor.v1.KeySet.Builder getKeysBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getKeysFieldBuilder().getBuilder(); + return internalGetKeysFieldBuilder().getBuilder(); } /** @@ -1393,14 +1366,14 @@ public com.google.spanner.executor.v1.KeySetOrBuilder getKeysOrBuilder() { * * .google.spanner.executor.v1.KeySet keys = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.KeySet, com.google.spanner.executor.v1.KeySet.Builder, com.google.spanner.executor.v1.KeySetOrBuilder> - getKeysFieldBuilder() { + internalGetKeysFieldBuilder() { if (keysBuilder_ == null) { keysBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.KeySet, com.google.spanner.executor.v1.KeySet.Builder, com.google.spanner.executor.v1.KeySetOrBuilder>( @@ -1466,17 +1439,6 @@ public Builder clearLimit() { 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) } 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 index fcb44b1288c..a7233bc91ac 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ReadActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ReadAction) 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 index 199cd8cd3a4..f7fc7d204e7 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ReadResult} */ -public final class ReadResult extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadResult extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ReadResult) ReadResultOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadResult"); + } + // Use ReadResult.newBuilder() to construct. - private ReadResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadResult(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ReadResult() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ReadResult_fieldAccessorTable @@ -368,11 +374,11 @@ public final boolean isInitialized() { @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, table_); } if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, index_); + com.google.protobuf.GeneratedMessage.writeString(output, 2, index_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(3, requestIndex_); @@ -392,11 +398,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, table_); } if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, index_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, index_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, requestIndex_); @@ -508,38 +514,38 @@ public static com.google.spanner.executor.v1.ReadResult parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -562,7 +568,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -576,7 +582,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ReadResult} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ReadResult) com.google.spanner.executor.v1.ReadResultOrBuilder { @@ -586,7 +592,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ReadResult_fieldAccessorTable @@ -600,15 +606,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRowFieldBuilder(); - getRowTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRowFieldBuilder(); + internalGetRowTypeFieldBuilder(); } } @@ -699,39 +705,6 @@ private void buildPartial0(com.google.spanner.executor.v1.ReadResult result) { 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) { @@ -776,8 +749,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.ReadResult other) { row_ = other.row_; bitField0_ = (bitField0_ & ~0x00000008); rowBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRowFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRowFieldBuilder() : null; } else { rowBuilder_.addAllMessages(other.row_); @@ -846,7 +819,7 @@ public Builder mergeFrom( } // case 34 case 42: { - input.readMessage(getRowTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetRowTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -1188,7 +1161,7 @@ private void ensureRowIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> @@ -1460,7 +1433,7 @@ public Builder removeRow(int index) { * repeated .google.spanner.executor.v1.ValueList row = 4; */ public com.google.spanner.executor.v1.ValueList.Builder getRowBuilder(int index) { - return getRowFieldBuilder().getBuilder(index); + return internalGetRowFieldBuilder().getBuilder(index); } /** @@ -1511,7 +1484,7 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getRowOrBuilder(int ind * repeated .google.spanner.executor.v1.ValueList row = 4; */ public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder() { - return getRowFieldBuilder() + return internalGetRowFieldBuilder() .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -1526,7 +1499,7 @@ public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder() { * repeated .google.spanner.executor.v1.ValueList row = 4; */ public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder(int index) { - return getRowFieldBuilder() + return internalGetRowFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); } @@ -1541,17 +1514,17 @@ public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder(int index) * repeated .google.spanner.executor.v1.ValueList row = 4; */ public java.util.List getRowBuilderList() { - return getRowFieldBuilder().getBuilderList(); + return internalGetRowFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> - getRowFieldBuilder() { + internalGetRowFieldBuilder() { if (rowBuilder_ == null) { rowBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder>( @@ -1562,7 +1535,7 @@ public java.util.List getRowBu } private com.google.spanner.v1.StructType rowType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> @@ -1705,7 +1678,7 @@ public Builder clearRowType() { public com.google.spanner.v1.StructType.Builder getRowTypeBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getRowTypeFieldBuilder().getBuilder(); + return internalGetRowTypeFieldBuilder().getBuilder(); } /** @@ -1734,14 +1707,14 @@ public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { * * optional .google.spanner.v1.StructType row_type = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> - getRowTypeFieldBuilder() { + internalGetRowTypeFieldBuilder() { if (rowTypeBuilder_ == null) { rowTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder>( @@ -1751,17 +1724,6 @@ public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { 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) } 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 index ef1797108a7..70b29905f12 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ReadResultOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ReadResult) 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 index d544ac5a165..41a1eaca23b 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.RestoreCloudDatabaseAction} */ -public final class RestoreCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RestoreCloudDatabaseAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.RestoreCloudDatabaseAction) RestoreCloudDatabaseActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RestoreCloudDatabaseAction"); + } + // Use RestoreCloudDatabaseAction.newBuilder() to construct. - private RestoreCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RestoreCloudDatabaseAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +59,13 @@ private RestoreCloudDatabaseAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_fieldAccessorTable @@ -409,20 +415,20 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupInstanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupInstanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupInstanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupInstanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, backupId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseInstanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, databaseInstanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseInstanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, databaseInstanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, databaseId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(7, getEncryptionConfig()); @@ -436,20 +442,20 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupInstanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupInstanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupInstanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupInstanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, backupId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseInstanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, databaseInstanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseInstanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, databaseInstanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, databaseId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEncryptionConfig()); @@ -546,38 +552,38 @@ public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction parseFro 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -601,7 +607,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -615,7 +621,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.RestoreCloudDatabaseAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.RestoreCloudDatabaseAction) com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder { @@ -625,7 +631,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_fieldAccessorTable @@ -639,14 +645,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncryptionConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncryptionConfigFieldBuilder(); } } @@ -724,39 +730,6 @@ private void buildPartial0(com.google.spanner.executor.v1.RestoreCloudDatabaseAc 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.RestoreCloudDatabaseAction) { @@ -857,7 +830,7 @@ public Builder mergeFrom( case 58: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 58 @@ -1446,7 +1419,7 @@ public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> @@ -1603,7 +1576,7 @@ public Builder clearEncryptionConfig() { getEncryptionConfigBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } /** @@ -1637,14 +1610,14 @@ public Builder clearEncryptionConfig() { * * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.database.v1.EncryptionConfig, com.google.spanner.admin.database.v1.EncryptionConfig.Builder, com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>( @@ -1654,17 +1627,6 @@ public Builder clearEncryptionConfig() { return encryptionConfigBuilder_; } - @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) } 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 index 371b9bf0f44..ebded7a2c12 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface RestoreCloudDatabaseActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.RestoreCloudDatabaseAction) diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptions.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptions.java index 9da651cbf05..33cd6d845fc 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptions.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.executor.v1.SessionPoolOptions} */ -public final class SessionPoolOptions extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SessionPoolOptions extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SessionPoolOptions) SessionPoolOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionPoolOptions"); + } + // Use SessionPoolOptions.newBuilder() to construct. - private SessionPoolOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SessionPoolOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SessionPoolOptions() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SessionPoolOptions(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SessionPoolOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SessionPoolOptions_fieldAccessorTable @@ -183,38 +189,38 @@ public static com.google.spanner.executor.v1.SessionPoolOptions parseFrom( public static com.google.spanner.executor.v1.SessionPoolOptions parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.SessionPoolOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.executor.v1.SessionPoolOptions parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.SessionPoolOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.executor.v1.SessionPoolOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.SessionPoolOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -237,7 +243,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -251,7 +257,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.SessionPoolOptions} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SessionPoolOptions) com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder { @@ -261,7 +267,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SessionPoolOptions_fieldAccessorTable @@ -273,7 +279,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.SessionPoolOptions.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -323,39 +329,6 @@ private void buildPartial0(com.google.spanner.executor.v1.SessionPoolOptions res } } - @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.SessionPoolOptions) { @@ -482,17 +455,6 @@ public Builder clearUseMultiplexed() { 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.SessionPoolOptions) } diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptionsOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptionsOrBuilder.java index c9aa6d7835a..bfa7bd42f90 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptionsOrBuilder.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SessionPoolOptionsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface SessionPoolOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SessionPoolOptions) 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 index 60103dcc1a3..31f571f9569 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -30,14 +31,25 @@ * * Protobuf type {@code google.spanner.executor.v1.SpannerAction} */ -public final class SpannerAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SpannerAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerAction) SpannerActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpannerAction"); + } + // Use SpannerAction.newBuilder() to construct. - private SpannerAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SpannerAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerAction_fieldAccessorTable @@ -93,6 +99,7 @@ public enum ActionCase EXECUTE_PARTITION(44), EXECUTE_CHANGE_STREAM_QUERY(50), QUERY_CANCELLATION(51), + ADAPT_MESSAGE(52), ACTION_NOT_SET(0); private final int value; @@ -146,6 +153,8 @@ public static ActionCase forNumber(int value) { return EXECUTE_CHANGE_STREAM_QUERY; case 51: return QUERY_CANCELLATION; + case 52: + return ADAPT_MESSAGE; case 0: return ACTION_NOT_SET; default: @@ -1218,6 +1227,60 @@ public com.google.spanner.executor.v1.QueryCancellationAction getQueryCancellati return com.google.spanner.executor.v1.QueryCancellationAction.getDefaultInstance(); } + public static final int ADAPT_MESSAGE_FIELD_NUMBER = 52; + + /** + * + * + *
+   * Action to adapt a message.
+   * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + * + * @return Whether the adaptMessage field is set. + */ + @java.lang.Override + public boolean hasAdaptMessage() { + return actionCase_ == 52; + } + + /** + * + * + *
+   * Action to adapt a message.
+   * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + * + * @return The adaptMessage. + */ + @java.lang.Override + public com.google.spanner.executor.v1.AdaptMessageAction getAdaptMessage() { + if (actionCase_ == 52) { + return (com.google.spanner.executor.v1.AdaptMessageAction) action_; + } + return com.google.spanner.executor.v1.AdaptMessageAction.getDefaultInstance(); + } + + /** + * + * + *
+   * Action to adapt a message.
+   * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + */ + @java.lang.Override + public com.google.spanner.executor.v1.AdaptMessageActionOrBuilder getAdaptMessageOrBuilder() { + if (actionCase_ == 52) { + return (com.google.spanner.executor.v1.AdaptMessageAction) action_; + } + return com.google.spanner.executor.v1.AdaptMessageAction.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1232,8 +1295,8 @@ public final boolean isInitialized() { @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(databasePath_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, databasePath_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSpannerOptions()); @@ -1291,6 +1354,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (actionCase_ == 51) { output.writeMessage(51, (com.google.spanner.executor.v1.QueryCancellationAction) action_); } + if (actionCase_ == 52) { + output.writeMessage(52, (com.google.spanner.executor.v1.AdaptMessageAction) action_); + } getUnknownFields().writeTo(output); } @@ -1300,8 +1366,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databasePath_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, databasePath_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databasePath_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, databasePath_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpannerOptions()); @@ -1391,6 +1457,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 51, (com.google.spanner.executor.v1.QueryCancellationAction) action_); } + if (actionCase_ == 52) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 52, (com.google.spanner.executor.v1.AdaptMessageAction) action_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1468,6 +1539,9 @@ public boolean equals(final java.lang.Object obj) { case 51: if (!getQueryCancellation().equals(other.getQueryCancellation())) return false; break; + case 52: + if (!getAdaptMessage().equals(other.getAdaptMessage())) return false; + break; case 0: default: } @@ -1557,6 +1631,10 @@ public int hashCode() { hash = (37 * hash) + QUERY_CANCELLATION_FIELD_NUMBER; hash = (53 * hash) + getQueryCancellation().hashCode(); break; + case 52: + hash = (37 * hash) + ADAPT_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getAdaptMessage().hashCode(); + break; case 0: default: } @@ -1602,38 +1680,38 @@ public static com.google.spanner.executor.v1.SpannerAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1656,7 +1734,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1672,7 +1750,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.SpannerAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerAction) com.google.spanner.executor.v1.SpannerActionOrBuilder { @@ -1682,7 +1760,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerAction_fieldAccessorTable @@ -1696,14 +1774,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSpannerOptionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSpannerOptionsFieldBuilder(); } } @@ -1768,6 +1846,9 @@ public Builder clear() { if (queryCancellationBuilder_ != null) { queryCancellationBuilder_.clear(); } + if (adaptMessageBuilder_ != null) { + adaptMessageBuilder_.clear(); + } actionCase_ = 0; action_ = null; return this; @@ -1873,39 +1954,9 @@ private void buildPartialOneofs(com.google.spanner.executor.v1.SpannerAction res if (actionCase_ == 51 && queryCancellationBuilder_ != null) { result.action_ = queryCancellationBuilder_.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); + if (actionCase_ == 52 && adaptMessageBuilder_ != null) { + result.action_ = adaptMessageBuilder_.build(); + } } @java.lang.Override @@ -2014,6 +2065,11 @@ public Builder mergeFrom(com.google.spanner.executor.v1.SpannerAction other) { mergeQueryCancellation(other.getQueryCancellation()); break; } + case ADAPT_MESSAGE: + { + mergeAdaptMessage(other.getAdaptMessage()); + break; + } case ACTION_NOT_SET: { break; @@ -2053,118 +2109,133 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getSpannerOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetSpannerOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 82: { - input.readMessage(getStartFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetStartFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 10; break; } // case 82 case 90: { - input.readMessage(getFinishFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetFinishFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 11; break; } // case 90 case 162: { - input.readMessage(getReadFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetReadFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 20; break; } // case 162 case 170: { - input.readMessage(getQueryFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetQueryFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 21; break; } // case 170 case 178: { - input.readMessage(getMutationFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMutationFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 22; break; } // case 178 case 186: { - input.readMessage(getDmlFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetDmlFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 23; break; } // case 186 case 194: { - input.readMessage(getBatchDmlFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBatchDmlFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 24; break; } // case 194 case 202: { - input.readMessage(getWriteFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetWriteFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 25; break; } // case 202 case 218: { input.readMessage( - getPartitionedUpdateFieldBuilder().getBuilder(), extensionRegistry); + internalGetPartitionedUpdateFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 27; break; } // case 218 case 242: { - input.readMessage(getAdminFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetAdminFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 30; break; } // case 242 case 322: { - input.readMessage(getStartBatchTxnFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartBatchTxnFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 40; break; } // case 322 case 330: { - input.readMessage(getCloseBatchTxnFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCloseBatchTxnFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 41; break; } // case 330 case 338: { input.readMessage( - getGenerateDbPartitionsReadFieldBuilder().getBuilder(), extensionRegistry); + internalGetGenerateDbPartitionsReadFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 42; break; } // case 338 case 346: { input.readMessage( - getGenerateDbPartitionsQueryFieldBuilder().getBuilder(), extensionRegistry); + internalGetGenerateDbPartitionsQueryFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 43; break; } // case 346 case 354: { input.readMessage( - getExecutePartitionFieldBuilder().getBuilder(), extensionRegistry); + internalGetExecutePartitionFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 44; break; } // case 354 case 402: { input.readMessage( - getExecuteChangeStreamQueryFieldBuilder().getBuilder(), extensionRegistry); + internalGetExecuteChangeStreamQueryFieldBuilder().getBuilder(), + extensionRegistry); actionCase_ = 50; break; } // case 402 case 410: { input.readMessage( - getQueryCancellationFieldBuilder().getBuilder(), extensionRegistry); + internalGetQueryCancellationFieldBuilder().getBuilder(), extensionRegistry); actionCase_ = 51; break; } // case 410 + case 418: + { + input.readMessage( + internalGetAdaptMessageFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 52; + break; + } // case 418 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2320,7 +2391,7 @@ public Builder setDatabasePathBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.executor.v1.SpannerOptions spannerOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SpannerOptions, com.google.spanner.executor.v1.SpannerOptions.Builder, com.google.spanner.executor.v1.SpannerOptionsOrBuilder> @@ -2467,7 +2538,7 @@ public Builder clearSpannerOptions() { public com.google.spanner.executor.v1.SpannerOptions.Builder getSpannerOptionsBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSpannerOptionsFieldBuilder().getBuilder(); + return internalGetSpannerOptionsFieldBuilder().getBuilder(); } /** @@ -2498,14 +2569,14 @@ public com.google.spanner.executor.v1.SpannerOptionsOrBuilder getSpannerOptionsO * * .google.spanner.executor.v1.SpannerOptions spanner_options = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SpannerOptions, com.google.spanner.executor.v1.SpannerOptions.Builder, com.google.spanner.executor.v1.SpannerOptionsOrBuilder> - getSpannerOptionsFieldBuilder() { + internalGetSpannerOptionsFieldBuilder() { if (spannerOptionsBuilder_ == null) { spannerOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SpannerOptions, com.google.spanner.executor.v1.SpannerOptions.Builder, com.google.spanner.executor.v1.SpannerOptionsOrBuilder>( @@ -2515,7 +2586,7 @@ public com.google.spanner.executor.v1.SpannerOptionsOrBuilder getSpannerOptionsO return spannerOptionsBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.StartTransactionAction, com.google.spanner.executor.v1.StartTransactionAction.Builder, com.google.spanner.executor.v1.StartTransactionActionOrBuilder> @@ -2677,7 +2748,7 @@ public Builder clearStart() { * .google.spanner.executor.v1.StartTransactionAction start = 10; */ public com.google.spanner.executor.v1.StartTransactionAction.Builder getStartBuilder() { - return getStartFieldBuilder().getBuilder(); + return internalGetStartFieldBuilder().getBuilder(); } /** @@ -2710,17 +2781,17 @@ public com.google.spanner.executor.v1.StartTransactionActionOrBuilder getStartOr * * .google.spanner.executor.v1.StartTransactionAction start = 10; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.StartTransactionAction, com.google.spanner.executor.v1.StartTransactionAction.Builder, com.google.spanner.executor.v1.StartTransactionActionOrBuilder> - getStartFieldBuilder() { + internalGetStartFieldBuilder() { if (startBuilder_ == null) { if (!(actionCase_ == 10)) { action_ = com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance(); } startBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.StartTransactionAction, com.google.spanner.executor.v1.StartTransactionAction.Builder, com.google.spanner.executor.v1.StartTransactionActionOrBuilder>( @@ -2734,7 +2805,7 @@ public com.google.spanner.executor.v1.StartTransactionActionOrBuilder getStartOr return startBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.FinishTransactionAction, com.google.spanner.executor.v1.FinishTransactionAction.Builder, com.google.spanner.executor.v1.FinishTransactionActionOrBuilder> @@ -2896,7 +2967,7 @@ public Builder clearFinish() { * .google.spanner.executor.v1.FinishTransactionAction finish = 11; */ public com.google.spanner.executor.v1.FinishTransactionAction.Builder getFinishBuilder() { - return getFinishFieldBuilder().getBuilder(); + return internalGetFinishFieldBuilder().getBuilder(); } /** @@ -2929,17 +3000,17 @@ public com.google.spanner.executor.v1.FinishTransactionActionOrBuilder getFinish * * .google.spanner.executor.v1.FinishTransactionAction finish = 11; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.FinishTransactionAction, com.google.spanner.executor.v1.FinishTransactionAction.Builder, com.google.spanner.executor.v1.FinishTransactionActionOrBuilder> - getFinishFieldBuilder() { + internalGetFinishFieldBuilder() { if (finishBuilder_ == null) { if (!(actionCase_ == 11)) { action_ = com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance(); } finishBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.FinishTransactionAction, com.google.spanner.executor.v1.FinishTransactionAction.Builder, com.google.spanner.executor.v1.FinishTransactionActionOrBuilder>( @@ -2953,7 +3024,7 @@ public com.google.spanner.executor.v1.FinishTransactionActionOrBuilder getFinish return finishBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ReadAction, com.google.spanner.executor.v1.ReadAction.Builder, com.google.spanner.executor.v1.ReadActionOrBuilder> @@ -3113,7 +3184,7 @@ public Builder clearRead() { * .google.spanner.executor.v1.ReadAction read = 20; */ public com.google.spanner.executor.v1.ReadAction.Builder getReadBuilder() { - return getReadFieldBuilder().getBuilder(); + return internalGetReadFieldBuilder().getBuilder(); } /** @@ -3146,17 +3217,17 @@ public com.google.spanner.executor.v1.ReadActionOrBuilder getReadOrBuilder() { * * .google.spanner.executor.v1.ReadAction read = 20; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ReadAction, com.google.spanner.executor.v1.ReadAction.Builder, com.google.spanner.executor.v1.ReadActionOrBuilder> - getReadFieldBuilder() { + internalGetReadFieldBuilder() { if (readBuilder_ == null) { if (!(actionCase_ == 20)) { action_ = com.google.spanner.executor.v1.ReadAction.getDefaultInstance(); } readBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ReadAction, com.google.spanner.executor.v1.ReadAction.Builder, com.google.spanner.executor.v1.ReadActionOrBuilder>( @@ -3170,7 +3241,7 @@ public com.google.spanner.executor.v1.ReadActionOrBuilder getReadOrBuilder() { return readBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> @@ -3330,7 +3401,7 @@ public Builder clearQuery() { * .google.spanner.executor.v1.QueryAction query = 21; */ public com.google.spanner.executor.v1.QueryAction.Builder getQueryBuilder() { - return getQueryFieldBuilder().getBuilder(); + return internalGetQueryFieldBuilder().getBuilder(); } /** @@ -3363,17 +3434,17 @@ public com.google.spanner.executor.v1.QueryActionOrBuilder getQueryOrBuilder() { * * .google.spanner.executor.v1.QueryAction query = 21; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder> - getQueryFieldBuilder() { + internalGetQueryFieldBuilder() { if (queryBuilder_ == null) { if (!(actionCase_ == 21)) { action_ = com.google.spanner.executor.v1.QueryAction.getDefaultInstance(); } queryBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryAction, com.google.spanner.executor.v1.QueryAction.Builder, com.google.spanner.executor.v1.QueryActionOrBuilder>( @@ -3387,7 +3458,7 @@ public com.google.spanner.executor.v1.QueryActionOrBuilder getQueryOrBuilder() { return queryBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction, com.google.spanner.executor.v1.MutationAction.Builder, com.google.spanner.executor.v1.MutationActionOrBuilder> @@ -3548,7 +3619,7 @@ public Builder clearMutation() { * .google.spanner.executor.v1.MutationAction mutation = 22; */ public com.google.spanner.executor.v1.MutationAction.Builder getMutationBuilder() { - return getMutationFieldBuilder().getBuilder(); + return internalGetMutationFieldBuilder().getBuilder(); } /** @@ -3581,17 +3652,17 @@ public com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuild * * .google.spanner.executor.v1.MutationAction mutation = 22; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction, com.google.spanner.executor.v1.MutationAction.Builder, com.google.spanner.executor.v1.MutationActionOrBuilder> - getMutationFieldBuilder() { + internalGetMutationFieldBuilder() { if (mutationBuilder_ == null) { if (!(actionCase_ == 22)) { action_ = com.google.spanner.executor.v1.MutationAction.getDefaultInstance(); } mutationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction, com.google.spanner.executor.v1.MutationAction.Builder, com.google.spanner.executor.v1.MutationActionOrBuilder>( @@ -3605,7 +3676,7 @@ public com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuild return mutationBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DmlAction, com.google.spanner.executor.v1.DmlAction.Builder, com.google.spanner.executor.v1.DmlActionOrBuilder> @@ -3765,7 +3836,7 @@ public Builder clearDml() { * .google.spanner.executor.v1.DmlAction dml = 23; */ public com.google.spanner.executor.v1.DmlAction.Builder getDmlBuilder() { - return getDmlFieldBuilder().getBuilder(); + return internalGetDmlFieldBuilder().getBuilder(); } /** @@ -3798,17 +3869,17 @@ public com.google.spanner.executor.v1.DmlActionOrBuilder getDmlOrBuilder() { * * .google.spanner.executor.v1.DmlAction dml = 23; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DmlAction, com.google.spanner.executor.v1.DmlAction.Builder, com.google.spanner.executor.v1.DmlActionOrBuilder> - getDmlFieldBuilder() { + internalGetDmlFieldBuilder() { if (dmlBuilder_ == null) { if (!(actionCase_ == 23)) { action_ = com.google.spanner.executor.v1.DmlAction.getDefaultInstance(); } dmlBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.DmlAction, com.google.spanner.executor.v1.DmlAction.Builder, com.google.spanner.executor.v1.DmlActionOrBuilder>( @@ -3822,7 +3893,7 @@ public com.google.spanner.executor.v1.DmlActionOrBuilder getDmlOrBuilder() { return dmlBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.BatchDmlAction, com.google.spanner.executor.v1.BatchDmlAction.Builder, com.google.spanner.executor.v1.BatchDmlActionOrBuilder> @@ -3983,7 +4054,7 @@ public Builder clearBatchDml() { * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; */ public com.google.spanner.executor.v1.BatchDmlAction.Builder getBatchDmlBuilder() { - return getBatchDmlFieldBuilder().getBuilder(); + return internalGetBatchDmlFieldBuilder().getBuilder(); } /** @@ -4016,17 +4087,17 @@ public com.google.spanner.executor.v1.BatchDmlActionOrBuilder getBatchDmlOrBuild * * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.BatchDmlAction, com.google.spanner.executor.v1.BatchDmlAction.Builder, com.google.spanner.executor.v1.BatchDmlActionOrBuilder> - getBatchDmlFieldBuilder() { + internalGetBatchDmlFieldBuilder() { if (batchDmlBuilder_ == null) { if (!(actionCase_ == 24)) { action_ = com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance(); } batchDmlBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.BatchDmlAction, com.google.spanner.executor.v1.BatchDmlAction.Builder, com.google.spanner.executor.v1.BatchDmlActionOrBuilder>( @@ -4040,7 +4111,7 @@ public com.google.spanner.executor.v1.BatchDmlActionOrBuilder getBatchDmlOrBuild return batchDmlBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.WriteMutationsAction, com.google.spanner.executor.v1.WriteMutationsAction.Builder, com.google.spanner.executor.v1.WriteMutationsActionOrBuilder> @@ -4202,7 +4273,7 @@ public Builder clearWrite() { * .google.spanner.executor.v1.WriteMutationsAction write = 25; */ public com.google.spanner.executor.v1.WriteMutationsAction.Builder getWriteBuilder() { - return getWriteFieldBuilder().getBuilder(); + return internalGetWriteFieldBuilder().getBuilder(); } /** @@ -4235,17 +4306,17 @@ public com.google.spanner.executor.v1.WriteMutationsActionOrBuilder getWriteOrBu * * .google.spanner.executor.v1.WriteMutationsAction write = 25; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.WriteMutationsAction, com.google.spanner.executor.v1.WriteMutationsAction.Builder, com.google.spanner.executor.v1.WriteMutationsActionOrBuilder> - getWriteFieldBuilder() { + internalGetWriteFieldBuilder() { if (writeBuilder_ == null) { if (!(actionCase_ == 25)) { action_ = com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance(); } writeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.WriteMutationsAction, com.google.spanner.executor.v1.WriteMutationsAction.Builder, com.google.spanner.executor.v1.WriteMutationsActionOrBuilder>( @@ -4259,7 +4330,7 @@ public com.google.spanner.executor.v1.WriteMutationsActionOrBuilder getWriteOrBu return writeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.PartitionedUpdateAction, com.google.spanner.executor.v1.PartitionedUpdateAction.Builder, com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder> @@ -4424,7 +4495,7 @@ public Builder clearPartitionedUpdate() { */ public com.google.spanner.executor.v1.PartitionedUpdateAction.Builder getPartitionedUpdateBuilder() { - return getPartitionedUpdateFieldBuilder().getBuilder(); + return internalGetPartitionedUpdateFieldBuilder().getBuilder(); } /** @@ -4458,17 +4529,17 @@ public Builder clearPartitionedUpdate() { * * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.PartitionedUpdateAction, com.google.spanner.executor.v1.PartitionedUpdateAction.Builder, com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder> - getPartitionedUpdateFieldBuilder() { + internalGetPartitionedUpdateFieldBuilder() { if (partitionedUpdateBuilder_ == null) { if (!(actionCase_ == 27)) { action_ = com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance(); } partitionedUpdateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.PartitionedUpdateAction, com.google.spanner.executor.v1.PartitionedUpdateAction.Builder, com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder>( @@ -4482,7 +4553,7 @@ public Builder clearPartitionedUpdate() { return partitionedUpdateBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.AdminAction, com.google.spanner.executor.v1.AdminAction.Builder, com.google.spanner.executor.v1.AdminActionOrBuilder> @@ -4649,7 +4720,7 @@ public Builder clearAdmin() { * .google.spanner.executor.v1.AdminAction admin = 30; */ public com.google.spanner.executor.v1.AdminAction.Builder getAdminBuilder() { - return getAdminFieldBuilder().getBuilder(); + return internalGetAdminFieldBuilder().getBuilder(); } /** @@ -4684,17 +4755,17 @@ public com.google.spanner.executor.v1.AdminActionOrBuilder getAdminOrBuilder() { * * .google.spanner.executor.v1.AdminAction admin = 30; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.AdminAction, com.google.spanner.executor.v1.AdminAction.Builder, com.google.spanner.executor.v1.AdminActionOrBuilder> - getAdminFieldBuilder() { + internalGetAdminFieldBuilder() { if (adminBuilder_ == null) { if (!(actionCase_ == 30)) { action_ = com.google.spanner.executor.v1.AdminAction.getDefaultInstance(); } adminBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.AdminAction, com.google.spanner.executor.v1.AdminAction.Builder, com.google.spanner.executor.v1.AdminActionOrBuilder>( @@ -4708,7 +4779,7 @@ public com.google.spanner.executor.v1.AdminActionOrBuilder getAdminOrBuilder() { return adminBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.StartBatchTransactionAction, com.google.spanner.executor.v1.StartBatchTransactionAction.Builder, com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder> @@ -4874,7 +4945,7 @@ public Builder clearStartBatchTxn() { */ public com.google.spanner.executor.v1.StartBatchTransactionAction.Builder getStartBatchTxnBuilder() { - return getStartBatchTxnFieldBuilder().getBuilder(); + return internalGetStartBatchTxnFieldBuilder().getBuilder(); } /** @@ -4908,17 +4979,17 @@ public Builder clearStartBatchTxn() { * * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.StartBatchTransactionAction, com.google.spanner.executor.v1.StartBatchTransactionAction.Builder, com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder> - getStartBatchTxnFieldBuilder() { + internalGetStartBatchTxnFieldBuilder() { if (startBatchTxnBuilder_ == null) { if (!(actionCase_ == 40)) { action_ = com.google.spanner.executor.v1.StartBatchTransactionAction.getDefaultInstance(); } startBatchTxnBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.StartBatchTransactionAction, com.google.spanner.executor.v1.StartBatchTransactionAction.Builder, com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder>( @@ -4932,7 +5003,7 @@ public Builder clearStartBatchTxn() { return startBatchTxnBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloseBatchTransactionAction, com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder, com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder> @@ -5098,7 +5169,7 @@ public Builder clearCloseBatchTxn() { */ public com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder getCloseBatchTxnBuilder() { - return getCloseBatchTxnFieldBuilder().getBuilder(); + return internalGetCloseBatchTxnFieldBuilder().getBuilder(); } /** @@ -5132,17 +5203,17 @@ public Builder clearCloseBatchTxn() { * * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloseBatchTransactionAction, com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder, com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder> - getCloseBatchTxnFieldBuilder() { + internalGetCloseBatchTxnFieldBuilder() { if (closeBatchTxnBuilder_ == null) { if (!(actionCase_ == 41)) { action_ = com.google.spanner.executor.v1.CloseBatchTransactionAction.getDefaultInstance(); } closeBatchTxnBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.CloseBatchTransactionAction, com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder, com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder>( @@ -5156,7 +5227,7 @@ public Builder clearCloseBatchTxn() { return closeBatchTxnBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction, com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder, com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder> @@ -5339,7 +5410,7 @@ public Builder clearGenerateDbPartitionsRead() { */ public com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder getGenerateDbPartitionsReadBuilder() { - return getGenerateDbPartitionsReadFieldBuilder().getBuilder(); + return internalGetGenerateDbPartitionsReadFieldBuilder().getBuilder(); } /** @@ -5378,18 +5449,18 @@ public Builder clearGenerateDbPartitionsRead() { * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction, com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder, com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder> - getGenerateDbPartitionsReadFieldBuilder() { + internalGetGenerateDbPartitionsReadFieldBuilder() { if (generateDbPartitionsReadBuilder_ == null) { if (!(actionCase_ == 42)) { action_ = com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.getDefaultInstance(); } generateDbPartitionsReadBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction, com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder, com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder>( @@ -5403,7 +5474,7 @@ public Builder clearGenerateDbPartitionsRead() { return generateDbPartitionsReadBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction, com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder, com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder> @@ -5586,7 +5657,7 @@ public Builder clearGenerateDbPartitionsQuery() { */ public com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder getGenerateDbPartitionsQueryBuilder() { - return getGenerateDbPartitionsQueryFieldBuilder().getBuilder(); + return internalGetGenerateDbPartitionsQueryFieldBuilder().getBuilder(); } /** @@ -5625,11 +5696,11 @@ public Builder clearGenerateDbPartitionsQuery() { * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction, com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder, com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder> - getGenerateDbPartitionsQueryFieldBuilder() { + internalGetGenerateDbPartitionsQueryFieldBuilder() { if (generateDbPartitionsQueryBuilder_ == null) { if (!(actionCase_ == 43)) { action_ = @@ -5637,7 +5708,7 @@ public Builder clearGenerateDbPartitionsQuery() { .getDefaultInstance(); } generateDbPartitionsQueryBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction, com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder, com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder>( @@ -5651,7 +5722,7 @@ public Builder clearGenerateDbPartitionsQuery() { return generateDbPartitionsQueryBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ExecutePartitionAction, com.google.spanner.executor.v1.ExecutePartitionAction.Builder, com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder> @@ -5816,7 +5887,7 @@ public Builder clearExecutePartition() { */ public com.google.spanner.executor.v1.ExecutePartitionAction.Builder getExecutePartitionBuilder() { - return getExecutePartitionFieldBuilder().getBuilder(); + return internalGetExecutePartitionFieldBuilder().getBuilder(); } /** @@ -5850,17 +5921,17 @@ public Builder clearExecutePartition() { * * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ExecutePartitionAction, com.google.spanner.executor.v1.ExecutePartitionAction.Builder, com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder> - getExecutePartitionFieldBuilder() { + internalGetExecutePartitionFieldBuilder() { if (executePartitionBuilder_ == null) { if (!(actionCase_ == 44)) { action_ = com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance(); } executePartitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ExecutePartitionAction, com.google.spanner.executor.v1.ExecutePartitionAction.Builder, com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder>( @@ -5874,7 +5945,7 @@ public Builder clearExecutePartition() { return executePartitionBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ExecuteChangeStreamQuery, com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder, com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder> @@ -6046,7 +6117,7 @@ public Builder clearExecuteChangeStreamQuery() { */ public com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder getExecuteChangeStreamQueryBuilder() { - return getExecuteChangeStreamQueryFieldBuilder().getBuilder(); + return internalGetExecuteChangeStreamQueryFieldBuilder().getBuilder(); } /** @@ -6082,17 +6153,17 @@ public Builder clearExecuteChangeStreamQuery() { * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ExecuteChangeStreamQuery, com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder, com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder> - getExecuteChangeStreamQueryFieldBuilder() { + internalGetExecuteChangeStreamQueryFieldBuilder() { if (executeChangeStreamQueryBuilder_ == null) { if (!(actionCase_ == 50)) { action_ = com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance(); } executeChangeStreamQueryBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ExecuteChangeStreamQuery, com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder, com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder>( @@ -6106,7 +6177,7 @@ public Builder clearExecuteChangeStreamQuery() { return executeChangeStreamQueryBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryCancellationAction, com.google.spanner.executor.v1.QueryCancellationAction.Builder, com.google.spanner.executor.v1.QueryCancellationActionOrBuilder> @@ -6271,7 +6342,7 @@ public Builder clearQueryCancellation() { */ public com.google.spanner.executor.v1.QueryCancellationAction.Builder getQueryCancellationBuilder() { - return getQueryCancellationFieldBuilder().getBuilder(); + return internalGetQueryCancellationFieldBuilder().getBuilder(); } /** @@ -6305,17 +6376,17 @@ public Builder clearQueryCancellation() { * * .google.spanner.executor.v1.QueryCancellationAction query_cancellation = 51; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryCancellationAction, com.google.spanner.executor.v1.QueryCancellationAction.Builder, com.google.spanner.executor.v1.QueryCancellationActionOrBuilder> - getQueryCancellationFieldBuilder() { + internalGetQueryCancellationFieldBuilder() { if (queryCancellationBuilder_ == null) { if (!(actionCase_ == 51)) { action_ = com.google.spanner.executor.v1.QueryCancellationAction.getDefaultInstance(); } queryCancellationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryCancellationAction, com.google.spanner.executor.v1.QueryCancellationAction.Builder, com.google.spanner.executor.v1.QueryCancellationActionOrBuilder>( @@ -6329,15 +6400,222 @@ public Builder clearQueryCancellation() { return queryCancellationBuilder_; } + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.executor.v1.AdaptMessageAction, + com.google.spanner.executor.v1.AdaptMessageAction.Builder, + com.google.spanner.executor.v1.AdaptMessageActionOrBuilder> + adaptMessageBuilder_; + + /** + * + * + *
+     * Action to adapt a message.
+     * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + * + * @return Whether the adaptMessage field is set. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean hasAdaptMessage() { + return actionCase_ == 52; } + /** + * + * + *
+     * Action to adapt a message.
+     * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + * + * @return The adaptMessage. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public com.google.spanner.executor.v1.AdaptMessageAction getAdaptMessage() { + if (adaptMessageBuilder_ == null) { + if (actionCase_ == 52) { + return (com.google.spanner.executor.v1.AdaptMessageAction) action_; + } + return com.google.spanner.executor.v1.AdaptMessageAction.getDefaultInstance(); + } else { + if (actionCase_ == 52) { + return adaptMessageBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.AdaptMessageAction.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Action to adapt a message.
+     * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + */ + public Builder setAdaptMessage(com.google.spanner.executor.v1.AdaptMessageAction value) { + if (adaptMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + adaptMessageBuilder_.setMessage(value); + } + actionCase_ = 52; + return this; + } + + /** + * + * + *
+     * Action to adapt a message.
+     * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + */ + public Builder setAdaptMessage( + com.google.spanner.executor.v1.AdaptMessageAction.Builder builderForValue) { + if (adaptMessageBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + adaptMessageBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 52; + return this; + } + + /** + * + * + *
+     * Action to adapt a message.
+     * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + */ + public Builder mergeAdaptMessage(com.google.spanner.executor.v1.AdaptMessageAction value) { + if (adaptMessageBuilder_ == null) { + if (actionCase_ == 52 + && action_ != com.google.spanner.executor.v1.AdaptMessageAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.AdaptMessageAction.newBuilder( + (com.google.spanner.executor.v1.AdaptMessageAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 52) { + adaptMessageBuilder_.mergeFrom(value); + } else { + adaptMessageBuilder_.setMessage(value); + } + } + actionCase_ = 52; + return this; + } + + /** + * + * + *
+     * Action to adapt a message.
+     * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + */ + public Builder clearAdaptMessage() { + if (adaptMessageBuilder_ == null) { + if (actionCase_ == 52) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 52) { + actionCase_ = 0; + action_ = null; + } + adaptMessageBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Action to adapt a message.
+     * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + */ + public com.google.spanner.executor.v1.AdaptMessageAction.Builder getAdaptMessageBuilder() { + return internalGetAdaptMessageFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Action to adapt a message.
+     * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + */ + @java.lang.Override + public com.google.spanner.executor.v1.AdaptMessageActionOrBuilder getAdaptMessageOrBuilder() { + if ((actionCase_ == 52) && (adaptMessageBuilder_ != null)) { + return adaptMessageBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 52) { + return (com.google.spanner.executor.v1.AdaptMessageAction) action_; + } + return com.google.spanner.executor.v1.AdaptMessageAction.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Action to adapt a message.
+     * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.executor.v1.AdaptMessageAction, + com.google.spanner.executor.v1.AdaptMessageAction.Builder, + com.google.spanner.executor.v1.AdaptMessageActionOrBuilder> + internalGetAdaptMessageFieldBuilder() { + if (adaptMessageBuilder_ == null) { + if (!(actionCase_ == 52)) { + action_ = com.google.spanner.executor.v1.AdaptMessageAction.getDefaultInstance(); + } + adaptMessageBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.executor.v1.AdaptMessageAction, + com.google.spanner.executor.v1.AdaptMessageAction.Builder, + com.google.spanner.executor.v1.AdaptMessageActionOrBuilder>( + (com.google.spanner.executor.v1.AdaptMessageAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 52; + onChanged(); + return adaptMessageBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.SpannerAction) 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 index e7f8192fdfb..05e5744b046 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface SpannerActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerAction) @@ -741,5 +743,42 @@ public interface SpannerActionOrBuilder */ com.google.spanner.executor.v1.QueryCancellationActionOrBuilder getQueryCancellationOrBuilder(); + /** + * + * + *
+   * Action to adapt a message.
+   * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + * + * @return Whether the adaptMessage field is set. + */ + boolean hasAdaptMessage(); + + /** + * + * + *
+   * Action to adapt a message.
+   * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + * + * @return The adaptMessage. + */ + com.google.spanner.executor.v1.AdaptMessageAction getAdaptMessage(); + + /** + * + * + *
+   * Action to adapt a message.
+   * 
+ * + * .google.spanner.executor.v1.AdaptMessageAction adapt_message = 52; + */ + com.google.spanner.executor.v1.AdaptMessageActionOrBuilder getAdaptMessageOrBuilder(); + 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 index b84f0a15f83..ff10ce58be7 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.SpannerActionOutcome} */ -public final class SpannerActionOutcome extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SpannerActionOutcome extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerActionOutcome) SpannerActionOutcomeOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpannerActionOutcome"); + } + // Use SpannerActionOutcome.newBuilder() to construct. - private SpannerActionOutcome(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SpannerActionOutcome(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private SpannerActionOutcome() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerActionOutcome_fieldAccessorTable @@ -633,6 +639,43 @@ public com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder getChangeStrea return changeStreamRecords_.get(index); } + public static final int SNAPSHOT_ISOLATION_TXN_READ_TIMESTAMP_FIELD_NUMBER = 11; + private long snapshotIsolationTxnReadTimestamp_ = 0L; + + /** + * + * + *
+   * If not zero, it indicates the read timestamp to use for validating
+   * the SnapshotIsolation transaction.
+   * 
+ * + * optional int64 snapshot_isolation_txn_read_timestamp = 11; + * + * @return Whether the snapshotIsolationTxnReadTimestamp field is set. + */ + @java.lang.Override + public boolean hasSnapshotIsolationTxnReadTimestamp() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * If not zero, it indicates the read timestamp to use for validating
+   * the SnapshotIsolation transaction.
+   * 
+ * + * optional int64 snapshot_isolation_txn_read_timestamp = 11; + * + * @return The snapshotIsolationTxnReadTimestamp. + */ + @java.lang.Override + public long getSnapshotIsolationTxnReadTimestamp() { + return snapshotIsolationTxnReadTimestamp_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -682,6 +725,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < changeStreamRecords_.size(); i++) { output.writeMessage(10, changeStreamRecords_.get(i)); } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeInt64(11, snapshotIsolationTxnReadTimestamp_); + } getUnknownFields().writeTo(output); } @@ -733,6 +779,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, changeStreamRecords_.get(i)); } + if (((bitField0_ & 0x00000080) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 11, snapshotIsolationTxnReadTimestamp_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -780,6 +831,12 @@ public boolean equals(final java.lang.Object obj) { } if (!getDmlRowsModifiedList().equals(other.getDmlRowsModifiedList())) return false; if (!getChangeStreamRecordsList().equals(other.getChangeStreamRecordsList())) return false; + if (hasSnapshotIsolationTxnReadTimestamp() != other.hasSnapshotIsolationTxnReadTimestamp()) + return false; + if (hasSnapshotIsolationTxnReadTimestamp()) { + if (getSnapshotIsolationTxnReadTimestamp() != other.getSnapshotIsolationTxnReadTimestamp()) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -831,6 +888,12 @@ public int hashCode() { hash = (37 * hash) + CHANGE_STREAM_RECORDS_FIELD_NUMBER; hash = (53 * hash) + getChangeStreamRecordsList().hashCode(); } + if (hasSnapshotIsolationTxnReadTimestamp()) { + hash = (37 * hash) + SNAPSHOT_ISOLATION_TXN_READ_TIMESTAMP_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(getSnapshotIsolationTxnReadTimestamp()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -873,38 +936,38 @@ public static com.google.spanner.executor.v1.SpannerActionOutcome parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -927,7 +990,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -941,7 +1004,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.SpannerActionOutcome} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerActionOutcome) com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder { @@ -951,7 +1014,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerActionOutcome_fieldAccessorTable @@ -965,20 +1028,20 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStatusFieldBuilder(); - getCommitTimeFieldBuilder(); - getReadResultFieldBuilder(); - getQueryResultFieldBuilder(); - getDbPartitionFieldBuilder(); - getAdminResultFieldBuilder(); - getChangeStreamRecordsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStatusFieldBuilder(); + internalGetCommitTimeFieldBuilder(); + internalGetReadResultFieldBuilder(); + internalGetQueryResultFieldBuilder(); + internalGetDbPartitionFieldBuilder(); + internalGetAdminResultFieldBuilder(); + internalGetChangeStreamRecordsFieldBuilder(); } } @@ -1028,6 +1091,7 @@ public Builder clear() { changeStreamRecordsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000200); + snapshotIsolationTxnReadTimestamp_ = 0L; return this; } @@ -1122,42 +1186,13 @@ private void buildPartial0(com.google.spanner.executor.v1.SpannerActionOutcome r dmlRowsModified_.makeImmutable(); result.dmlRowsModified_ = dmlRowsModified_; } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.snapshotIsolationTxnReadTimestamp_ = snapshotIsolationTxnReadTimestamp_; + to_bitField0_ |= 0x00000080; + } 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) { @@ -1208,8 +1243,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.SpannerActionOutcome oth dbPartition_ = other.dbPartition_; bitField0_ = (bitField0_ & ~0x00000040); dbPartitionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDbPartitionFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDbPartitionFieldBuilder() : null; } else { dbPartitionBuilder_.addAllMessages(other.dbPartition_); @@ -1249,14 +1284,17 @@ public Builder mergeFrom(com.google.spanner.executor.v1.SpannerActionOutcome oth changeStreamRecords_ = other.changeStreamRecords_; bitField0_ = (bitField0_ & ~0x00000200); changeStreamRecordsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getChangeStreamRecordsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetChangeStreamRecordsFieldBuilder() : null; } else { changeStreamRecordsBuilder_.addAllMessages(other.changeStreamRecords_); } } } + if (other.hasSnapshotIsolationTxnReadTimestamp()) { + setSnapshotIsolationTxnReadTimestamp(other.getSnapshotIsolationTxnReadTimestamp()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1285,25 +1323,28 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetStatusFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getCommitTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCommitTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getReadResultFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetReadResultFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getQueryResultFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetQueryResultFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1334,7 +1375,8 @@ public Builder mergeFrom( } // case 58 case 66: { - input.readMessage(getAdminResultFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetAdminResultFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 66 @@ -1370,6 +1412,12 @@ public Builder mergeFrom( } break; } // case 82 + case 88: + { + snapshotIsolationTxnReadTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1390,7 +1438,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.rpc.Status status_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; @@ -1538,7 +1586,7 @@ public Builder clearStatus() { public com.google.rpc.Status.Builder getStatusBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getStatusFieldBuilder().getBuilder(); + return internalGetStatusFieldBuilder().getBuilder(); } /** @@ -1569,12 +1617,12 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { * * optional .google.rpc.Status status = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusFieldBuilder() { + internalGetStatusFieldBuilder() { if (statusBuilder_ == null) { statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); @@ -1584,7 +1632,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { } private com.google.protobuf.Timestamp commitTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1729,7 +1777,7 @@ public Builder clearCommitTime() { public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getCommitTimeFieldBuilder().getBuilder(); + return internalGetCommitTimeFieldBuilder().getBuilder(); } /** @@ -1760,14 +1808,14 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { * * optional .google.protobuf.Timestamp commit_time = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCommitTimeFieldBuilder() { + internalGetCommitTimeFieldBuilder() { if (commitTimeBuilder_ == null) { commitTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1778,7 +1826,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { } private com.google.spanner.executor.v1.ReadResult readResult_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ReadResult, com.google.spanner.executor.v1.ReadResult.Builder, com.google.spanner.executor.v1.ReadResultOrBuilder> @@ -1931,7 +1979,7 @@ public Builder clearReadResult() { public com.google.spanner.executor.v1.ReadResult.Builder getReadResultBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getReadResultFieldBuilder().getBuilder(); + return internalGetReadResultFieldBuilder().getBuilder(); } /** @@ -1964,14 +2012,14 @@ public com.google.spanner.executor.v1.ReadResultOrBuilder getReadResultOrBuilder * * optional .google.spanner.executor.v1.ReadResult read_result = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ReadResult, com.google.spanner.executor.v1.ReadResult.Builder, com.google.spanner.executor.v1.ReadResultOrBuilder> - getReadResultFieldBuilder() { + internalGetReadResultFieldBuilder() { if (readResultBuilder_ == null) { readResultBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ReadResult, com.google.spanner.executor.v1.ReadResult.Builder, com.google.spanner.executor.v1.ReadResultOrBuilder>( @@ -1982,7 +2030,7 @@ public com.google.spanner.executor.v1.ReadResultOrBuilder getReadResultOrBuilder } private com.google.spanner.executor.v1.QueryResult queryResult_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryResult, com.google.spanner.executor.v1.QueryResult.Builder, com.google.spanner.executor.v1.QueryResultOrBuilder> @@ -2135,7 +2183,7 @@ public Builder clearQueryResult() { public com.google.spanner.executor.v1.QueryResult.Builder getQueryResultBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getQueryResultFieldBuilder().getBuilder(); + return internalGetQueryResultFieldBuilder().getBuilder(); } /** @@ -2168,14 +2216,14 @@ public com.google.spanner.executor.v1.QueryResultOrBuilder getQueryResultOrBuild * * optional .google.spanner.executor.v1.QueryResult query_result = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryResult, com.google.spanner.executor.v1.QueryResult.Builder, com.google.spanner.executor.v1.QueryResultOrBuilder> - getQueryResultFieldBuilder() { + internalGetQueryResultFieldBuilder() { if (queryResultBuilder_ == null) { queryResultBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.QueryResult, com.google.spanner.executor.v1.QueryResult.Builder, com.google.spanner.executor.v1.QueryResultOrBuilder>( @@ -2358,7 +2406,7 @@ private void ensureDbPartitionIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.BatchPartition, com.google.spanner.executor.v1.BatchPartition.Builder, com.google.spanner.executor.v1.BatchPartitionOrBuilder> @@ -2631,7 +2679,7 @@ public Builder removeDbPartition(int index) { * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; */ public com.google.spanner.executor.v1.BatchPartition.Builder getDbPartitionBuilder(int index) { - return getDbPartitionFieldBuilder().getBuilder(index); + return internalGetDbPartitionFieldBuilder().getBuilder(index); } /** @@ -2683,7 +2731,7 @@ public com.google.spanner.executor.v1.BatchPartitionOrBuilder getDbPartitionOrBu * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; */ public com.google.spanner.executor.v1.BatchPartition.Builder addDbPartitionBuilder() { - return getDbPartitionFieldBuilder() + return internalGetDbPartitionFieldBuilder() .addBuilder(com.google.spanner.executor.v1.BatchPartition.getDefaultInstance()); } @@ -2698,7 +2746,7 @@ public com.google.spanner.executor.v1.BatchPartition.Builder addDbPartitionBuild * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; */ public com.google.spanner.executor.v1.BatchPartition.Builder addDbPartitionBuilder(int index) { - return getDbPartitionFieldBuilder() + return internalGetDbPartitionFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.BatchPartition.getDefaultInstance()); } @@ -2714,17 +2762,17 @@ public com.google.spanner.executor.v1.BatchPartition.Builder addDbPartitionBuild */ public java.util.List getDbPartitionBuilderList() { - return getDbPartitionFieldBuilder().getBuilderList(); + return internalGetDbPartitionFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.BatchPartition, com.google.spanner.executor.v1.BatchPartition.Builder, com.google.spanner.executor.v1.BatchPartitionOrBuilder> - getDbPartitionFieldBuilder() { + internalGetDbPartitionFieldBuilder() { if (dbPartitionBuilder_ == null) { dbPartitionBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.BatchPartition, com.google.spanner.executor.v1.BatchPartition.Builder, com.google.spanner.executor.v1.BatchPartitionOrBuilder>( @@ -2735,7 +2783,7 @@ public com.google.spanner.executor.v1.BatchPartition.Builder addDbPartitionBuild } private com.google.spanner.executor.v1.AdminResult adminResult_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.AdminResult, com.google.spanner.executor.v1.AdminResult.Builder, com.google.spanner.executor.v1.AdminResultOrBuilder> @@ -2881,7 +2929,7 @@ public Builder clearAdminResult() { public com.google.spanner.executor.v1.AdminResult.Builder getAdminResultBuilder() { bitField0_ |= 0x00000080; onChanged(); - return getAdminResultFieldBuilder().getBuilder(); + return internalGetAdminResultFieldBuilder().getBuilder(); } /** @@ -2912,14 +2960,14 @@ public com.google.spanner.executor.v1.AdminResultOrBuilder getAdminResultOrBuild * * optional .google.spanner.executor.v1.AdminResult admin_result = 8; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.AdminResult, com.google.spanner.executor.v1.AdminResult.Builder, com.google.spanner.executor.v1.AdminResultOrBuilder> - getAdminResultFieldBuilder() { + internalGetAdminResultFieldBuilder() { if (adminResultBuilder_ == null) { adminResultBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.AdminResult, com.google.spanner.executor.v1.AdminResult.Builder, com.google.spanner.executor.v1.AdminResultOrBuilder>( @@ -3085,7 +3133,7 @@ private void ensureChangeStreamRecordsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ChangeStreamRecord, com.google.spanner.executor.v1.ChangeStreamRecord.Builder, com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder> @@ -3362,7 +3410,7 @@ public Builder removeChangeStreamRecords(int index) { */ public com.google.spanner.executor.v1.ChangeStreamRecord.Builder getChangeStreamRecordsBuilder( int index) { - return getChangeStreamRecordsFieldBuilder().getBuilder(index); + return internalGetChangeStreamRecordsFieldBuilder().getBuilder(index); } /** @@ -3415,7 +3463,7 @@ public com.google.spanner.executor.v1.ChangeStreamRecord.Builder getChangeStream */ public com.google.spanner.executor.v1.ChangeStreamRecord.Builder addChangeStreamRecordsBuilder() { - return getChangeStreamRecordsFieldBuilder() + return internalGetChangeStreamRecordsFieldBuilder() .addBuilder(com.google.spanner.executor.v1.ChangeStreamRecord.getDefaultInstance()); } @@ -3431,7 +3479,7 @@ public com.google.spanner.executor.v1.ChangeStreamRecord.Builder getChangeStream */ public com.google.spanner.executor.v1.ChangeStreamRecord.Builder addChangeStreamRecordsBuilder( int index) { - return getChangeStreamRecordsFieldBuilder() + return internalGetChangeStreamRecordsFieldBuilder() .addBuilder( index, com.google.spanner.executor.v1.ChangeStreamRecord.getDefaultInstance()); } @@ -3448,17 +3496,17 @@ public com.google.spanner.executor.v1.ChangeStreamRecord.Builder addChangeStream */ public java.util.List getChangeStreamRecordsBuilderList() { - return getChangeStreamRecordsFieldBuilder().getBuilderList(); + return internalGetChangeStreamRecordsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ChangeStreamRecord, com.google.spanner.executor.v1.ChangeStreamRecord.Builder, com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder> - getChangeStreamRecordsFieldBuilder() { + internalGetChangeStreamRecordsFieldBuilder() { if (changeStreamRecordsBuilder_ == null) { changeStreamRecordsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ChangeStreamRecord, com.google.spanner.executor.v1.ChangeStreamRecord.Builder, com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder>( @@ -3471,15 +3519,80 @@ public com.google.spanner.executor.v1.ChangeStreamRecord.Builder addChangeStream return changeStreamRecordsBuilder_; } + private long snapshotIsolationTxnReadTimestamp_; + + /** + * + * + *
+     * If not zero, it indicates the read timestamp to use for validating
+     * the SnapshotIsolation transaction.
+     * 
+ * + * optional int64 snapshot_isolation_txn_read_timestamp = 11; + * + * @return Whether the snapshotIsolationTxnReadTimestamp field is set. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean hasSnapshotIsolationTxnReadTimestamp() { + return ((bitField0_ & 0x00000400) != 0); } + /** + * + * + *
+     * If not zero, it indicates the read timestamp to use for validating
+     * the SnapshotIsolation transaction.
+     * 
+ * + * optional int64 snapshot_isolation_txn_read_timestamp = 11; + * + * @return The snapshotIsolationTxnReadTimestamp. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public long getSnapshotIsolationTxnReadTimestamp() { + return snapshotIsolationTxnReadTimestamp_; + } + + /** + * + * + *
+     * If not zero, it indicates the read timestamp to use for validating
+     * the SnapshotIsolation transaction.
+     * 
+ * + * optional int64 snapshot_isolation_txn_read_timestamp = 11; + * + * @param value The snapshotIsolationTxnReadTimestamp to set. + * @return This builder for chaining. + */ + public Builder setSnapshotIsolationTxnReadTimestamp(long value) { + + snapshotIsolationTxnReadTimestamp_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * If not zero, it indicates the read timestamp to use for validating
+     * the SnapshotIsolation transaction.
+     * 
+ * + * optional int64 snapshot_isolation_txn_read_timestamp = 11; + * + * @return This builder for chaining. + */ + public Builder clearSnapshotIsolationTxnReadTimestamp() { + bitField0_ = (bitField0_ & ~0x00000400); + snapshotIsolationTxnReadTimestamp_ = 0L; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.SpannerActionOutcome) 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 index 471f68c4acb..f4670e974cc 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface SpannerActionOutcomeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerActionOutcome) @@ -443,4 +445,32 @@ public interface SpannerActionOutcomeOrBuilder */ com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder getChangeStreamRecordsOrBuilder( int index); + + /** + * + * + *
+   * If not zero, it indicates the read timestamp to use for validating
+   * the SnapshotIsolation transaction.
+   * 
+ * + * optional int64 snapshot_isolation_txn_read_timestamp = 11; + * + * @return Whether the snapshotIsolationTxnReadTimestamp field is set. + */ + boolean hasSnapshotIsolationTxnReadTimestamp(); + + /** + * + * + *
+   * If not zero, it indicates the read timestamp to use for validating
+   * the SnapshotIsolation transaction.
+   * 
+ * + * optional int64 snapshot_isolation_txn_read_timestamp = 11; + * + * @return The snapshotIsolationTxnReadTimestamp. + */ + long getSnapshotIsolationTxnReadTimestamp(); } 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 index 3fe8fb79320..8234124e88b 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.executor.v1.SpannerAsyncActionRequest} */ -public final class SpannerAsyncActionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SpannerAsyncActionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerAsyncActionRequest) SpannerAsyncActionRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpannerAsyncActionRequest"); + } + // Use SpannerAsyncActionRequest.newBuilder() to construct. - private SpannerAsyncActionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SpannerAsyncActionRequest(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_fieldAccessorTable @@ -250,38 +256,38 @@ public static com.google.spanner.executor.v1.SpannerAsyncActionRequest parseFrom 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -305,7 +311,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -319,7 +325,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.SpannerAsyncActionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerAsyncActionRequest) com.google.spanner.executor.v1.SpannerAsyncActionRequestOrBuilder { @@ -329,7 +335,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_fieldAccessorTable @@ -343,14 +349,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getActionFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetActionFieldBuilder(); } } @@ -411,39 +417,6 @@ private void buildPartial0(com.google.spanner.executor.v1.SpannerAsyncActionRequ 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.SpannerAsyncActionRequest) { @@ -497,7 +470,7 @@ public Builder mergeFrom( } // case 8 case 18: { - input.readMessage(getActionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetActionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -577,7 +550,7 @@ public Builder clearActionId() { } private com.google.spanner.executor.v1.SpannerAction action_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SpannerAction, com.google.spanner.executor.v1.SpannerAction.Builder, com.google.spanner.executor.v1.SpannerActionOrBuilder> @@ -722,7 +695,7 @@ public Builder clearAction() { public com.google.spanner.executor.v1.SpannerAction.Builder getActionBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getActionFieldBuilder().getBuilder(); + return internalGetActionFieldBuilder().getBuilder(); } /** @@ -753,14 +726,14 @@ public com.google.spanner.executor.v1.SpannerActionOrBuilder getActionOrBuilder( * * .google.spanner.executor.v1.SpannerAction action = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SpannerAction, com.google.spanner.executor.v1.SpannerAction.Builder, com.google.spanner.executor.v1.SpannerActionOrBuilder> - getActionFieldBuilder() { + internalGetActionFieldBuilder() { if (actionBuilder_ == null) { actionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SpannerAction, com.google.spanner.executor.v1.SpannerAction.Builder, com.google.spanner.executor.v1.SpannerActionOrBuilder>( @@ -770,17 +743,6 @@ public com.google.spanner.executor.v1.SpannerActionOrBuilder getActionOrBuilder( 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) } 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 index 8fde05423de..2def902b47f 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface SpannerAsyncActionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerAsyncActionRequest) 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 index 7b9cd2a7911..aff91a1e20e 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.executor.v1.SpannerAsyncActionResponse} */ -public final class SpannerAsyncActionResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SpannerAsyncActionResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerAsyncActionResponse) SpannerAsyncActionResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpannerAsyncActionResponse"); + } + // Use SpannerAsyncActionResponse.newBuilder() to construct. - private SpannerAsyncActionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SpannerAsyncActionResponse(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_fieldAccessorTable @@ -253,38 +259,38 @@ public static com.google.spanner.executor.v1.SpannerAsyncActionResponse parseFro 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -308,7 +314,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -322,7 +328,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.SpannerAsyncActionResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerAsyncActionResponse) com.google.spanner.executor.v1.SpannerAsyncActionResponseOrBuilder { @@ -332,7 +338,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_fieldAccessorTable @@ -346,14 +352,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getOutcomeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOutcomeFieldBuilder(); } } @@ -414,39 +420,6 @@ private void buildPartial0(com.google.spanner.executor.v1.SpannerAsyncActionResp 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.SpannerAsyncActionResponse) { @@ -500,7 +473,7 @@ public Builder mergeFrom( } // case 8 case 18: { - input.readMessage(getOutcomeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetOutcomeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -580,7 +553,7 @@ public Builder clearActionId() { } private com.google.spanner.executor.v1.SpannerActionOutcome outcome_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SpannerActionOutcome, com.google.spanner.executor.v1.SpannerActionOutcome.Builder, com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder> @@ -734,7 +707,7 @@ public Builder clearOutcome() { public com.google.spanner.executor.v1.SpannerActionOutcome.Builder getOutcomeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getOutcomeFieldBuilder().getBuilder(); + return internalGetOutcomeFieldBuilder().getBuilder(); } /** @@ -767,14 +740,14 @@ public com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder getOutcomeOr * * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SpannerActionOutcome, com.google.spanner.executor.v1.SpannerActionOutcome.Builder, com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder> - getOutcomeFieldBuilder() { + internalGetOutcomeFieldBuilder() { if (outcomeBuilder_ == null) { outcomeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SpannerActionOutcome, com.google.spanner.executor.v1.SpannerActionOutcome.Builder, com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder>( @@ -784,17 +757,6 @@ public com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder getOutcomeOr 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) } 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 index 16863379b57..b65ccd6e3cb 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface SpannerAsyncActionResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerAsyncActionResponse) diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptions.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptions.java index e1e17854f6b..26c5fb160bf 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptions.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.executor.v1.SpannerOptions} */ -public final class SpannerOptions extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SpannerOptions extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerOptions) SpannerOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpannerOptions"); + } + // Use SpannerOptions.newBuilder() to construct. - private SpannerOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SpannerOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SpannerOptions() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SpannerOptions(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerOptions_fieldAccessorTable @@ -223,38 +229,38 @@ public static com.google.spanner.executor.v1.SpannerOptions parseFrom( public static com.google.spanner.executor.v1.SpannerOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.SpannerOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.executor.v1.SpannerOptions parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.SpannerOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.executor.v1.SpannerOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.executor.v1.SpannerOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -277,7 +283,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -291,7 +297,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.SpannerOptions} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerOptions) com.google.spanner.executor.v1.SpannerOptionsOrBuilder { @@ -301,7 +307,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_SpannerOptions_fieldAccessorTable @@ -315,14 +321,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSessionPoolOptionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSessionPoolOptionsFieldBuilder(); } } @@ -382,39 +388,6 @@ private void buildPartial0(com.google.spanner.executor.v1.SpannerOptions result) 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.SpannerOptions) { @@ -459,7 +432,7 @@ public Builder mergeFrom( case 10: { input.readMessage( - getSessionPoolOptionsFieldBuilder().getBuilder(), extensionRegistry); + internalGetSessionPoolOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -483,7 +456,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.executor.v1.SessionPoolOptions sessionPoolOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SessionPoolOptions, com.google.spanner.executor.v1.SessionPoolOptions.Builder, com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder> @@ -632,7 +605,7 @@ public Builder clearSessionPoolOptions() { getSessionPoolOptionsBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getSessionPoolOptionsFieldBuilder().getBuilder(); + return internalGetSessionPoolOptionsFieldBuilder().getBuilder(); } /** @@ -664,14 +637,14 @@ public Builder clearSessionPoolOptions() { * * .google.spanner.executor.v1.SessionPoolOptions session_pool_options = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SessionPoolOptions, com.google.spanner.executor.v1.SessionPoolOptions.Builder, com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder> - getSessionPoolOptionsFieldBuilder() { + internalGetSessionPoolOptionsFieldBuilder() { if (sessionPoolOptionsBuilder_ == null) { sessionPoolOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.SessionPoolOptions, com.google.spanner.executor.v1.SessionPoolOptions.Builder, com.google.spanner.executor.v1.SessionPoolOptionsOrBuilder>( @@ -681,17 +654,6 @@ public Builder clearSessionPoolOptions() { return sessionPoolOptionsBuilder_; } - @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.SpannerOptions) } diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptionsOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptionsOrBuilder.java index a7a57c31081..724808e7355 100644 --- a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptionsOrBuilder.java +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerOptionsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface SpannerOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerOptions) 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 index 785f2aaa733..da00551fc00 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -59,14 +60,25 @@ * * Protobuf type {@code google.spanner.executor.v1.StartBatchTransactionAction} */ -public final class StartBatchTransactionAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class StartBatchTransactionAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.StartBatchTransactionAction) StartBatchTransactionActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StartBatchTransactionAction"); + } + // Use StartBatchTransactionAction.newBuilder() to construct. - private StartBatchTransactionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StartBatchTransactionAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -74,19 +86,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_StartBatchTransactionAction_fieldAccessorTable @@ -317,8 +323,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cloudDatabaseRole_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, cloudDatabaseRole_); } getUnknownFields().writeTo(output); } @@ -339,8 +345,8 @@ public int getSerializedSize() { 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cloudDatabaseRole_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, cloudDatabaseRole_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -437,38 +443,38 @@ public static com.google.spanner.executor.v1.StartBatchTransactionAction parseFr 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -492,7 +498,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -537,7 +543,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.StartBatchTransactionAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.StartBatchTransactionAction) com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder { @@ -547,7 +553,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_StartBatchTransactionAction_fieldAccessorTable @@ -559,7 +565,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.StartBatchTransactionAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -624,39 +630,6 @@ private void buildPartialOneofs( } } - @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) { @@ -719,7 +692,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getBatchTxnTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBatchTxnTimeFieldBuilder().getBuilder(), extensionRegistry); paramCase_ = 1; break; } // case 10 @@ -768,7 +742,7 @@ public Builder clearParam() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -926,7 +900,7 @@ public Builder clearBatchTxnTime() { * .google.protobuf.Timestamp batch_txn_time = 1; */ public com.google.protobuf.Timestamp.Builder getBatchTxnTimeBuilder() { - return getBatchTxnTimeFieldBuilder().getBuilder(); + return internalGetBatchTxnTimeFieldBuilder().getBuilder(); } /** @@ -959,17 +933,17 @@ public com.google.protobuf.TimestampOrBuilder getBatchTxnTimeOrBuilder() { * * .google.protobuf.Timestamp batch_txn_time = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getBatchTxnTimeFieldBuilder() { + internalGetBatchTxnTimeFieldBuilder() { if (batchTxnTimeBuilder_ == null) { if (!(paramCase_ == 1)) { param_ = com.google.protobuf.Timestamp.getDefaultInstance(); } batchTxnTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1185,17 +1159,6 @@ public Builder setCloudDatabaseRoleBytes(com.google.protobuf.ByteString value) { 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) } 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 index 2cacfb4a951..01187e03acb 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface StartBatchTransactionActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.StartBatchTransactionAction) 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 index 1659953e9d0..3cce17f84b5 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.StartTransactionAction} */ -public final class StartTransactionAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class StartTransactionAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.StartTransactionAction) StartTransactionActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StartTransactionAction"); + } + // Use StartTransactionAction.newBuilder() to construct. - private StartTransactionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StartTransactionAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private StartTransactionAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_StartTransactionAction_fieldAccessorTable @@ -265,7 +271,8 @@ public com.google.protobuf.ByteString getTransactionSeedBytes() { * * *
-   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * Execution options (e.g., whether transaction is opaque, optimistic,
+   * excluded from change streams).
    * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -282,7 +289,8 @@ public boolean hasExecutionOptions() { * * *
-   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * Execution options (e.g., whether transaction is opaque, optimistic,
+   * excluded from change streams).
    * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -301,7 +309,8 @@ public com.google.spanner.executor.v1.TransactionExecutionOptions getExecutionOp * * *
-   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * Execution options (e.g., whether transaction is opaque, optimistic,
+   * excluded from change streams).
    * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -335,8 +344,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionSeed_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, transactionSeed_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getExecutionOptions()); @@ -356,8 +365,8 @@ public int getSerializedSize() { 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionSeed_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, transactionSeed_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExecutionOptions()); @@ -455,38 +464,38 @@ public static com.google.spanner.executor.v1.StartTransactionAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -510,7 +519,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -524,7 +533,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.StartTransactionAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.StartTransactionAction) com.google.spanner.executor.v1.StartTransactionActionOrBuilder { @@ -534,7 +543,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_StartTransactionAction_fieldAccessorTable @@ -548,16 +557,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConcurrencyFieldBuilder(); - getTableFieldBuilder(); - getExecutionOptionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetConcurrencyFieldBuilder(); + internalGetTableFieldBuilder(); + internalGetExecutionOptionsFieldBuilder(); } } @@ -650,39 +659,6 @@ private void buildPartial0(com.google.spanner.executor.v1.StartTransactionAction 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) { @@ -718,8 +694,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.StartTransactionAction o table_ = other.table_; bitField0_ = (bitField0_ & ~0x00000002); tableBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTableFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTableFieldBuilder() : null; } else { tableBuilder_.addAllMessages(other.table_); @@ -762,7 +738,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getConcurrencyFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetConcurrencyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -788,7 +765,7 @@ public Builder mergeFrom( case 34: { input.readMessage( - getExecutionOptionsFieldBuilder().getBuilder(), extensionRegistry); + internalGetExecutionOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -812,7 +789,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.executor.v1.Concurrency concurrency_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.Concurrency, com.google.spanner.executor.v1.Concurrency.Builder, com.google.spanner.executor.v1.ConcurrencyOrBuilder> @@ -965,7 +942,7 @@ public Builder clearConcurrency() { public com.google.spanner.executor.v1.Concurrency.Builder getConcurrencyBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getConcurrencyFieldBuilder().getBuilder(); + return internalGetConcurrencyFieldBuilder().getBuilder(); } /** @@ -998,14 +975,14 @@ public com.google.spanner.executor.v1.ConcurrencyOrBuilder getConcurrencyOrBuild * * optional .google.spanner.executor.v1.Concurrency concurrency = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.Concurrency, com.google.spanner.executor.v1.Concurrency.Builder, com.google.spanner.executor.v1.ConcurrencyOrBuilder> - getConcurrencyFieldBuilder() { + internalGetConcurrencyFieldBuilder() { if (concurrencyBuilder_ == null) { concurrencyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.Concurrency, com.google.spanner.executor.v1.Concurrency.Builder, com.google.spanner.executor.v1.ConcurrencyOrBuilder>( @@ -1025,7 +1002,7 @@ private void ensureTableIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.TableMetadata, com.google.spanner.executor.v1.TableMetadata.Builder, com.google.spanner.executor.v1.TableMetadataOrBuilder> @@ -1297,7 +1274,7 @@ public Builder removeTable(int index) { * repeated .google.spanner.executor.v1.TableMetadata table = 2; */ public com.google.spanner.executor.v1.TableMetadata.Builder getTableBuilder(int index) { - return getTableFieldBuilder().getBuilder(index); + return internalGetTableFieldBuilder().getBuilder(index); } /** @@ -1348,7 +1325,7 @@ public com.google.spanner.executor.v1.TableMetadataOrBuilder getTableOrBuilder(i * repeated .google.spanner.executor.v1.TableMetadata table = 2; */ public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder() { - return getTableFieldBuilder() + return internalGetTableFieldBuilder() .addBuilder(com.google.spanner.executor.v1.TableMetadata.getDefaultInstance()); } @@ -1363,7 +1340,7 @@ public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder() { * repeated .google.spanner.executor.v1.TableMetadata table = 2; */ public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder(int index) { - return getTableFieldBuilder() + return internalGetTableFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.TableMetadata.getDefaultInstance()); } @@ -1379,17 +1356,17 @@ public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder(int */ public java.util.List getTableBuilderList() { - return getTableFieldBuilder().getBuilderList(); + return internalGetTableFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.TableMetadata, com.google.spanner.executor.v1.TableMetadata.Builder, com.google.spanner.executor.v1.TableMetadataOrBuilder> - getTableFieldBuilder() { + internalGetTableFieldBuilder() { if (tableBuilder_ == null) { tableBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.TableMetadata, com.google.spanner.executor.v1.TableMetadata.Builder, com.google.spanner.executor.v1.TableMetadataOrBuilder>( @@ -1516,7 +1493,7 @@ public Builder setTransactionSeedBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.executor.v1.TransactionExecutionOptions executionOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.TransactionExecutionOptions, com.google.spanner.executor.v1.TransactionExecutionOptions.Builder, com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder> @@ -1526,7 +1503,8 @@ public Builder setTransactionSeedBytes(com.google.protobuf.ByteString value) { * * *
-     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * Execution options (e.g., whether transaction is opaque, optimistic,
+     * excluded from change streams).
      * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -1542,7 +1520,8 @@ public boolean hasExecutionOptions() { * * *
-     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * Execution options (e.g., whether transaction is opaque, optimistic,
+     * excluded from change streams).
      * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -1564,7 +1543,8 @@ public com.google.spanner.executor.v1.TransactionExecutionOptions getExecutionOp * * *
-     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * Execution options (e.g., whether transaction is opaque, optimistic,
+     * excluded from change streams).
      * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -1589,7 +1569,8 @@ public Builder setExecutionOptions( * * *
-     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * Execution options (e.g., whether transaction is opaque, optimistic,
+     * excluded from change streams).
      * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -1611,7 +1592,8 @@ public Builder setExecutionOptions( * * *
-     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * Execution options (e.g., whether transaction is opaque, optimistic,
+     * excluded from change streams).
      * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -1643,7 +1625,8 @@ public Builder mergeExecutionOptions( * * *
-     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * Execution options (e.g., whether transaction is opaque, optimistic,
+     * excluded from change streams).
      * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -1664,7 +1647,8 @@ public Builder clearExecutionOptions() { * * *
-     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * Execution options (e.g., whether transaction is opaque, optimistic,
+     * excluded from change streams).
      * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -1674,14 +1658,15 @@ public Builder clearExecutionOptions() { getExecutionOptionsBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getExecutionOptionsFieldBuilder().getBuilder(); + return internalGetExecutionOptionsFieldBuilder().getBuilder(); } /** * * *
-     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * Execution options (e.g., whether transaction is opaque, optimistic,
+     * excluded from change streams).
      * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -1702,20 +1687,21 @@ public Builder clearExecutionOptions() { * * *
-     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * Execution options (e.g., whether transaction is opaque, optimistic,
+     * excluded from change streams).
      * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.TransactionExecutionOptions, com.google.spanner.executor.v1.TransactionExecutionOptions.Builder, com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder> - getExecutionOptionsFieldBuilder() { + internalGetExecutionOptionsFieldBuilder() { if (executionOptionsBuilder_ == null) { executionOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.TransactionExecutionOptions, com.google.spanner.executor.v1.TransactionExecutionOptions.Builder, com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder>( @@ -1725,17 +1711,6 @@ public Builder clearExecutionOptions() { 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) } 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 index a6c18a27aa5..e82420ed5a9 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface StartTransactionActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.StartTransactionAction) @@ -157,7 +159,8 @@ public interface StartTransactionActionOrBuilder * * *
-   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * Execution options (e.g., whether transaction is opaque, optimistic,
+   * excluded from change streams).
    * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -171,7 +174,8 @@ public interface StartTransactionActionOrBuilder * * *
-   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * Execution options (e.g., whether transaction is opaque, optimistic,
+   * excluded from change streams).
    * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; @@ -185,7 +189,8 @@ public interface StartTransactionActionOrBuilder * * *
-   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * Execution options (e.g., whether transaction is opaque, optimistic,
+   * excluded from change streams).
    * 
* * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; 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 index cf3b5bab3c3..a7f2dcc8b33 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.TableMetadata} */ -public final class TableMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class TableMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.TableMetadata) TableMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TableMetadata"); + } + // Use TableMetadata.newBuilder() to construct. - private TableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TableMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private TableMetadata() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_TableMetadata_fieldAccessorTable @@ -285,8 +291,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } for (int i = 0; i < column_.size(); i++) { output.writeMessage(2, column_.get(i)); @@ -303,8 +309,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } for (int i = 0; i < column_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, column_.get(i)); @@ -394,38 +400,38 @@ public static com.google.spanner.executor.v1.TableMetadata parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -448,7 +454,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -462,7 +468,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.TableMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.TableMetadata) com.google.spanner.executor.v1.TableMetadataOrBuilder { @@ -472,7 +478,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_TableMetadata_fieldAccessorTable @@ -484,7 +490,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.TableMetadata.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -570,39 +576,6 @@ private void buildPartial0(com.google.spanner.executor.v1.TableMetadata result) } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.executor.v1.TableMetadata) { @@ -639,8 +612,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.TableMetadata other) { column_ = other.column_; bitField0_ = (bitField0_ & ~0x00000002); columnBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getColumnFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetColumnFieldBuilder() : null; } else { columnBuilder_.addAllMessages(other.column_); @@ -666,8 +639,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.TableMetadata other) { keyColumn_ = other.keyColumn_; bitField0_ = (bitField0_ & ~0x00000004); keyColumnBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getKeyColumnFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetKeyColumnFieldBuilder() : null; } else { keyColumnBuilder_.addAllMessages(other.keyColumn_); @@ -872,7 +845,7 @@ private void ensureColumnIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ColumnMetadata, com.google.spanner.executor.v1.ColumnMetadata.Builder, com.google.spanner.executor.v1.ColumnMetadataOrBuilder> @@ -1132,7 +1105,7 @@ public Builder removeColumn(int index) { * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; */ public com.google.spanner.executor.v1.ColumnMetadata.Builder getColumnBuilder(int index) { - return getColumnFieldBuilder().getBuilder(index); + return internalGetColumnFieldBuilder().getBuilder(index); } /** @@ -1180,7 +1153,7 @@ public com.google.spanner.executor.v1.ColumnMetadataOrBuilder getColumnOrBuilder * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; */ public com.google.spanner.executor.v1.ColumnMetadata.Builder addColumnBuilder() { - return getColumnFieldBuilder() + return internalGetColumnFieldBuilder() .addBuilder(com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance()); } @@ -1194,7 +1167,7 @@ public com.google.spanner.executor.v1.ColumnMetadata.Builder addColumnBuilder() * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; */ public com.google.spanner.executor.v1.ColumnMetadata.Builder addColumnBuilder(int index) { - return getColumnFieldBuilder() + return internalGetColumnFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance()); } @@ -1209,17 +1182,17 @@ public com.google.spanner.executor.v1.ColumnMetadata.Builder addColumnBuilder(in */ public java.util.List getColumnBuilderList() { - return getColumnFieldBuilder().getBuilderList(); + return internalGetColumnFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ColumnMetadata, com.google.spanner.executor.v1.ColumnMetadata.Builder, com.google.spanner.executor.v1.ColumnMetadataOrBuilder> - getColumnFieldBuilder() { + internalGetColumnFieldBuilder() { if (columnBuilder_ == null) { columnBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ColumnMetadata, com.google.spanner.executor.v1.ColumnMetadata.Builder, com.google.spanner.executor.v1.ColumnMetadataOrBuilder>( @@ -1240,7 +1213,7 @@ private void ensureKeyColumnIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ColumnMetadata, com.google.spanner.executor.v1.ColumnMetadata.Builder, com.google.spanner.executor.v1.ColumnMetadataOrBuilder> @@ -1500,7 +1473,7 @@ public Builder removeKeyColumn(int index) { * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; */ public com.google.spanner.executor.v1.ColumnMetadata.Builder getKeyColumnBuilder(int index) { - return getKeyColumnFieldBuilder().getBuilder(index); + return internalGetKeyColumnFieldBuilder().getBuilder(index); } /** @@ -1548,7 +1521,7 @@ public com.google.spanner.executor.v1.ColumnMetadataOrBuilder getKeyColumnOrBuil * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; */ public com.google.spanner.executor.v1.ColumnMetadata.Builder addKeyColumnBuilder() { - return getKeyColumnFieldBuilder() + return internalGetKeyColumnFieldBuilder() .addBuilder(com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance()); } @@ -1562,7 +1535,7 @@ public com.google.spanner.executor.v1.ColumnMetadata.Builder addKeyColumnBuilder * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; */ public com.google.spanner.executor.v1.ColumnMetadata.Builder addKeyColumnBuilder(int index) { - return getKeyColumnFieldBuilder() + return internalGetKeyColumnFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance()); } @@ -1577,17 +1550,17 @@ public com.google.spanner.executor.v1.ColumnMetadata.Builder addKeyColumnBuilder */ public java.util.List getKeyColumnBuilderList() { - return getKeyColumnFieldBuilder().getBuilderList(); + return internalGetKeyColumnFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ColumnMetadata, com.google.spanner.executor.v1.ColumnMetadata.Builder, com.google.spanner.executor.v1.ColumnMetadataOrBuilder> - getKeyColumnFieldBuilder() { + internalGetKeyColumnFieldBuilder() { if (keyColumnBuilder_ == null) { keyColumnBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.ColumnMetadata, com.google.spanner.executor.v1.ColumnMetadata.Builder, com.google.spanner.executor.v1.ColumnMetadataOrBuilder>( @@ -1597,17 +1570,6 @@ public com.google.spanner.executor.v1.ColumnMetadata.Builder addKeyColumnBuilder 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) } 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 index 9e0da0c1e8c..4e9df18c3ae 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface TableMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.TableMetadata) 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 index 4c01f542cdd..73155bb9dae 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,46 +14,44 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 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 +/** Protobuf type {@code google.spanner.executor.v1.TransactionExecutionOptions} */ +@com.google.protobuf.Generated +public final class TransactionExecutionOptions extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.TransactionExecutionOptions) TransactionExecutionOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TransactionExecutionOptions"); + } + // Use TransactionExecutionOptions.newBuilder() to construct. - private TransactionExecutionOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TransactionExecutionOptions(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_TransactionExecutionOptions_fieldAccessorTable @@ -81,6 +79,106 @@ public boolean getOptimistic() { return optimistic_; } + public static final int EXCLUDE_FROM_CHANGE_STREAMS_FIELD_NUMBER = 2; + private boolean excludeFromChangeStreams_ = false; + + /** + * + * + *
+   * Whether traffic from this transaction will be excluded from tracking change
+   * streams with allow_txn_exclusion=true.
+   * 
+ * + * bool exclude_from_change_streams = 2; + * + * @return The excludeFromChangeStreams. + */ + @java.lang.Override + public boolean getExcludeFromChangeStreams() { + return excludeFromChangeStreams_; + } + + public static final int SERIALIZABLE_OPTIMISTIC_FIELD_NUMBER = 3; + private boolean serializableOptimistic_ = false; + + /** + * + * + *
+   * Whether serializable isolation with optimistic mode concurrency should be
+   * used to execute this transaction.
+   * 
+ * + * bool serializable_optimistic = 3; + * + * @return The serializableOptimistic. + */ + @java.lang.Override + public boolean getSerializableOptimistic() { + return serializableOptimistic_; + } + + public static final int SNAPSHOT_ISOLATION_OPTIMISTIC_FIELD_NUMBER = 4; + private boolean snapshotIsolationOptimistic_ = false; + + /** + * + * + *
+   * Whether snapshot isolation with optimistic mode concurrency should be used
+   * to execute this transaction.
+   * 
+ * + * bool snapshot_isolation_optimistic = 4; + * + * @return The snapshotIsolationOptimistic. + */ + @java.lang.Override + public boolean getSnapshotIsolationOptimistic() { + return snapshotIsolationOptimistic_; + } + + public static final int SNAPSHOT_ISOLATION_PESSIMISTIC_FIELD_NUMBER = 5; + private boolean snapshotIsolationPessimistic_ = false; + + /** + * + * + *
+   * Whether snapshot isolation with pessimistic mode concurrency should be used
+   * to execute this transaction.
+   * 
+ * + * bool snapshot_isolation_pessimistic = 5; + * + * @return The snapshotIsolationPessimistic. + */ + @java.lang.Override + public boolean getSnapshotIsolationPessimistic() { + return snapshotIsolationPessimistic_; + } + + public static final int EXCLUDE_TXN_FROM_CHANGE_STREAMS_FIELD_NUMBER = 6; + private boolean excludeTxnFromChangeStreams_ = false; + + /** + * + * + *
+   * Whether to exclude mutations of this transaction from the allowed tracking
+   * change streams.
+   * 
+ * + * bool exclude_txn_from_change_streams = 6; + * + * @return The excludeTxnFromChangeStreams. + */ + @java.lang.Override + public boolean getExcludeTxnFromChangeStreams() { + return excludeTxnFromChangeStreams_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -98,6 +196,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (optimistic_ != false) { output.writeBool(1, optimistic_); } + if (excludeFromChangeStreams_ != false) { + output.writeBool(2, excludeFromChangeStreams_); + } + if (serializableOptimistic_ != false) { + output.writeBool(3, serializableOptimistic_); + } + if (snapshotIsolationOptimistic_ != false) { + output.writeBool(4, snapshotIsolationOptimistic_); + } + if (snapshotIsolationPessimistic_ != false) { + output.writeBool(5, snapshotIsolationPessimistic_); + } + if (excludeTxnFromChangeStreams_ != false) { + output.writeBool(6, excludeTxnFromChangeStreams_); + } getUnknownFields().writeTo(output); } @@ -110,6 +223,24 @@ public int getSerializedSize() { if (optimistic_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, optimistic_); } + if (excludeFromChangeStreams_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, excludeFromChangeStreams_); + } + if (serializableOptimistic_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, serializableOptimistic_); + } + if (snapshotIsolationOptimistic_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(4, snapshotIsolationOptimistic_); + } + if (snapshotIsolationPessimistic_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(5, snapshotIsolationPessimistic_); + } + if (excludeTxnFromChangeStreams_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(6, excludeTxnFromChangeStreams_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -127,6 +258,11 @@ public boolean equals(final java.lang.Object obj) { (com.google.spanner.executor.v1.TransactionExecutionOptions) obj; if (getOptimistic() != other.getOptimistic()) return false; + if (getExcludeFromChangeStreams() != other.getExcludeFromChangeStreams()) return false; + if (getSerializableOptimistic() != other.getSerializableOptimistic()) return false; + if (getSnapshotIsolationOptimistic() != other.getSnapshotIsolationOptimistic()) return false; + if (getSnapshotIsolationPessimistic() != other.getSnapshotIsolationPessimistic()) return false; + if (getExcludeTxnFromChangeStreams() != other.getExcludeTxnFromChangeStreams()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -140,6 +276,17 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + OPTIMISTIC_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOptimistic()); + hash = (37 * hash) + EXCLUDE_FROM_CHANGE_STREAMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExcludeFromChangeStreams()); + hash = (37 * hash) + SERIALIZABLE_OPTIMISTIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSerializableOptimistic()); + hash = (37 * hash) + SNAPSHOT_ISOLATION_OPTIMISTIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSnapshotIsolationOptimistic()); + hash = (37 * hash) + SNAPSHOT_ISOLATION_PESSIMISTIC_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSnapshotIsolationPessimistic()); + hash = (37 * hash) + EXCLUDE_TXN_FROM_CHANGE_STREAMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExcludeTxnFromChangeStreams()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -182,38 +329,38 @@ public static com.google.spanner.executor.v1.TransactionExecutionOptions parseFr 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -237,21 +384,13 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.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 + /** Protobuf type {@code google.spanner.executor.v1.TransactionExecutionOptions} */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.TransactionExecutionOptions) com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder { @@ -261,7 +400,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_TransactionExecutionOptions_fieldAccessorTable @@ -273,7 +412,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.TransactionExecutionOptions.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -282,6 +421,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; optimistic_ = false; + excludeFromChangeStreams_ = false; + serializableOptimistic_ = false; + snapshotIsolationOptimistic_ = false; + snapshotIsolationPessimistic_ = false; + excludeTxnFromChangeStreams_ = false; return this; } @@ -321,39 +465,21 @@ private void buildPartial0(com.google.spanner.executor.v1.TransactionExecutionOp 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); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.excludeFromChangeStreams_ = excludeFromChangeStreams_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.serializableOptimistic_ = serializableOptimistic_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.snapshotIsolationOptimistic_ = snapshotIsolationOptimistic_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.snapshotIsolationPessimistic_ = snapshotIsolationPessimistic_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.excludeTxnFromChangeStreams_ = excludeTxnFromChangeStreams_; + } } @java.lang.Override @@ -372,6 +498,21 @@ public Builder mergeFrom(com.google.spanner.executor.v1.TransactionExecutionOpti if (other.getOptimistic() != false) { setOptimistic(other.getOptimistic()); } + if (other.getExcludeFromChangeStreams() != false) { + setExcludeFromChangeStreams(other.getExcludeFromChangeStreams()); + } + if (other.getSerializableOptimistic() != false) { + setSerializableOptimistic(other.getSerializableOptimistic()); + } + if (other.getSnapshotIsolationOptimistic() != false) { + setSnapshotIsolationOptimistic(other.getSnapshotIsolationOptimistic()); + } + if (other.getSnapshotIsolationPessimistic() != false) { + setSnapshotIsolationPessimistic(other.getSnapshotIsolationPessimistic()); + } + if (other.getExcludeTxnFromChangeStreams() != false) { + setExcludeTxnFromChangeStreams(other.getExcludeTxnFromChangeStreams()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -404,6 +545,36 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 8 + case 16: + { + excludeFromChangeStreams_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + serializableOptimistic_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + snapshotIsolationOptimistic_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + snapshotIsolationPessimistic_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + excludeTxnFromChangeStreams_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -479,15 +650,299 @@ public Builder clearOptimistic() { return this; } + private boolean excludeFromChangeStreams_; + + /** + * + * + *
+     * Whether traffic from this transaction will be excluded from tracking change
+     * streams with allow_txn_exclusion=true.
+     * 
+ * + * bool exclude_from_change_streams = 2; + * + * @return The excludeFromChangeStreams. + */ + @java.lang.Override + public boolean getExcludeFromChangeStreams() { + return excludeFromChangeStreams_; + } + + /** + * + * + *
+     * Whether traffic from this transaction will be excluded from tracking change
+     * streams with allow_txn_exclusion=true.
+     * 
+ * + * bool exclude_from_change_streams = 2; + * + * @param value The excludeFromChangeStreams to set. + * @return This builder for chaining. + */ + public Builder setExcludeFromChangeStreams(boolean value) { + + excludeFromChangeStreams_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Whether traffic from this transaction will be excluded from tracking change
+     * streams with allow_txn_exclusion=true.
+     * 
+ * + * bool exclude_from_change_streams = 2; + * + * @return This builder for chaining. + */ + public Builder clearExcludeFromChangeStreams() { + bitField0_ = (bitField0_ & ~0x00000002); + excludeFromChangeStreams_ = false; + onChanged(); + return this; + } + + private boolean serializableOptimistic_; + + /** + * + * + *
+     * Whether serializable isolation with optimistic mode concurrency should be
+     * used to execute this transaction.
+     * 
+ * + * bool serializable_optimistic = 3; + * + * @return The serializableOptimistic. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean getSerializableOptimistic() { + return serializableOptimistic_; + } + + /** + * + * + *
+     * Whether serializable isolation with optimistic mode concurrency should be
+     * used to execute this transaction.
+     * 
+ * + * bool serializable_optimistic = 3; + * + * @param value The serializableOptimistic to set. + * @return This builder for chaining. + */ + public Builder setSerializableOptimistic(boolean value) { + + serializableOptimistic_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } + /** + * + * + *
+     * Whether serializable isolation with optimistic mode concurrency should be
+     * used to execute this transaction.
+     * 
+ * + * bool serializable_optimistic = 3; + * + * @return This builder for chaining. + */ + public Builder clearSerializableOptimistic() { + bitField0_ = (bitField0_ & ~0x00000004); + serializableOptimistic_ = false; + onChanged(); + return this; + } + + private boolean snapshotIsolationOptimistic_; + + /** + * + * + *
+     * Whether snapshot isolation with optimistic mode concurrency should be used
+     * to execute this transaction.
+     * 
+ * + * bool snapshot_isolation_optimistic = 4; + * + * @return The snapshotIsolationOptimistic. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public boolean getSnapshotIsolationOptimistic() { + return snapshotIsolationOptimistic_; + } + + /** + * + * + *
+     * Whether snapshot isolation with optimistic mode concurrency should be used
+     * to execute this transaction.
+     * 
+ * + * bool snapshot_isolation_optimistic = 4; + * + * @param value The snapshotIsolationOptimistic to set. + * @return This builder for chaining. + */ + public Builder setSnapshotIsolationOptimistic(boolean value) { + + snapshotIsolationOptimistic_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Whether snapshot isolation with optimistic mode concurrency should be used
+     * to execute this transaction.
+     * 
+ * + * bool snapshot_isolation_optimistic = 4; + * + * @return This builder for chaining. + */ + public Builder clearSnapshotIsolationOptimistic() { + bitField0_ = (bitField0_ & ~0x00000008); + snapshotIsolationOptimistic_ = false; + onChanged(); + return this; + } + + private boolean snapshotIsolationPessimistic_; + + /** + * + * + *
+     * Whether snapshot isolation with pessimistic mode concurrency should be used
+     * to execute this transaction.
+     * 
+ * + * bool snapshot_isolation_pessimistic = 5; + * + * @return The snapshotIsolationPessimistic. + */ + @java.lang.Override + public boolean getSnapshotIsolationPessimistic() { + return snapshotIsolationPessimistic_; + } + + /** + * + * + *
+     * Whether snapshot isolation with pessimistic mode concurrency should be used
+     * to execute this transaction.
+     * 
+ * + * bool snapshot_isolation_pessimistic = 5; + * + * @param value The snapshotIsolationPessimistic to set. + * @return This builder for chaining. + */ + public Builder setSnapshotIsolationPessimistic(boolean value) { + + snapshotIsolationPessimistic_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Whether snapshot isolation with pessimistic mode concurrency should be used
+     * to execute this transaction.
+     * 
+ * + * bool snapshot_isolation_pessimistic = 5; + * + * @return This builder for chaining. + */ + public Builder clearSnapshotIsolationPessimistic() { + bitField0_ = (bitField0_ & ~0x00000010); + snapshotIsolationPessimistic_ = false; + onChanged(); + return this; + } + + private boolean excludeTxnFromChangeStreams_; + + /** + * + * + *
+     * Whether to exclude mutations of this transaction from the allowed tracking
+     * change streams.
+     * 
+ * + * bool exclude_txn_from_change_streams = 6; + * + * @return The excludeTxnFromChangeStreams. + */ + @java.lang.Override + public boolean getExcludeTxnFromChangeStreams() { + return excludeTxnFromChangeStreams_; + } + + /** + * + * + *
+     * Whether to exclude mutations of this transaction from the allowed tracking
+     * change streams.
+     * 
+ * + * bool exclude_txn_from_change_streams = 6; + * + * @param value The excludeTxnFromChangeStreams to set. + * @return This builder for chaining. + */ + public Builder setExcludeTxnFromChangeStreams(boolean value) { + + excludeTxnFromChangeStreams_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Whether to exclude mutations of this transaction from the allowed tracking
+     * change streams.
+     * 
+ * + * bool exclude_txn_from_change_streams = 6; + * + * @return This builder for chaining. + */ + public Builder clearExcludeTxnFromChangeStreams() { + bitField0_ = (bitField0_ & ~0x00000020); + excludeTxnFromChangeStreams_ = false; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.TransactionExecutionOptions) 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 index 6d221f36997..d8a2ec73d1e 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface TransactionExecutionOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.TransactionExecutionOptions) @@ -36,4 +38,74 @@ public interface TransactionExecutionOptionsOrBuilder * @return The optimistic. */ boolean getOptimistic(); + + /** + * + * + *
+   * Whether traffic from this transaction will be excluded from tracking change
+   * streams with allow_txn_exclusion=true.
+   * 
+ * + * bool exclude_from_change_streams = 2; + * + * @return The excludeFromChangeStreams. + */ + boolean getExcludeFromChangeStreams(); + + /** + * + * + *
+   * Whether serializable isolation with optimistic mode concurrency should be
+   * used to execute this transaction.
+   * 
+ * + * bool serializable_optimistic = 3; + * + * @return The serializableOptimistic. + */ + boolean getSerializableOptimistic(); + + /** + * + * + *
+   * Whether snapshot isolation with optimistic mode concurrency should be used
+   * to execute this transaction.
+   * 
+ * + * bool snapshot_isolation_optimistic = 4; + * + * @return The snapshotIsolationOptimistic. + */ + boolean getSnapshotIsolationOptimistic(); + + /** + * + * + *
+   * Whether snapshot isolation with pessimistic mode concurrency should be used
+   * to execute this transaction.
+   * 
+ * + * bool snapshot_isolation_pessimistic = 5; + * + * @return The snapshotIsolationPessimistic. + */ + boolean getSnapshotIsolationPessimistic(); + + /** + * + * + *
+   * Whether to exclude mutations of this transaction from the allowed tracking
+   * change streams.
+   * 
+ * + * bool exclude_txn_from_change_streams = 6; + * + * @return The excludeTxnFromChangeStreams. + */ + boolean getExcludeTxnFromChangeStreams(); } 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 index b804bf93ad0..d6ecbab2ba5 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.UpdateCloudBackupAction} */ -public final class UpdateCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateCloudBackupAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateCloudBackupAction) UpdateCloudBackupActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateCloudBackupAction"); + } + // Use UpdateCloudBackupAction.newBuilder() to construct. - private UpdateCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateCloudBackupAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private UpdateCloudBackupAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_fieldAccessorTable @@ -295,14 +301,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, backupId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getExpireTime()); @@ -316,14 +322,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, backupId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExpireTime()); @@ -414,38 +420,38 @@ public static com.google.spanner.executor.v1.UpdateCloudBackupAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -469,7 +475,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -483,7 +489,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.UpdateCloudBackupAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateCloudBackupAction) com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder { @@ -493,7 +499,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_fieldAccessorTable @@ -507,14 +513,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getExpireTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpireTimeFieldBuilder(); } } @@ -583,39 +589,6 @@ private void buildPartial0(com.google.spanner.executor.v1.UpdateCloudBackupActio 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.UpdateCloudBackupAction) { @@ -693,7 +666,8 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1050,7 +1024,7 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp expireTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1216,7 +1190,7 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } /** @@ -1253,14 +1227,14 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; *
*/ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpireTimeFieldBuilder() { + internalGetExpireTimeFieldBuilder() { if (expireTimeBuilder_ == null) { expireTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1270,17 +1244,6 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { 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) } 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 index dd91915f465..f7631f2017d 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface UpdateCloudBackupActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateCloudBackupAction) 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 index eb4e757cf43..3a390421fbb 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.UpdateCloudDatabaseAction} */ -public final class UpdateCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateCloudDatabaseAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateCloudDatabaseAction) UpdateCloudDatabaseActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateCloudDatabaseAction"); + } + // Use UpdateCloudDatabaseAction.newBuilder() to construct. - private UpdateCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateCloudDatabaseAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private UpdateCloudDatabaseAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_fieldAccessorTable @@ -259,14 +265,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, databaseName_); } if (enableDropProtection_ != false) { output.writeBool(4, enableDropProtection_); @@ -280,14 +286,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, databaseName_); } if (enableDropProtection_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableDropProtection_); @@ -373,38 +379,38 @@ public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction parseFrom 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -428,7 +434,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -442,7 +448,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.UpdateCloudDatabaseAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateCloudDatabaseAction) com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder { @@ -452,7 +458,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_fieldAccessorTable @@ -464,7 +470,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.UpdateCloudDatabaseAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -526,39 +532,6 @@ private void buildPartial0(com.google.spanner.executor.v1.UpdateCloudDatabaseAct } } - @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) { @@ -1051,17 +1024,6 @@ public Builder clearEnableDropProtection() { 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) } 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 index 4698c38fdf9..56e207cc9b9 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface UpdateCloudDatabaseActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateCloudDatabaseAction) 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 index faae053aab0..50ac941aa1d 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.UpdateCloudDatabaseDdlAction} */ -public final class UpdateCloudDatabaseDdlAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateCloudDatabaseDdlAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) UpdateCloudDatabaseDdlActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateCloudDatabaseDdlAction"); + } + // Use UpdateCloudDatabaseDdlAction.newBuilder() to construct. - private UpdateCloudDatabaseDdlAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateCloudDatabaseDdlAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +60,13 @@ private UpdateCloudDatabaseDdlAction() { 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_fieldAccessorTable @@ -391,20 +397,20 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, databaseId_); } for (int i = 0; i < sdlStatement_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sdlStatement_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 4, sdlStatement_.getRaw(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, operationId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, operationId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeBytes(6, protoDescriptors_); @@ -418,14 +424,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, databaseId_); } { int dataSize = 0; @@ -435,8 +441,8 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSdlStatementList().size(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, operationId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operationId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, operationId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(6, protoDescriptors_); @@ -535,38 +541,38 @@ public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction parseF 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -590,7 +596,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -604,7 +610,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.UpdateCloudDatabaseDdlAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder { @@ -614,7 +620,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_fieldAccessorTable @@ -626,7 +632,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -700,39 +706,6 @@ private void buildPartial0(com.google.spanner.executor.v1.UpdateCloudDatabaseDdl 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) { @@ -1548,17 +1521,6 @@ public Builder clearProtoDescriptors() { 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) } 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 index 78cfa76b927..bf0a800729b 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface UpdateCloudDatabaseDdlActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) 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 index 828cfeb3be7..ec50faabe6a 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.UpdateCloudInstanceAction} */ -public final class UpdateCloudInstanceAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateCloudInstanceAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateCloudInstanceAction) UpdateCloudInstanceActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateCloudInstanceAction"); + } + // Use UpdateCloudInstanceAction.newBuilder() to construct. - private UpdateCloudInstanceAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateCloudInstanceAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,12 +55,7 @@ private UpdateCloudInstanceAction() { instanceId_ = ""; projectId_ = ""; displayName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateCloudInstanceAction(); + edition_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -69,7 +76,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_fieldAccessorTable @@ -501,6 +508,45 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { return map.get(key); } + public static final int EDITION_FIELD_NUMBER = 8; + private int edition_ = 0; + + /** + * + * + *
+   * The edition of the instance.
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The enum numeric value on the wire for edition. + */ + @java.lang.Override + public int getEditionValue() { + return edition_; + } + + /** + * + * + *
+   * The edition of the instance.
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The edition. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.Instance.Edition getEdition() { + com.google.spanner.admin.instance.v1.Instance.Edition result = + com.google.spanner.admin.instance.v1.Instance.Edition.forNumber(edition_); + return result == null + ? com.google.spanner.admin.instance.v1.Instance.Edition.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -515,14 +561,14 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(4, nodeCount_); @@ -530,11 +576,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeInt32(5, processingUnits_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(7, getAutoscalingConfig()); } + if (edition_ + != com.google.spanner.admin.instance.v1.Instance.Edition.EDITION_UNSPECIFIED.getNumber()) { + output.writeEnum(8, edition_); + } getUnknownFields().writeTo(output); } @@ -544,14 +594,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, nodeCount_); @@ -572,6 +622,10 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAutoscalingConfig()); } + if (edition_ + != com.google.spanner.admin.instance.v1.Instance.Edition.EDITION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, edition_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -607,6 +661,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAutoscalingConfig().equals(other.getAutoscalingConfig())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (edition_ != other.edition_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,6 +697,8 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } + hash = (37 * hash) + EDITION_FIELD_NUMBER; + hash = (53 * hash) + edition_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -684,38 +741,38 @@ public static com.google.spanner.executor.v1.UpdateCloudInstanceAction parseFrom 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -739,7 +796,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -753,7 +810,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.UpdateCloudInstanceAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateCloudInstanceAction) com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder { @@ -785,7 +842,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_fieldAccessorTable @@ -799,14 +856,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAutoscalingConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAutoscalingConfigFieldBuilder(); } } @@ -825,6 +882,7 @@ public Builder clear() { autoscalingConfigBuilder_ = null; } internalGetMutableLabels().clear(); + edition_ = 0; return this; } @@ -891,42 +949,12 @@ private void buildPartial0(com.google.spanner.executor.v1.UpdateCloudInstanceAct result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.edition_ = edition_; + } 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) { @@ -966,6 +994,9 @@ public Builder mergeFrom(com.google.spanner.executor.v1.UpdateCloudInstanceActio } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000040; + if (other.edition_ != 0) { + setEditionValue(other.getEditionValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1037,10 +1068,16 @@ public Builder mergeFrom( case 58: { input.readMessage( - getAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 58 + case 64: + { + edition_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1567,7 +1604,7 @@ public Builder clearProcessingUnits() { } private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig, com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> @@ -1738,7 +1775,7 @@ public Builder clearAutoscalingConfig() { getAutoscalingConfigBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getAutoscalingConfigFieldBuilder().getBuilder(); + return internalGetAutoscalingConfigFieldBuilder().getBuilder(); } /** @@ -1776,14 +1813,14 @@ public Builder clearAutoscalingConfig() { * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig, com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> - getAutoscalingConfigFieldBuilder() { + internalGetAutoscalingConfigFieldBuilder() { if (autoscalingConfigBuilder_ == null) { autoscalingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.admin.instance.v1.AutoscalingConfig, com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder>( @@ -1965,15 +2002,101 @@ public Builder putAllLabels(java.util.Map va return this; } + private int edition_ = 0; + + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The enum numeric value on the wire for edition. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public int getEditionValue() { + return edition_; + } + + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @param value The enum numeric value on the wire for edition to set. + * @return This builder for chaining. + */ + public Builder setEditionValue(int value) { + edition_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; } + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The edition. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public com.google.spanner.admin.instance.v1.Instance.Edition getEdition() { + com.google.spanner.admin.instance.v1.Instance.Edition result = + com.google.spanner.admin.instance.v1.Instance.Edition.forNumber(edition_); + return result == null + ? com.google.spanner.admin.instance.v1.Instance.Edition.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @param value The edition to set. + * @return This builder for chaining. + */ + public Builder setEdition(com.google.spanner.admin.instance.v1.Instance.Edition value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + edition_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The edition of the instance.
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return This builder for chaining. + */ + public Builder clearEdition() { + bitField0_ = (bitField0_ & ~0x00000080); + edition_ = 0; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.UpdateCloudInstanceAction) 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 index 22ed2b52ae9..157043851e2 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface UpdateCloudInstanceActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateCloudInstanceAction) @@ -282,4 +284,30 @@ java.lang.String getLabelsOrDefault( * map<string, string> labels = 6; */ java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The edition of the instance.
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The enum numeric value on the wire for edition. + */ + int getEditionValue(); + + /** + * + * + *
+   * The edition of the instance.
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance.Edition edition = 8; + * + * @return The edition. + */ + com.google.spanner.admin.instance.v1.Instance.Edition getEdition(); } 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 index dd0c1b4c409..26227dd965f 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,15 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.UpdateUserInstanceConfigAction} */ -public final class UpdateUserInstanceConfigAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateUserInstanceConfigAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateUserInstanceConfigAction) UpdateUserInstanceConfigActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateUserInstanceConfigAction"); + } + // Use UpdateUserInstanceConfigAction.newBuilder() to construct. - private UpdateUserInstanceConfigAction( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateUserInstanceConfigAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,12 +57,6 @@ private UpdateUserInstanceConfigAction() { 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; @@ -70,7 +75,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_fieldAccessorTable @@ -376,16 +381,16 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(userConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userConfigId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, projectId_); } if (((bitField0_ & 0x00000001) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); getUnknownFields().writeTo(output); } @@ -396,14 +401,14 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(userConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userConfigId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, projectId_); } if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { @@ -503,38 +508,38 @@ public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction pars 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -558,7 +563,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -572,7 +577,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.UpdateUserInstanceConfigAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateUserInstanceConfigAction) com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder { @@ -604,7 +609,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_fieldAccessorTable @@ -616,7 +621,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi // Construct using com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -684,39 +689,6 @@ private void buildPartial0( 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) { @@ -1343,17 +1315,6 @@ public Builder putAllLabels(java.util.Map va 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) } 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 index 722472ad4f6..43305028a47 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface UpdateUserInstanceConfigActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateUserInstanceConfigAction) 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 index c21e49fad51..7099245848a 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.executor.v1.Value} */ -public final class Value extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Value extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.Value) ValueOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Value"); + } + // Use Value.newBuilder() to construct. - private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Value(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_Value_fieldAccessorTable @@ -724,7 +730,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeBytes(5, (com.google.protobuf.ByteString) valueType_); } if (valueTypeCase_ == 6) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, valueType_); + com.google.protobuf.GeneratedMessage.writeString(output, 6, valueType_); } if (valueTypeCase_ == 7) { output.writeMessage(7, (com.google.spanner.executor.v1.ValueList) valueType_); @@ -779,7 +785,7 @@ public int getSerializedSize() { 5, (com.google.protobuf.ByteString) valueType_); } if (valueTypeCase_ == 6) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, valueType_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, valueType_); } if (valueTypeCase_ == 7) { size += @@ -974,38 +980,38 @@ public static com.google.spanner.executor.v1.Value parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1028,7 +1034,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1043,7 +1049,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.Value} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.Value) com.google.spanner.executor.v1.ValueOrBuilder { @@ -1053,7 +1059,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_Value_fieldAccessorTable @@ -1067,14 +1073,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getArrayTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetArrayTypeFieldBuilder(); } } @@ -1156,39 +1162,6 @@ private void buildPartialOneofs(com.google.spanner.executor.v1.Value result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.executor.v1.Value) { @@ -1332,13 +1305,15 @@ public Builder mergeFrom( } // case 50 case 58: { - input.readMessage(getStructValueFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStructValueFieldBuilder().getBuilder(), extensionRegistry); valueTypeCase_ = 7; break; } // case 58 case 66: { - input.readMessage(getTimestampValueFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTimestampValueFieldBuilder().getBuilder(), extensionRegistry); valueTypeCase_ = 8; break; } // case 66 @@ -1356,13 +1331,15 @@ public Builder mergeFrom( } // case 80 case 90: { - input.readMessage(getArrayValueFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetArrayValueFieldBuilder().getBuilder(), extensionRegistry); valueTypeCase_ = 11; break; } // case 90 case 98: { - input.readMessage(getArrayTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetArrayTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000800; break; } // case 98 @@ -1913,7 +1890,7 @@ public Builder setStringValueBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> @@ -2081,7 +2058,7 @@ public Builder clearStructValue() { * .google.spanner.executor.v1.ValueList struct_value = 7; */ public com.google.spanner.executor.v1.ValueList.Builder getStructValueBuilder() { - return getStructValueFieldBuilder().getBuilder(); + return internalGetStructValueFieldBuilder().getBuilder(); } /** @@ -2116,17 +2093,17 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getStructValueOrBuilder * * .google.spanner.executor.v1.ValueList struct_value = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> - getStructValueFieldBuilder() { + internalGetStructValueFieldBuilder() { if (structValueBuilder_ == null) { if (!(valueTypeCase_ == 7)) { valueType_ = com.google.spanner.executor.v1.ValueList.getDefaultInstance(); } structValueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder>( @@ -2140,7 +2117,7 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getStructValueOrBuilder return structValueBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -2299,7 +2276,7 @@ public Builder clearTimestampValue() { * .google.protobuf.Timestamp timestamp_value = 8; */ public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { - return getTimestampValueFieldBuilder().getBuilder(); + return internalGetTimestampValueFieldBuilder().getBuilder(); } /** @@ -2332,17 +2309,17 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { * * .google.protobuf.Timestamp timestamp_value = 8; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getTimestampValueFieldBuilder() { + internalGetTimestampValueFieldBuilder() { if (timestampValueBuilder_ == null) { if (!(valueTypeCase_ == 8)) { valueType_ = com.google.protobuf.Timestamp.getDefaultInstance(); } timestampValueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2500,7 +2477,7 @@ public Builder clearIsCommitTimestamp() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> @@ -2667,7 +2644,7 @@ public Builder clearArrayValue() { * .google.spanner.executor.v1.ValueList array_value = 11; */ public com.google.spanner.executor.v1.ValueList.Builder getArrayValueBuilder() { - return getArrayValueFieldBuilder().getBuilder(); + return internalGetArrayValueFieldBuilder().getBuilder(); } /** @@ -2702,17 +2679,17 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getArrayValueOrBuilder( * * .google.spanner.executor.v1.ValueList array_value = 11; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder> - getArrayValueFieldBuilder() { + internalGetArrayValueFieldBuilder() { if (arrayValueBuilder_ == null) { if (!(valueTypeCase_ == 11)) { valueType_ = com.google.spanner.executor.v1.ValueList.getDefaultInstance(); } arrayValueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.ValueList, com.google.spanner.executor.v1.ValueList.Builder, com.google.spanner.executor.v1.ValueListOrBuilder>( @@ -2727,7 +2704,7 @@ public com.google.spanner.executor.v1.ValueListOrBuilder getArrayValueOrBuilder( } private com.google.spanner.v1.Type arrayType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> @@ -2870,7 +2847,7 @@ public Builder clearArrayType() { public com.google.spanner.v1.Type.Builder getArrayTypeBuilder() { bitField0_ |= 0x00000800; onChanged(); - return getArrayTypeFieldBuilder().getBuilder(); + return internalGetArrayTypeFieldBuilder().getBuilder(); } /** @@ -2899,14 +2876,14 @@ public com.google.spanner.v1.TypeOrBuilder getArrayTypeOrBuilder() { * * optional .google.spanner.v1.Type array_type = 12; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> - getArrayTypeFieldBuilder() { + internalGetArrayTypeFieldBuilder() { if (arrayTypeBuilder_ == null) { arrayTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder>( @@ -2916,17 +2893,6 @@ public com.google.spanner.v1.TypeOrBuilder getArrayTypeOrBuilder() { 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) } 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 index 5cb290f8712..f50220b69d3 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.executor.v1.ValueList} */ -public final class ValueList extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ValueList extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ValueList) ValueListOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ValueList"); + } + // Use ValueList.newBuilder() to construct. - private ValueList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ValueList(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ValueList_fieldAccessorTable @@ -242,38 +248,38 @@ public static com.google.spanner.executor.v1.ValueList parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -296,7 +302,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -310,7 +316,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.ValueList} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ValueList) com.google.spanner.executor.v1.ValueListOrBuilder { @@ -320,7 +326,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_ValueList_fieldAccessorTable @@ -332,7 +338,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.executor.v1.ValueList.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -398,39 +404,6 @@ 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) { @@ -462,8 +435,8 @@ public Builder mergeFrom(com.google.spanner.executor.v1.ValueList other) { value_ = other.value_; bitField0_ = (bitField0_ & ~0x00000001); valueBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getValueFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetValueFieldBuilder() : null; } else { valueBuilder_.addAllMessages(other.value_); @@ -538,7 +511,7 @@ private void ensureValueIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.Value, com.google.spanner.executor.v1.Value.Builder, com.google.spanner.executor.v1.ValueOrBuilder> @@ -797,7 +770,7 @@ public Builder removeValue(int index) { * repeated .google.spanner.executor.v1.Value value = 1; */ public com.google.spanner.executor.v1.Value.Builder getValueBuilder(int index) { - return getValueFieldBuilder().getBuilder(index); + return internalGetValueFieldBuilder().getBuilder(index); } /** @@ -845,7 +818,7 @@ public com.google.spanner.executor.v1.ValueOrBuilder getValueOrBuilder(int index * repeated .google.spanner.executor.v1.Value value = 1; */ public com.google.spanner.executor.v1.Value.Builder addValueBuilder() { - return getValueFieldBuilder() + return internalGetValueFieldBuilder() .addBuilder(com.google.spanner.executor.v1.Value.getDefaultInstance()); } @@ -859,7 +832,7 @@ public com.google.spanner.executor.v1.Value.Builder addValueBuilder() { * repeated .google.spanner.executor.v1.Value value = 1; */ public com.google.spanner.executor.v1.Value.Builder addValueBuilder(int index) { - return getValueFieldBuilder() + return internalGetValueFieldBuilder() .addBuilder(index, com.google.spanner.executor.v1.Value.getDefaultInstance()); } @@ -873,17 +846,17 @@ public com.google.spanner.executor.v1.Value.Builder addValueBuilder(int index) { * repeated .google.spanner.executor.v1.Value value = 1; */ public java.util.List getValueBuilderList() { - return getValueFieldBuilder().getBuilderList(); + return internalGetValueFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.Value, com.google.spanner.executor.v1.Value.Builder, com.google.spanner.executor.v1.ValueOrBuilder> - getValueFieldBuilder() { + internalGetValueFieldBuilder() { if (valueBuilder_ == null) { valueBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.executor.v1.Value, com.google.spanner.executor.v1.Value.Builder, com.google.spanner.executor.v1.ValueOrBuilder>( @@ -893,17 +866,6 @@ public java.util.List getValueBuil 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) } 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 index f3221a0394e..0b85fa20459 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ValueListOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ValueList) 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 index b72837278e1..28d08170bf8 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface ValueOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.Value) 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 index cb7caa62506..572253538a3 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.executor.v1.WriteMutationsAction} */ -public final class WriteMutationsAction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class WriteMutationsAction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.WriteMutationsAction) WriteMutationsActionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "WriteMutationsAction"); + } + // Use WriteMutationsAction.newBuilder() to construct. - private WriteMutationsAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private WriteMutationsAction(com.google.protobuf.GeneratedMessage.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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_WriteMutationsAction_fieldAccessorTable @@ -223,38 +229,38 @@ public static com.google.spanner.executor.v1.WriteMutationsAction parseFrom( 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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.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); + return com.google.protobuf.GeneratedMessage.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( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -277,7 +283,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -292,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.executor.v1.WriteMutationsAction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.WriteMutationsAction) com.google.spanner.executor.v1.WriteMutationsActionOrBuilder { @@ -302,7 +308,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.executor.v1.CloudExecutorProto .internal_static_google_spanner_executor_v1_WriteMutationsAction_fieldAccessorTable @@ -316,14 +322,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMutationFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMutationFieldBuilder(); } } @@ -380,39 +386,6 @@ private void buildPartial0(com.google.spanner.executor.v1.WriteMutationsAction r 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.WriteMutationsAction) { @@ -457,7 +430,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getMutationFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMutationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -481,7 +455,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.executor.v1.MutationAction mutation_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction, com.google.spanner.executor.v1.MutationAction.Builder, com.google.spanner.executor.v1.MutationActionOrBuilder> @@ -627,7 +601,7 @@ public Builder clearMutation() { public com.google.spanner.executor.v1.MutationAction.Builder getMutationBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getMutationFieldBuilder().getBuilder(); + return internalGetMutationFieldBuilder().getBuilder(); } /** @@ -658,14 +632,14 @@ public com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuild * * .google.spanner.executor.v1.MutationAction mutation = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction, com.google.spanner.executor.v1.MutationAction.Builder, com.google.spanner.executor.v1.MutationActionOrBuilder> - getMutationFieldBuilder() { + internalGetMutationFieldBuilder() { if (mutationBuilder_ == null) { mutationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.executor.v1.MutationAction, com.google.spanner.executor.v1.MutationAction.Builder, com.google.spanner.executor.v1.MutationActionOrBuilder>( @@ -675,17 +649,6 @@ public com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuild 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) } 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 index 9d58c827f99..f8a67ee7a2b 100644 --- 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 @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/executor/v1/cloud_executor.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.executor.v1; +@com.google.protobuf.Generated public interface WriteMutationsActionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.WriteMutationsAction) 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 index cf68519ef3a..5ca3b25ac2a 100644 --- 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 @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -135,6 +135,9 @@ message SpannerAction { // Query cancellation action for testing the cancellation of a query. QueryCancellationAction query_cancellation = 51; + + // Action to adapt a message. + AdaptMessageAction adapt_message = 52; } } @@ -185,12 +188,22 @@ message DmlAction { // Whether to autocommit the transaction after executing the DML statement, // if the Executor supports autocommit. optional bool autocommit_if_supported = 2; + + // Whether to set this DML statement as the last statement in the + // transaction. The transaction should be committed after processing this DML + // statement. + optional bool last_statement = 3; } // Batch of DML statements invoked using batched execution. message BatchDmlAction { // DML statements. repeated QueryAction updates = 1; + + // Whether to set this request with the last statement option in the + // transaction. The transaction should be committed after processing this + // request. + optional bool last_statements = 2; } // Value represents a single value that can be read or written to/from @@ -396,7 +409,8 @@ message StartTransactionAction { // testing. string transaction_seed = 3; - // Execution options (e.g., whether transaction is opaque, optimistic). + // Execution options (e.g., whether transaction is opaque, optimistic, + // excluded from change streams). optional TransactionExecutionOptions execution_options = 4; } @@ -460,10 +474,29 @@ message ColumnMetadata { 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; + + // Whether traffic from this transaction will be excluded from tracking change + // streams with allow_txn_exclusion=true. + bool exclude_from_change_streams = 2; + + // Whether serializable isolation with optimistic mode concurrency should be + // used to execute this transaction. + bool serializable_optimistic = 3; + + // Whether snapshot isolation with optimistic mode concurrency should be used + // to execute this transaction. + bool snapshot_isolation_optimistic = 4; + + // Whether snapshot isolation with pessimistic mode concurrency should be used + // to execute this transaction. + bool snapshot_isolation_pessimistic = 5; + + // Whether to exclude mutations of this transaction from the allowed tracking + // change streams. + bool exclude_txn_from_change_streams = 6; } // FinishTransactionAction defines an action of finishing a transaction. @@ -573,6 +606,9 @@ message AdminAction { // Action that changes quorum of a Cloud Spanner database. ChangeQuorumCloudDatabaseAction change_quorum_cloud_database = 28; + + // Action that adds splits to a Cloud Spanner database. + AddSplitPointsAction add_split_points = 29; } } @@ -663,6 +699,9 @@ message CreateCloudInstanceAction { // labels. map labels = 5; + + // The edition of the instance. + google.spanner.admin.instance.v1.Instance.Edition edition = 8; } // Action that updates a Cloud Spanner instance. @@ -693,6 +732,9 @@ message UpdateCloudInstanceAction { // labels. map labels = 6; + + // The edition of the instance. + google.spanner.admin.instance.v1.Instance.Edition edition = 8; } // Action that deletes a Cloud Spanner instance. @@ -787,6 +829,29 @@ message ChangeQuorumCloudDatabaseAction { repeated string serving_locations = 2; } +// A single Adapt message request. +message AdaptMessageAction { + // The fully qualified uri of the database to send AdaptMessage to. + string database_uri = 1; + + // The protocol to use for the request. + string protocol = 2; + + // The payload of the request. + bytes payload = 3; + + // Attachments to be sent with the request. + map attachments = 4; + + // The query to be sent with the request. + string query = 5; + + // If true, the action will send a Prepare request first and then an + // Execute request right after to execute the query. This is only supported + // for Cloud Client path. + bool prepare_then_execute = 6; +} + // Action that lists Cloud Spanner databases. message ListCloudDatabasesAction { // Cloud project ID, e.g. "spanner-cloud-systest". @@ -805,7 +870,7 @@ message ListCloudDatabasesAction { string page_token = 4; } -// Action that lists Cloud Spanner databases. +// Action that lists Cloud Spanner instances. message ListCloudInstancesAction { // Cloud project ID, e.g. "spanner-cloud-systest". string project_id = 1; @@ -1067,6 +1132,21 @@ message CancelOperationAction { string operation = 1; } +// Action that adds a split point to a Cloud Spanner database. +message AddSplitPointsAction { + // 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; + + // Cloud database ID (not full path), e.g. "db0". + string database_id = 3; + + // The split points to add. + repeated google.spanner.admin.database.v1.SplitPoints split_points = 4; +} + // 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. @@ -1260,6 +1340,10 @@ message SpannerActionOutcome { // Change stream records returned by a change stream query. repeated ChangeStreamRecord change_stream_records = 10; + + // If not zero, it indicates the read timestamp to use for validating + // the SnapshotIsolation transaction. + optional int64 snapshot_isolation_txn_read_timestamp = 11; } // AdminResult contains admin action results, for database/backup/operation. diff --git a/proto-google-cloud-spanner-v1/clirr-ignored-differences.xml b/proto-google-cloud-spanner-v1/clirr-ignored-differences.xml index 89fd05b2e3c..7cb9c078e67 100644 --- a/proto-google-cloud-spanner-v1/clirr-ignored-differences.xml +++ b/proto-google-cloud-spanner-v1/clirr-ignored-differences.xml @@ -17,7 +17,63 @@ boolean has*(*)
- + + + + 5001 + com/google/spanner/v1/* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/v1/*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/v1/*$* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/v1/*$*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/v1/*$*$* + com/google/protobuf/GeneratedMessage + + + 5001 + com/google/spanner/v1/*$*$*$Builder + com/google/protobuf/GeneratedMessage$Builder + + + 5001 + com/google/spanner/v1/*Proto + com/google/protobuf/GeneratedFile + + + + 7005 + com/google/spanner/v1/** + * newBuilderForType(*) + ** + + + + 7006 + com/google/spanner/v1/** + * internalGetFieldAccessorTable() + ** + + + + 7014 + com/google/spanner/v1/** + * getDescriptor() + 7006 com/google/spanner/v1/** diff --git a/proto-google-cloud-spanner-v1/pom.xml b/proto-google-cloud-spanner-v1/pom.xml index 14dfb56ceac..1c96a87f5cb 100644 --- a/proto-google-cloud-spanner-v1/pom.xml +++ b/proto-google-cloud-spanner-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-spanner-v1 - 6.102.1 + 6.113.1-SNAPSHOT proto-google-cloud-spanner-v1 PROTO library for proto-google-cloud-spanner-v1 com.google.cloud google-cloud-spanner-parent - 6.102.1 + 6.113.1-SNAPSHOT diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java index 57ae1ee310d..2fcfd868b58 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.BatchCreateSessionsRequest} */ -public final class BatchCreateSessionsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BatchCreateSessionsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchCreateSessionsRequest) BatchCreateSessionsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchCreateSessionsRequest"); + } + // Use BatchCreateSessionsRequest.newBuilder() to construct. - private BatchCreateSessionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BatchCreateSessionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private BatchCreateSessionsRequest() { database_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchCreateSessionsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchCreateSessionsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchCreateSessionsRequest_fieldAccessorTable @@ -183,10 +189,10 @@ public com.google.spanner.v1.SessionOrBuilder getSessionTemplateOrBuilder() { * * *
-   * Required. The number of sessions to be created in this batch call.
-   * The API can return fewer than the requested number of sessions. If a
-   * specific number of sessions are desired, the client can make additional
-   * calls to `BatchCreateSessions` (adjusting
+   * Required. The number of sessions to be created in this batch call. At least
+   * one session is created. The API can return fewer than the requested number
+   * of sessions. If a specific number of sessions are desired, the client can
+   * make additional calls to `BatchCreateSessions` (adjusting
    * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
    * as necessary).
    * 
@@ -214,8 +220,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSessionTemplate()); @@ -232,8 +238,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSessionTemplate()); @@ -324,38 +330,38 @@ public static com.google.spanner.v1.BatchCreateSessionsRequest parseFrom( public static com.google.spanner.v1.BatchCreateSessionsRequest parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchCreateSessionsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchCreateSessionsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchCreateSessionsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchCreateSessionsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchCreateSessionsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -378,7 +384,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -393,7 +399,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.BatchCreateSessionsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchCreateSessionsRequest) com.google.spanner.v1.BatchCreateSessionsRequestOrBuilder { @@ -403,7 +409,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchCreateSessionsRequest_fieldAccessorTable @@ -417,14 +423,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSessionTemplateFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSessionTemplateFieldBuilder(); } } @@ -490,39 +496,6 @@ private void buildPartial0(com.google.spanner.v1.BatchCreateSessionsRequest resu 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.v1.BatchCreateSessionsRequest) { @@ -581,7 +554,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getSessionTemplateFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetSessionTemplateFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -732,7 +706,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.Session sessionTemplate_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder> @@ -877,7 +851,7 @@ public Builder clearSessionTemplate() { public com.google.spanner.v1.Session.Builder getSessionTemplateBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSessionTemplateFieldBuilder().getBuilder(); + return internalGetSessionTemplateFieldBuilder().getBuilder(); } /** @@ -908,14 +882,14 @@ public com.google.spanner.v1.SessionOrBuilder getSessionTemplateOrBuilder() { * * .google.spanner.v1.Session session_template = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder> - getSessionTemplateFieldBuilder() { + internalGetSessionTemplateFieldBuilder() { if (sessionTemplateBuilder_ == null) { sessionTemplateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder>( @@ -931,10 +905,10 @@ public com.google.spanner.v1.SessionOrBuilder getSessionTemplateOrBuilder() { * * *
-     * Required. The number of sessions to be created in this batch call.
-     * The API can return fewer than the requested number of sessions. If a
-     * specific number of sessions are desired, the client can make additional
-     * calls to `BatchCreateSessions` (adjusting
+     * Required. The number of sessions to be created in this batch call. At least
+     * one session is created. The API can return fewer than the requested number
+     * of sessions. If a specific number of sessions are desired, the client can
+     * make additional calls to `BatchCreateSessions` (adjusting
      * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
      * as necessary).
      * 
@@ -952,10 +926,10 @@ public int getSessionCount() { * * *
-     * Required. The number of sessions to be created in this batch call.
-     * The API can return fewer than the requested number of sessions. If a
-     * specific number of sessions are desired, the client can make additional
-     * calls to `BatchCreateSessions` (adjusting
+     * Required. The number of sessions to be created in this batch call. At least
+     * one session is created. The API can return fewer than the requested number
+     * of sessions. If a specific number of sessions are desired, the client can
+     * make additional calls to `BatchCreateSessions` (adjusting
      * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
      * as necessary).
      * 
@@ -977,10 +951,10 @@ public Builder setSessionCount(int value) { * * *
-     * Required. The number of sessions to be created in this batch call.
-     * The API can return fewer than the requested number of sessions. If a
-     * specific number of sessions are desired, the client can make additional
-     * calls to `BatchCreateSessions` (adjusting
+     * Required. The number of sessions to be created in this batch call. At least
+     * one session is created. The API can return fewer than the requested number
+     * of sessions. If a specific number of sessions are desired, the client can
+     * make additional calls to `BatchCreateSessions` (adjusting
      * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
      * as necessary).
      * 
@@ -996,17 +970,6 @@ public Builder clearSessionCount() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.BatchCreateSessionsRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java index 698601c466c..d1978777181 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface BatchCreateSessionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.BatchCreateSessionsRequest) @@ -95,10 +97,10 @@ public interface BatchCreateSessionsRequestOrBuilder * * *
-   * Required. The number of sessions to be created in this batch call.
-   * The API can return fewer than the requested number of sessions. If a
-   * specific number of sessions are desired, the client can make additional
-   * calls to `BatchCreateSessions` (adjusting
+   * Required. The number of sessions to be created in this batch call. At least
+   * one session is created. The API can return fewer than the requested number
+   * of sessions. If a specific number of sessions are desired, the client can
+   * make additional calls to `BatchCreateSessions` (adjusting
    * [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
    * as necessary).
    * 
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java index 431db1eaedf..2277f7f66f3 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.BatchCreateSessionsResponse} */ -public final class BatchCreateSessionsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BatchCreateSessionsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchCreateSessionsResponse) BatchCreateSessionsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchCreateSessionsResponse"); + } + // Use BatchCreateSessionsResponse.newBuilder() to construct. - private BatchCreateSessionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BatchCreateSessionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private BatchCreateSessionsResponse() { session_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchCreateSessionsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchCreateSessionsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchCreateSessionsResponse_fieldAccessorTable @@ -244,38 +250,38 @@ public static com.google.spanner.v1.BatchCreateSessionsResponse parseFrom( public static com.google.spanner.v1.BatchCreateSessionsResponse parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchCreateSessionsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchCreateSessionsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchCreateSessionsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchCreateSessionsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchCreateSessionsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -298,7 +304,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -313,7 +319,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.BatchCreateSessionsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchCreateSessionsResponse) com.google.spanner.v1.BatchCreateSessionsResponseOrBuilder { @@ -323,7 +329,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchCreateSessionsResponse_fieldAccessorTable @@ -335,7 +341,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.BatchCreateSessionsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -402,39 +408,6 @@ private void buildPartial0(com.google.spanner.v1.BatchCreateSessionsResponse res int from_bitField0_ = bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.BatchCreateSessionsResponse) { @@ -467,8 +440,8 @@ public Builder mergeFrom(com.google.spanner.v1.BatchCreateSessionsResponse other session_ = other.session_; bitField0_ = (bitField0_ & ~0x00000001); sessionBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSessionFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSessionFieldBuilder() : null; } else { sessionBuilder_.addAllMessages(other.session_); @@ -542,7 +515,7 @@ private void ensureSessionIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder> @@ -799,7 +772,7 @@ public Builder removeSession(int index) { * repeated .google.spanner.v1.Session session = 1; */ public com.google.spanner.v1.Session.Builder getSessionBuilder(int index) { - return getSessionFieldBuilder().getBuilder(index); + return internalGetSessionFieldBuilder().getBuilder(index); } /** @@ -847,7 +820,7 @@ public com.google.spanner.v1.SessionOrBuilder getSessionOrBuilder(int index) { * repeated .google.spanner.v1.Session session = 1; */ public com.google.spanner.v1.Session.Builder addSessionBuilder() { - return getSessionFieldBuilder() + return internalGetSessionFieldBuilder() .addBuilder(com.google.spanner.v1.Session.getDefaultInstance()); } @@ -861,7 +834,7 @@ public com.google.spanner.v1.Session.Builder addSessionBuilder() { * repeated .google.spanner.v1.Session session = 1; */ public com.google.spanner.v1.Session.Builder addSessionBuilder(int index) { - return getSessionFieldBuilder() + return internalGetSessionFieldBuilder() .addBuilder(index, com.google.spanner.v1.Session.getDefaultInstance()); } @@ -875,17 +848,17 @@ public com.google.spanner.v1.Session.Builder addSessionBuilder(int index) { * repeated .google.spanner.v1.Session session = 1; */ public java.util.List getSessionBuilderList() { - return getSessionFieldBuilder().getBuilderList(); + return internalGetSessionFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder> - getSessionFieldBuilder() { + internalGetSessionFieldBuilder() { if (sessionBuilder_ == null) { sessionBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder>( @@ -895,17 +868,6 @@ public java.util.List getSessionBuilderLi return sessionBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.BatchCreateSessionsResponse) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java index 947fcdad699..b849013ac7b 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchCreateSessionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface BatchCreateSessionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.BatchCreateSessionsResponse) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequest.java index 8a90552039e..9c4646e4ece 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.BatchWriteRequest} */ -public final class BatchWriteRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BatchWriteRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchWriteRequest) BatchWriteRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchWriteRequest"); + } + // Use BatchWriteRequest.newBuilder() to construct. - private BatchWriteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BatchWriteRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private BatchWriteRequest() { mutationGroups_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchWriteRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchWriteRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchWriteRequest_fieldAccessorTable @@ -147,14 +153,24 @@ public interface MutationGroupOrBuilder * * Protobuf type {@code google.spanner.v1.BatchWriteRequest.MutationGroup} */ - public static final class MutationGroup extends com.google.protobuf.GeneratedMessageV3 + public static final class MutationGroup extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchWriteRequest.MutationGroup) MutationGroupOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MutationGroup"); + } + // Use MutationGroup.newBuilder() to construct. - private MutationGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MutationGroup(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -162,19 +178,13 @@ private MutationGroup() { mutations_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MutationGroup(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_fieldAccessorTable @@ -372,38 +382,38 @@ public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseFrom( public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchWriteRequest.MutationGroup parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -427,8 +437,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -444,8 +453,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.BatchWriteRequest.MutationGroup} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchWriteRequest.MutationGroup) com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder { @@ -455,7 +463,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_fieldAccessorTable @@ -467,7 +475,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.BatchWriteRequest.MutationGroup.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -534,41 +542,6 @@ private void buildPartial0(com.google.spanner.v1.BatchWriteRequest.MutationGroup int from_bitField0_ = bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.BatchWriteRequest.MutationGroup) { @@ -601,8 +574,8 @@ public Builder mergeFrom(com.google.spanner.v1.BatchWriteRequest.MutationGroup o mutations_ = other.mutations_; bitField0_ = (bitField0_ & ~0x00000001); mutationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMutationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMutationsFieldBuilder() : null; } else { mutationsBuilder_.addAllMessages(other.mutations_); @@ -676,7 +649,7 @@ private void ensureMutationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Mutation, com.google.spanner.v1.Mutation.Builder, com.google.spanner.v1.MutationOrBuilder> @@ -961,7 +934,7 @@ public Builder removeMutations(int index) { *
*/ public com.google.spanner.v1.Mutation.Builder getMutationsBuilder(int index) { - return getMutationsFieldBuilder().getBuilder(index); + return internalGetMutationsFieldBuilder().getBuilder(index); } /** @@ -1015,7 +988,7 @@ public com.google.spanner.v1.MutationOrBuilder getMutationsOrBuilder(int index) * */ public com.google.spanner.v1.Mutation.Builder addMutationsBuilder() { - return getMutationsFieldBuilder() + return internalGetMutationsFieldBuilder() .addBuilder(com.google.spanner.v1.Mutation.getDefaultInstance()); } @@ -1031,7 +1004,7 @@ public com.google.spanner.v1.Mutation.Builder addMutationsBuilder() { * */ public com.google.spanner.v1.Mutation.Builder addMutationsBuilder(int index) { - return getMutationsFieldBuilder() + return internalGetMutationsFieldBuilder() .addBuilder(index, com.google.spanner.v1.Mutation.getDefaultInstance()); } @@ -1047,17 +1020,17 @@ public com.google.spanner.v1.Mutation.Builder addMutationsBuilder(int index) { * */ public java.util.List getMutationsBuilderList() { - return getMutationsFieldBuilder().getBuilderList(); + return internalGetMutationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Mutation, com.google.spanner.v1.Mutation.Builder, com.google.spanner.v1.MutationOrBuilder> - getMutationsFieldBuilder() { + internalGetMutationsFieldBuilder() { if (mutationsBuilder_ == null) { mutationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Mutation, com.google.spanner.v1.Mutation.Builder, com.google.spanner.v1.MutationOrBuilder>( @@ -1067,18 +1040,6 @@ public java.util.List getMutationsBuilde return mutationsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.BatchWriteRequest.MutationGroup) } @@ -1366,8 +1327,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getRequestOptions()); @@ -1387,8 +1348,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRequestOptions()); @@ -1487,38 +1448,38 @@ public static com.google.spanner.v1.BatchWriteRequest parseFrom( public static com.google.spanner.v1.BatchWriteRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchWriteRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchWriteRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchWriteRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchWriteRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchWriteRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1541,7 +1502,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1555,7 +1516,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.BatchWriteRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchWriteRequest) com.google.spanner.v1.BatchWriteRequestOrBuilder { @@ -1565,7 +1526,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchWriteRequest_fieldAccessorTable @@ -1579,15 +1540,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRequestOptionsFieldBuilder(); - getMutationGroupsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRequestOptionsFieldBuilder(); + internalGetMutationGroupsFieldBuilder(); } } @@ -1673,39 +1634,6 @@ private void buildPartial0(com.google.spanner.v1.BatchWriteRequest result) { 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.v1.BatchWriteRequest) { @@ -1745,8 +1673,8 @@ public Builder mergeFrom(com.google.spanner.v1.BatchWriteRequest other) { mutationGroups_ = other.mutationGroups_; bitField0_ = (bitField0_ & ~0x00000004); mutationGroupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMutationGroupsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMutationGroupsFieldBuilder() : null; } else { mutationGroupsBuilder_.addAllMessages(other.mutationGroups_); @@ -1790,7 +1718,8 @@ public Builder mergeFrom( } // case 10 case 26: { - input.readMessage(getRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 26 @@ -1955,7 +1884,7 @@ public Builder setSessionBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.RequestOptions requestOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> @@ -2100,7 +2029,7 @@ public Builder clearRequestOptions() { public com.google.spanner.v1.RequestOptions.Builder getRequestOptionsBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestOptionsFieldBuilder().getBuilder(); + return internalGetRequestOptionsFieldBuilder().getBuilder(); } /** @@ -2131,14 +2060,14 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( * * .google.spanner.v1.RequestOptions request_options = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> - getRequestOptionsFieldBuilder() { + internalGetRequestOptionsFieldBuilder() { if (requestOptionsBuilder_ == null) { requestOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder>( @@ -2160,7 +2089,7 @@ private void ensureMutationGroupsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.BatchWriteRequest.MutationGroup, com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder, com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder> @@ -2451,7 +2380,7 @@ public Builder removeMutationGroups(int index) { */ public com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder getMutationGroupsBuilder( int index) { - return getMutationGroupsFieldBuilder().getBuilder(index); + return internalGetMutationGroupsFieldBuilder().getBuilder(index); } /** @@ -2507,7 +2436,7 @@ public com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder getMutation */ public com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder addMutationGroupsBuilder() { - return getMutationGroupsFieldBuilder() + return internalGetMutationGroupsFieldBuilder() .addBuilder(com.google.spanner.v1.BatchWriteRequest.MutationGroup.getDefaultInstance()); } @@ -2524,7 +2453,7 @@ public com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder getMutation */ public com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder addMutationGroupsBuilder( int index) { - return getMutationGroupsFieldBuilder() + return internalGetMutationGroupsFieldBuilder() .addBuilder( index, com.google.spanner.v1.BatchWriteRequest.MutationGroup.getDefaultInstance()); } @@ -2542,17 +2471,17 @@ public com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder addMutation */ public java.util.List getMutationGroupsBuilderList() { - return getMutationGroupsFieldBuilder().getBuilderList(); + return internalGetMutationGroupsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.BatchWriteRequest.MutationGroup, com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder, com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder> - getMutationGroupsFieldBuilder() { + internalGetMutationGroupsFieldBuilder() { if (mutationGroupsBuilder_ == null) { mutationGroupsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.BatchWriteRequest.MutationGroup, com.google.spanner.v1.BatchWriteRequest.MutationGroup.Builder, com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder>( @@ -2630,17 +2559,6 @@ public Builder clearExcludeTxnFromChangeStreams() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.BatchWriteRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequestOrBuilder.java index 6737e384e65..3144f27ea9b 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface BatchWriteRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.BatchWriteRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponse.java index 39105b6e63c..35279f82854 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.BatchWriteResponse} */ -public final class BatchWriteResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BatchWriteResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.BatchWriteResponse) BatchWriteResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchWriteResponse"); + } + // Use BatchWriteResponse.newBuilder() to construct. - private BatchWriteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BatchWriteResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private BatchWriteResponse() { indexes_ = emptyIntList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchWriteResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchWriteResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchWriteResponse_fieldAccessorTable @@ -179,7 +185,12 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { * *
    * The commit timestamp of the transaction that applied this batch.
-   * Present if `status` is `OK`, absent otherwise.
+   * Present if status is OK and the mutation groups were applied, absent
+   * otherwise.
+   *
+   * For mutation groups with conditions, a status=OK and missing
+   * commit_timestamp means that the mutation groups were not applied due to the
+   * condition not being satisfied after evaluation.
    * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -196,7 +207,12 @@ public boolean hasCommitTimestamp() { * *
    * The commit timestamp of the transaction that applied this batch.
-   * Present if `status` is `OK`, absent otherwise.
+   * Present if status is OK and the mutation groups were applied, absent
+   * otherwise.
+   *
+   * For mutation groups with conditions, a status=OK and missing
+   * commit_timestamp means that the mutation groups were not applied due to the
+   * condition not being satisfied after evaluation.
    * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -215,7 +231,12 @@ public com.google.protobuf.Timestamp getCommitTimestamp() { * *
    * The commit timestamp of the transaction that applied this batch.
-   * Present if `status` is `OK`, absent otherwise.
+   * Present if status is OK and the mutation groups were applied, absent
+   * otherwise.
+   *
+   * For mutation groups with conditions, a status=OK and missing
+   * commit_timestamp means that the mutation groups were not applied due to the
+   * condition not being satisfied after evaluation.
    * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -371,38 +392,38 @@ public static com.google.spanner.v1.BatchWriteResponse parseFrom( public static com.google.spanner.v1.BatchWriteResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchWriteResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchWriteResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchWriteResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BatchWriteResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BatchWriteResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -425,7 +446,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -439,7 +460,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.BatchWriteResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.BatchWriteResponse) com.google.spanner.v1.BatchWriteResponseOrBuilder { @@ -449,7 +470,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BatchWriteResponse_fieldAccessorTable @@ -463,15 +484,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStatusFieldBuilder(); - getCommitTimestampFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStatusFieldBuilder(); + internalGetCommitTimestampFieldBuilder(); } } @@ -543,39 +564,6 @@ private void buildPartial0(com.google.spanner.v1.BatchWriteResponse result) { 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.v1.BatchWriteResponse) { @@ -651,13 +639,14 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetStatusFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -825,7 +814,7 @@ public Builder clearIndexes() { } private com.google.rpc.Status status_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; @@ -966,7 +955,7 @@ public Builder clearStatus() { public com.google.rpc.Status.Builder getStatusBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStatusFieldBuilder().getBuilder(); + return internalGetStatusFieldBuilder().getBuilder(); } /** @@ -995,12 +984,12 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { * * .google.rpc.Status status = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusFieldBuilder() { + internalGetStatusFieldBuilder() { if (statusBuilder_ == null) { statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); @@ -1010,7 +999,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { } private com.google.protobuf.Timestamp commitTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1021,7 +1010,12 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { * *
      * The commit timestamp of the transaction that applied this batch.
-     * Present if `status` is `OK`, absent otherwise.
+     * Present if status is OK and the mutation groups were applied, absent
+     * otherwise.
+     *
+     * For mutation groups with conditions, a status=OK and missing
+     * commit_timestamp means that the mutation groups were not applied due to the
+     * condition not being satisfied after evaluation.
      * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -1037,7 +1031,12 @@ public boolean hasCommitTimestamp() { * *
      * The commit timestamp of the transaction that applied this batch.
-     * Present if `status` is `OK`, absent otherwise.
+     * Present if status is OK and the mutation groups were applied, absent
+     * otherwise.
+     *
+     * For mutation groups with conditions, a status=OK and missing
+     * commit_timestamp means that the mutation groups were not applied due to the
+     * condition not being satisfied after evaluation.
      * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -1059,7 +1058,12 @@ public com.google.protobuf.Timestamp getCommitTimestamp() { * *
      * The commit timestamp of the transaction that applied this batch.
-     * Present if `status` is `OK`, absent otherwise.
+     * Present if status is OK and the mutation groups were applied, absent
+     * otherwise.
+     *
+     * For mutation groups with conditions, a status=OK and missing
+     * commit_timestamp means that the mutation groups were not applied due to the
+     * condition not being satisfied after evaluation.
      * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -1083,7 +1087,12 @@ public Builder setCommitTimestamp(com.google.protobuf.Timestamp value) { * *
      * The commit timestamp of the transaction that applied this batch.
-     * Present if `status` is `OK`, absent otherwise.
+     * Present if status is OK and the mutation groups were applied, absent
+     * otherwise.
+     *
+     * For mutation groups with conditions, a status=OK and missing
+     * commit_timestamp means that the mutation groups were not applied due to the
+     * condition not being satisfied after evaluation.
      * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -1104,7 +1113,12 @@ public Builder setCommitTimestamp(com.google.protobuf.Timestamp.Builder builderF * *
      * The commit timestamp of the transaction that applied this batch.
-     * Present if `status` is `OK`, absent otherwise.
+     * Present if status is OK and the mutation groups were applied, absent
+     * otherwise.
+     *
+     * For mutation groups with conditions, a status=OK and missing
+     * commit_timestamp means that the mutation groups were not applied due to the
+     * condition not being satisfied after evaluation.
      * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -1133,7 +1147,12 @@ public Builder mergeCommitTimestamp(com.google.protobuf.Timestamp value) { * *
      * The commit timestamp of the transaction that applied this batch.
-     * Present if `status` is `OK`, absent otherwise.
+     * Present if status is OK and the mutation groups were applied, absent
+     * otherwise.
+     *
+     * For mutation groups with conditions, a status=OK and missing
+     * commit_timestamp means that the mutation groups were not applied due to the
+     * condition not being satisfied after evaluation.
      * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -1154,7 +1173,12 @@ public Builder clearCommitTimestamp() { * *
      * The commit timestamp of the transaction that applied this batch.
-     * Present if `status` is `OK`, absent otherwise.
+     * Present if status is OK and the mutation groups were applied, absent
+     * otherwise.
+     *
+     * For mutation groups with conditions, a status=OK and missing
+     * commit_timestamp means that the mutation groups were not applied due to the
+     * condition not being satisfied after evaluation.
      * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -1162,7 +1186,7 @@ public Builder clearCommitTimestamp() { public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCommitTimestampFieldBuilder().getBuilder(); + return internalGetCommitTimestampFieldBuilder().getBuilder(); } /** @@ -1170,7 +1194,12 @@ public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() { * *
      * The commit timestamp of the transaction that applied this batch.
-     * Present if `status` is `OK`, absent otherwise.
+     * Present if status is OK and the mutation groups were applied, absent
+     * otherwise.
+     *
+     * For mutation groups with conditions, a status=OK and missing
+     * commit_timestamp means that the mutation groups were not applied due to the
+     * condition not being satisfied after evaluation.
      * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -1190,19 +1219,24 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { * *
      * The commit timestamp of the transaction that applied this batch.
-     * Present if `status` is `OK`, absent otherwise.
+     * Present if status is OK and the mutation groups were applied, absent
+     * otherwise.
+     *
+     * For mutation groups with conditions, a status=OK and missing
+     * commit_timestamp means that the mutation groups were not applied due to the
+     * condition not being satisfied after evaluation.
      * 
* * .google.protobuf.Timestamp commit_timestamp = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCommitTimestampFieldBuilder() { + internalGetCommitTimestampFieldBuilder() { if (commitTimestampBuilder_ == null) { commitTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1212,17 +1246,6 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { return commitTimestampBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.BatchWriteResponse) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponseOrBuilder.java index f0ecaa70743..05be85b753a 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BatchWriteResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface BatchWriteResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.BatchWriteResponse) @@ -109,7 +111,12 @@ public interface BatchWriteResponseOrBuilder * *
    * The commit timestamp of the transaction that applied this batch.
-   * Present if `status` is `OK`, absent otherwise.
+   * Present if status is OK and the mutation groups were applied, absent
+   * otherwise.
+   *
+   * For mutation groups with conditions, a status=OK and missing
+   * commit_timestamp means that the mutation groups were not applied due to the
+   * condition not being satisfied after evaluation.
    * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -123,7 +130,12 @@ public interface BatchWriteResponseOrBuilder * *
    * The commit timestamp of the transaction that applied this batch.
-   * Present if `status` is `OK`, absent otherwise.
+   * Present if status is OK and the mutation groups were applied, absent
+   * otherwise.
+   *
+   * For mutation groups with conditions, a status=OK and missing
+   * commit_timestamp means that the mutation groups were not applied due to the
+   * condition not being satisfied after evaluation.
    * 
* * .google.protobuf.Timestamp commit_timestamp = 3; @@ -137,7 +149,12 @@ public interface BatchWriteResponseOrBuilder * *
    * The commit timestamp of the transaction that applied this batch.
-   * Present if `status` is `OK`, absent otherwise.
+   * Present if status is OK and the mutation groups were applied, absent
+   * otherwise.
+   *
+   * For mutation groups with conditions, a status=OK and missing
+   * commit_timestamp means that the mutation groups were not applied due to the
+   * condition not being satisfied after evaluation.
    * 
* * .google.protobuf.Timestamp commit_timestamp = 3; diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java index 00e79021029..aa66a1eebb5 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.BeginTransactionRequest} */ -public final class BeginTransactionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class BeginTransactionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.BeginTransactionRequest) BeginTransactionRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BeginTransactionRequest"); + } + // Use BeginTransactionRequest.newBuilder() to construct. - private BeginTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BeginTransactionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private BeginTransactionRequest() { session_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BeginTransactionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BeginTransactionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BeginTransactionRequest_fieldAccessorTable @@ -312,6 +318,80 @@ public com.google.spanner.v1.MutationOrBuilder getMutationKeyOrBuilder() { : mutationKey_; } + public static final int ROUTING_HINT_FIELD_NUMBER = 5; + private com.google.spanner.v1.RoutingHint routingHint_; + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + @java.lang.Override + public boolean hasRoutingHint() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHint getRoutingHint() { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder() { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -326,8 +406,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getOptions()); @@ -338,6 +418,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getMutationKey()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(5, getRoutingHint()); + } getUnknownFields().writeTo(output); } @@ -347,8 +430,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOptions()); @@ -359,6 +442,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMutationKey()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRoutingHint()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -388,6 +474,10 @@ public boolean equals(final java.lang.Object obj) { if (hasMutationKey()) { if (!getMutationKey().equals(other.getMutationKey())) return false; } + if (hasRoutingHint() != other.hasRoutingHint()) return false; + if (hasRoutingHint()) { + if (!getRoutingHint().equals(other.getRoutingHint())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,6 +503,10 @@ public int hashCode() { hash = (37 * hash) + MUTATION_KEY_FIELD_NUMBER; hash = (53 * hash) + getMutationKey().hashCode(); } + if (hasRoutingHint()) { + hash = (37 * hash) + ROUTING_HINT_FIELD_NUMBER; + hash = (53 * hash) + getRoutingHint().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -455,38 +549,38 @@ public static com.google.spanner.v1.BeginTransactionRequest parseFrom( public static com.google.spanner.v1.BeginTransactionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BeginTransactionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BeginTransactionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.BeginTransactionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.BeginTransactionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.BeginTransactionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -509,7 +603,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -524,7 +618,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.BeginTransactionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.BeginTransactionRequest) com.google.spanner.v1.BeginTransactionRequestOrBuilder { @@ -534,7 +628,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_BeginTransactionRequest_fieldAccessorTable @@ -548,16 +642,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getOptionsFieldBuilder(); - getRequestOptionsFieldBuilder(); - getMutationKeyFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOptionsFieldBuilder(); + internalGetRequestOptionsFieldBuilder(); + internalGetMutationKeyFieldBuilder(); + internalGetRoutingHintFieldBuilder(); } } @@ -581,6 +676,11 @@ public Builder clear() { mutationKeyBuilder_.dispose(); mutationKeyBuilder_ = null; } + routingHint_ = null; + if (routingHintBuilder_ != null) { + routingHintBuilder_.dispose(); + routingHintBuilder_ = null; + } return this; } @@ -635,42 +735,14 @@ private void buildPartial0(com.google.spanner.v1.BeginTransactionRequest result) mutationKeyBuilder_ == null ? mutationKey_ : mutationKeyBuilder_.build(); to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.routingHint_ = + routingHintBuilder_ == null ? routingHint_ : routingHintBuilder_.build(); + to_bitField0_ |= 0x00000008; + } 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.v1.BeginTransactionRequest) { @@ -697,6 +769,9 @@ public Builder mergeFrom(com.google.spanner.v1.BeginTransactionRequest other) { if (other.hasMutationKey()) { mergeMutationKey(other.getMutationKey()); } + if (other.hasRoutingHint()) { + mergeRoutingHint(other.getRoutingHint()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -731,22 +806,31 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getMutationKeyFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMutationKeyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 + case 42: + { + input.readMessage( + internalGetRoutingHintFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -888,7 +972,7 @@ public Builder setSessionBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.TransactionOptions options_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder> @@ -1047,7 +1131,7 @@ public Builder clearOptions() { public com.google.spanner.v1.TransactionOptions.Builder getOptionsBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getOptionsFieldBuilder().getBuilder(); + return internalGetOptionsFieldBuilder().getBuilder(); } /** @@ -1082,14 +1166,14 @@ public com.google.spanner.v1.TransactionOptionsOrBuilder getOptionsOrBuilder() { * .google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder> - getOptionsFieldBuilder() { + internalGetOptionsFieldBuilder() { if (optionsBuilder_ == null) { optionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder>( @@ -1100,7 +1184,7 @@ public com.google.spanner.v1.TransactionOptionsOrBuilder getOptionsOrBuilder() { } private com.google.spanner.v1.RequestOptions requestOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> @@ -1273,7 +1357,7 @@ public Builder clearRequestOptions() { public com.google.spanner.v1.RequestOptions.Builder getRequestOptionsBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getRequestOptionsFieldBuilder().getBuilder(); + return internalGetRequestOptionsFieldBuilder().getBuilder(); } /** @@ -1312,14 +1396,14 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( * * .google.spanner.v1.RequestOptions request_options = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> - getRequestOptionsFieldBuilder() { + internalGetRequestOptionsFieldBuilder() { if (requestOptionsBuilder_ == null) { requestOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder>( @@ -1330,7 +1414,7 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( } private com.google.spanner.v1.Mutation mutationKey_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Mutation, com.google.spanner.v1.Mutation.Builder, com.google.spanner.v1.MutationOrBuilder> @@ -1503,7 +1587,7 @@ public Builder clearMutationKey() { public com.google.spanner.v1.Mutation.Builder getMutationKeyBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getMutationKeyFieldBuilder().getBuilder(); + return internalGetMutationKeyFieldBuilder().getBuilder(); } /** @@ -1542,14 +1626,14 @@ public com.google.spanner.v1.MutationOrBuilder getMutationKeyOrBuilder() { * .google.spanner.v1.Mutation mutation_key = 4 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Mutation, com.google.spanner.v1.Mutation.Builder, com.google.spanner.v1.MutationOrBuilder> - getMutationKeyFieldBuilder() { + internalGetMutationKeyFieldBuilder() { if (mutationKeyBuilder_ == null) { mutationKeyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Mutation, com.google.spanner.v1.Mutation.Builder, com.google.spanner.v1.MutationOrBuilder>( @@ -1559,15 +1643,261 @@ public com.google.spanner.v1.MutationOrBuilder getMutationKeyOrBuilder() { return mutationKeyBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.RoutingHint routingHint_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder> + routingHintBuilder_; + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + public boolean hasRoutingHint() { + return ((bitField0_ & 0x00000010) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + public com.google.spanner.v1.RoutingHint getRoutingHint() { + if (routingHintBuilder_ == null) { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } else { + return routingHintBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRoutingHint(com.google.spanner.v1.RoutingHint value) { + if (routingHintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + routingHint_ = value; + } else { + routingHintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRoutingHint(com.google.spanner.v1.RoutingHint.Builder builderForValue) { + if (routingHintBuilder_ == null) { + routingHint_ = builderForValue.build(); + } else { + routingHintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRoutingHint(com.google.spanner.v1.RoutingHint value) { + if (routingHintBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && routingHint_ != null + && routingHint_ != com.google.spanner.v1.RoutingHint.getDefaultInstance()) { + getRoutingHintBuilder().mergeFrom(value); + } else { + routingHint_ = value; + } + } else { + routingHintBuilder_.mergeFrom(value); + } + if (routingHint_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRoutingHint() { + bitField0_ = (bitField0_ & ~0x00000010); + routingHint_ = null; + if (routingHintBuilder_ != null) { + routingHintBuilder_.dispose(); + routingHintBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RoutingHint.Builder getRoutingHintBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetRoutingHintFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder() { + if (routingHintBuilder_ != null) { + return routingHintBuilder_.getMessageOrBuilder(); + } else { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder> + internalGetRoutingHintFieldBuilder() { + if (routingHintBuilder_ == null) { + routingHintBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder>( + getRoutingHint(), getParentForChildren(), isClean()); + routingHint_ = null; + } + return routingHintBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.BeginTransactionRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java index 3290558bc05..30c8901404e 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface BeginTransactionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.BeginTransactionRequest) @@ -194,4 +196,62 @@ public interface BeginTransactionRequestOrBuilder * */ com.google.spanner.v1.MutationOrBuilder getMutationKeyOrBuilder(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + boolean hasRoutingHint(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + com.google.spanner.v1.RoutingHint getRoutingHint(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CacheUpdate.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CacheUpdate.java new file mode 100644 index 00000000000..c807c6168e7 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CacheUpdate.java @@ -0,0 +1,1820 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +/** + * + * + *
+ * A `CacheUpdate` expresses a set of changes the client should incorporate into
+ * its location cache. These changes may or may not be newer than what the
+ * client has in its cache, and should be discarded if necessary. `CacheUpdate`s
+ * can be obtained in response to requests that included a `RoutingHint`
+ * field, but may also be obtained by explicit location-fetching RPCs which may
+ * be added in the future.
+ * 
+ * + * Protobuf type {@code google.spanner.v1.CacheUpdate} + */ +@com.google.protobuf.Generated +public final class CacheUpdate extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.CacheUpdate) + CacheUpdateOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CacheUpdate"); + } + + // Use CacheUpdate.newBuilder() to construct. + private CacheUpdate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CacheUpdate() { + range_ = java.util.Collections.emptyList(); + group_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_CacheUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_CacheUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.CacheUpdate.class, + com.google.spanner.v1.CacheUpdate.Builder.class); + } + + private int bitField0_; + public static final int DATABASE_ID_FIELD_NUMBER = 1; + private long databaseId_ = 0L; + + /** + * + * + *
+   * An internal ID for the database. Database names can be reused if a database
+   * is deleted and re-created. Each time the database is re-created, it will
+   * get a new database ID, which will never be re-used for any other database.
+   * 
+ * + * uint64 database_id = 1; + * + * @return The databaseId. + */ + @java.lang.Override + public long getDatabaseId() { + return databaseId_; + } + + public static final int RANGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List range_; + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + @java.lang.Override + public java.util.List getRangeList() { + return range_; + } + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + @java.lang.Override + public java.util.List getRangeOrBuilderList() { + return range_; + } + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + @java.lang.Override + public int getRangeCount() { + return range_.size(); + } + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + @java.lang.Override + public com.google.spanner.v1.Range getRange(int index) { + return range_.get(index); + } + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + @java.lang.Override + public com.google.spanner.v1.RangeOrBuilder getRangeOrBuilder(int index) { + return range_.get(index); + } + + public static final int GROUP_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List group_; + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + @java.lang.Override + public java.util.List getGroupList() { + return group_; + } + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + @java.lang.Override + public java.util.List getGroupOrBuilderList() { + return group_; + } + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + @java.lang.Override + public int getGroupCount() { + return group_.size(); + } + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + @java.lang.Override + public com.google.spanner.v1.Group getGroup(int index) { + return group_.get(index); + } + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + @java.lang.Override + public com.google.spanner.v1.GroupOrBuilder getGroupOrBuilder(int index) { + return group_.get(index); + } + + public static final int KEY_RECIPES_FIELD_NUMBER = 5; + private com.google.spanner.v1.RecipeList keyRecipes_; + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + * + * @return Whether the keyRecipes field is set. + */ + @java.lang.Override + public boolean hasKeyRecipes() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + * + * @return The keyRecipes. + */ + @java.lang.Override + public com.google.spanner.v1.RecipeList getKeyRecipes() { + return keyRecipes_ == null + ? com.google.spanner.v1.RecipeList.getDefaultInstance() + : keyRecipes_; + } + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + */ + @java.lang.Override + public com.google.spanner.v1.RecipeListOrBuilder getKeyRecipesOrBuilder() { + return keyRecipes_ == null + ? com.google.spanner.v1.RecipeList.getDefaultInstance() + : keyRecipes_; + } + + 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 (databaseId_ != 0L) { + output.writeUInt64(1, databaseId_); + } + for (int i = 0; i < range_.size(); i++) { + output.writeMessage(2, range_.get(i)); + } + for (int i = 0; i < group_.size(); i++) { + output.writeMessage(3, group_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getKeyRecipes()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (databaseId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(1, databaseId_); + } + for (int i = 0; i < range_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, range_.get(i)); + } + for (int i = 0; i < group_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, group_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getKeyRecipes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.CacheUpdate)) { + return super.equals(obj); + } + com.google.spanner.v1.CacheUpdate other = (com.google.spanner.v1.CacheUpdate) obj; + + if (getDatabaseId() != other.getDatabaseId()) return false; + if (!getRangeList().equals(other.getRangeList())) return false; + if (!getGroupList().equals(other.getGroupList())) return false; + if (hasKeyRecipes() != other.hasKeyRecipes()) return false; + if (hasKeyRecipes()) { + if (!getKeyRecipes().equals(other.getKeyRecipes())) 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) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDatabaseId()); + if (getRangeCount() > 0) { + hash = (37 * hash) + RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRangeList().hashCode(); + } + if (getGroupCount() > 0) { + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroupList().hashCode(); + } + if (hasKeyRecipes()) { + hash = (37 * hash) + KEY_RECIPES_FIELD_NUMBER; + hash = (53 * hash) + getKeyRecipes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.CacheUpdate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.CacheUpdate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.CacheUpdate parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.CacheUpdate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.CacheUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.CacheUpdate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.CacheUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.CacheUpdate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.CacheUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.CacheUpdate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.CacheUpdate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.CacheUpdate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.CacheUpdate 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A `CacheUpdate` expresses a set of changes the client should incorporate into
+   * its location cache. These changes may or may not be newer than what the
+   * client has in its cache, and should be discarded if necessary. `CacheUpdate`s
+   * can be obtained in response to requests that included a `RoutingHint`
+   * field, but may also be obtained by explicit location-fetching RPCs which may
+   * be added in the future.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.CacheUpdate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.CacheUpdate) + com.google.spanner.v1.CacheUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_CacheUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_CacheUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.CacheUpdate.class, + com.google.spanner.v1.CacheUpdate.Builder.class); + } + + // Construct using com.google.spanner.v1.CacheUpdate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRangeFieldBuilder(); + internalGetGroupFieldBuilder(); + internalGetKeyRecipesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + databaseId_ = 0L; + if (rangeBuilder_ == null) { + range_ = java.util.Collections.emptyList(); + } else { + range_ = null; + rangeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (groupBuilder_ == null) { + group_ = java.util.Collections.emptyList(); + } else { + group_ = null; + groupBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + keyRecipes_ = null; + if (keyRecipesBuilder_ != null) { + keyRecipesBuilder_.dispose(); + keyRecipesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_CacheUpdate_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.CacheUpdate getDefaultInstanceForType() { + return com.google.spanner.v1.CacheUpdate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.CacheUpdate build() { + com.google.spanner.v1.CacheUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.CacheUpdate buildPartial() { + com.google.spanner.v1.CacheUpdate result = new com.google.spanner.v1.CacheUpdate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.v1.CacheUpdate result) { + if (rangeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + range_ = java.util.Collections.unmodifiableList(range_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.range_ = range_; + } else { + result.range_ = rangeBuilder_.build(); + } + if (groupBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + group_ = java.util.Collections.unmodifiableList(group_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.group_ = group_; + } else { + result.group_ = groupBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.v1.CacheUpdate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.databaseId_ = databaseId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.keyRecipes_ = keyRecipesBuilder_ == null ? keyRecipes_ : keyRecipesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.CacheUpdate) { + return mergeFrom((com.google.spanner.v1.CacheUpdate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.CacheUpdate other) { + if (other == com.google.spanner.v1.CacheUpdate.getDefaultInstance()) return this; + if (other.getDatabaseId() != 0L) { + setDatabaseId(other.getDatabaseId()); + } + 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.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRangeFieldBuilder() + : null; + } else { + rangeBuilder_.addAllMessages(other.range_); + } + } + } + if (groupBuilder_ == null) { + if (!other.group_.isEmpty()) { + if (group_.isEmpty()) { + group_ = other.group_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureGroupIsMutable(); + group_.addAll(other.group_); + } + onChanged(); + } + } else { + if (!other.group_.isEmpty()) { + if (groupBuilder_.isEmpty()) { + groupBuilder_.dispose(); + groupBuilder_ = null; + group_ = other.group_; + bitField0_ = (bitField0_ & ~0x00000004); + groupBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGroupFieldBuilder() + : null; + } else { + groupBuilder_.addAllMessages(other.group_); + } + } + } + if (other.hasKeyRecipes()) { + mergeKeyRecipes(other.getKeyRecipes()); + } + 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: + { + databaseId_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + com.google.spanner.v1.Range m = + input.readMessage(com.google.spanner.v1.Range.parser(), extensionRegistry); + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.add(m); + } else { + rangeBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.spanner.v1.Group m = + input.readMessage(com.google.spanner.v1.Group.parser(), extensionRegistry); + if (groupBuilder_ == null) { + ensureGroupIsMutable(); + group_.add(m); + } else { + groupBuilder_.addMessage(m); + } + break; + } // case 26 + case 42: + { + input.readMessage( + internalGetKeyRecipesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + 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 long databaseId_; + + /** + * + * + *
+     * An internal ID for the database. Database names can be reused if a database
+     * is deleted and re-created. Each time the database is re-created, it will
+     * get a new database ID, which will never be re-used for any other database.
+     * 
+ * + * uint64 database_id = 1; + * + * @return The databaseId. + */ + @java.lang.Override + public long getDatabaseId() { + return databaseId_; + } + + /** + * + * + *
+     * An internal ID for the database. Database names can be reused if a database
+     * is deleted and re-created. Each time the database is re-created, it will
+     * get a new database ID, which will never be re-used for any other database.
+     * 
+ * + * uint64 database_id = 1; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(long value) { + + databaseId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * An internal ID for the database. Database names can be reused if a database
+     * is deleted and re-created. Each time the database is re-created, it will
+     * get a new database ID, which will never be re-used for any other database.
+     * 
+ * + * uint64 database_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + bitField0_ = (bitField0_ & ~0x00000001); + databaseId_ = 0L; + onChanged(); + return this; + } + + 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.RepeatedFieldBuilder< + com.google.spanner.v1.Range, + com.google.spanner.v1.Range.Builder, + com.google.spanner.v1.RangeOrBuilder> + rangeBuilder_; + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public java.util.List getRangeList() { + if (rangeBuilder_ == null) { + return java.util.Collections.unmodifiableList(range_); + } else { + return rangeBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public int getRangeCount() { + if (rangeBuilder_ == null) { + return range_.size(); + } else { + return rangeBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public com.google.spanner.v1.Range getRange(int index) { + if (rangeBuilder_ == null) { + return range_.get(index); + } else { + return rangeBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public Builder setRange(int index, com.google.spanner.v1.Range 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 ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public Builder setRange(int index, com.google.spanner.v1.Range.Builder builderForValue) { + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.set(index, builderForValue.build()); + onChanged(); + } else { + rangeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public Builder addRange(com.google.spanner.v1.Range value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangeIsMutable(); + range_.add(value); + onChanged(); + } else { + rangeBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public Builder addRange(int index, com.google.spanner.v1.Range 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 ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public Builder addRange(com.google.spanner.v1.Range.Builder builderForValue) { + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.add(builderForValue.build()); + onChanged(); + } else { + rangeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public Builder addRange(int index, com.google.spanner.v1.Range.Builder builderForValue) { + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.add(index, builderForValue.build()); + onChanged(); + } else { + rangeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range 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 ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range 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 ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public Builder removeRange(int index) { + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.remove(index); + onChanged(); + } else { + rangeBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public com.google.spanner.v1.Range.Builder getRangeBuilder(int index) { + return internalGetRangeFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public com.google.spanner.v1.RangeOrBuilder getRangeOrBuilder(int index) { + if (rangeBuilder_ == null) { + return range_.get(index); + } else { + return rangeBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public java.util.List getRangeOrBuilderList() { + if (rangeBuilder_ != null) { + return rangeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(range_); + } + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public com.google.spanner.v1.Range.Builder addRangeBuilder() { + return internalGetRangeFieldBuilder() + .addBuilder(com.google.spanner.v1.Range.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public com.google.spanner.v1.Range.Builder addRangeBuilder(int index) { + return internalGetRangeFieldBuilder() + .addBuilder(index, com.google.spanner.v1.Range.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of ranges to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + public java.util.List getRangeBuilderList() { + return internalGetRangeFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.Range, + com.google.spanner.v1.Range.Builder, + com.google.spanner.v1.RangeOrBuilder> + internalGetRangeFieldBuilder() { + if (rangeBuilder_ == null) { + rangeBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.Range, + com.google.spanner.v1.Range.Builder, + com.google.spanner.v1.RangeOrBuilder>( + range_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + range_ = null; + } + return rangeBuilder_; + } + + private java.util.List group_ = java.util.Collections.emptyList(); + + private void ensureGroupIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + group_ = new java.util.ArrayList(group_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.Group, + com.google.spanner.v1.Group.Builder, + com.google.spanner.v1.GroupOrBuilder> + groupBuilder_; + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public java.util.List getGroupList() { + if (groupBuilder_ == null) { + return java.util.Collections.unmodifiableList(group_); + } else { + return groupBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public int getGroupCount() { + if (groupBuilder_ == null) { + return group_.size(); + } else { + return groupBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public com.google.spanner.v1.Group getGroup(int index) { + if (groupBuilder_ == null) { + return group_.get(index); + } else { + return groupBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public Builder setGroup(int index, com.google.spanner.v1.Group value) { + if (groupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupIsMutable(); + group_.set(index, value); + onChanged(); + } else { + groupBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public Builder setGroup(int index, com.google.spanner.v1.Group.Builder builderForValue) { + if (groupBuilder_ == null) { + ensureGroupIsMutable(); + group_.set(index, builderForValue.build()); + onChanged(); + } else { + groupBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public Builder addGroup(com.google.spanner.v1.Group value) { + if (groupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupIsMutable(); + group_.add(value); + onChanged(); + } else { + groupBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public Builder addGroup(int index, com.google.spanner.v1.Group value) { + if (groupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupIsMutable(); + group_.add(index, value); + onChanged(); + } else { + groupBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public Builder addGroup(com.google.spanner.v1.Group.Builder builderForValue) { + if (groupBuilder_ == null) { + ensureGroupIsMutable(); + group_.add(builderForValue.build()); + onChanged(); + } else { + groupBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public Builder addGroup(int index, com.google.spanner.v1.Group.Builder builderForValue) { + if (groupBuilder_ == null) { + ensureGroupIsMutable(); + group_.add(index, builderForValue.build()); + onChanged(); + } else { + groupBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public Builder addAllGroup(java.lang.Iterable values) { + if (groupBuilder_ == null) { + ensureGroupIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, group_); + onChanged(); + } else { + groupBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public Builder clearGroup() { + if (groupBuilder_ == null) { + group_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + groupBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public Builder removeGroup(int index) { + if (groupBuilder_ == null) { + ensureGroupIsMutable(); + group_.remove(index); + onChanged(); + } else { + groupBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public com.google.spanner.v1.Group.Builder getGroupBuilder(int index) { + return internalGetGroupFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public com.google.spanner.v1.GroupOrBuilder getGroupOrBuilder(int index) { + if (groupBuilder_ == null) { + return group_.get(index); + } else { + return groupBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public java.util.List getGroupOrBuilderList() { + if (groupBuilder_ != null) { + return groupBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(group_); + } + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public com.google.spanner.v1.Group.Builder addGroupBuilder() { + return internalGetGroupFieldBuilder() + .addBuilder(com.google.spanner.v1.Group.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public com.google.spanner.v1.Group.Builder addGroupBuilder(int index) { + return internalGetGroupFieldBuilder() + .addBuilder(index, com.google.spanner.v1.Group.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of groups to be cached.
+     * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + public java.util.List getGroupBuilderList() { + return internalGetGroupFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.Group, + com.google.spanner.v1.Group.Builder, + com.google.spanner.v1.GroupOrBuilder> + internalGetGroupFieldBuilder() { + if (groupBuilder_ == null) { + groupBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.Group, + com.google.spanner.v1.Group.Builder, + com.google.spanner.v1.GroupOrBuilder>( + group_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + group_ = null; + } + return groupBuilder_; + } + + private com.google.spanner.v1.RecipeList keyRecipes_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RecipeList, + com.google.spanner.v1.RecipeList.Builder, + com.google.spanner.v1.RecipeListOrBuilder> + keyRecipesBuilder_; + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + * + * @return Whether the keyRecipes field is set. + */ + public boolean hasKeyRecipes() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + * + * @return The keyRecipes. + */ + public com.google.spanner.v1.RecipeList getKeyRecipes() { + if (keyRecipesBuilder_ == null) { + return keyRecipes_ == null + ? com.google.spanner.v1.RecipeList.getDefaultInstance() + : keyRecipes_; + } else { + return keyRecipesBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + */ + public Builder setKeyRecipes(com.google.spanner.v1.RecipeList value) { + if (keyRecipesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keyRecipes_ = value; + } else { + keyRecipesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + */ + public Builder setKeyRecipes(com.google.spanner.v1.RecipeList.Builder builderForValue) { + if (keyRecipesBuilder_ == null) { + keyRecipes_ = builderForValue.build(); + } else { + keyRecipesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + */ + public Builder mergeKeyRecipes(com.google.spanner.v1.RecipeList value) { + if (keyRecipesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && keyRecipes_ != null + && keyRecipes_ != com.google.spanner.v1.RecipeList.getDefaultInstance()) { + getKeyRecipesBuilder().mergeFrom(value); + } else { + keyRecipes_ = value; + } + } else { + keyRecipesBuilder_.mergeFrom(value); + } + if (keyRecipes_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + */ + public Builder clearKeyRecipes() { + bitField0_ = (bitField0_ & ~0x00000008); + keyRecipes_ = null; + if (keyRecipesBuilder_ != null) { + keyRecipesBuilder_.dispose(); + keyRecipesBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + */ + public com.google.spanner.v1.RecipeList.Builder getKeyRecipesBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetKeyRecipesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + */ + public com.google.spanner.v1.RecipeListOrBuilder getKeyRecipesOrBuilder() { + if (keyRecipesBuilder_ != null) { + return keyRecipesBuilder_.getMessageOrBuilder(); + } else { + return keyRecipes_ == null + ? com.google.spanner.v1.RecipeList.getDefaultInstance() + : keyRecipes_; + } + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RecipeList, + com.google.spanner.v1.RecipeList.Builder, + com.google.spanner.v1.RecipeListOrBuilder> + internalGetKeyRecipesFieldBuilder() { + if (keyRecipesBuilder_ == null) { + keyRecipesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RecipeList, + com.google.spanner.v1.RecipeList.Builder, + com.google.spanner.v1.RecipeListOrBuilder>( + getKeyRecipes(), getParentForChildren(), isClean()); + keyRecipes_ = null; + } + return keyRecipesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.CacheUpdate) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.CacheUpdate) + private static final com.google.spanner.v1.CacheUpdate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.CacheUpdate(); + } + + public static com.google.spanner.v1.CacheUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CacheUpdate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.CacheUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CacheUpdateOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CacheUpdateOrBuilder.java new file mode 100644 index 00000000000..aafedbae4fb --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CacheUpdateOrBuilder.java @@ -0,0 +1,190 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +@com.google.protobuf.Generated +public interface CacheUpdateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.CacheUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An internal ID for the database. Database names can be reused if a database
+   * is deleted and re-created. Each time the database is re-created, it will
+   * get a new database ID, which will never be re-used for any other database.
+   * 
+ * + * uint64 database_id = 1; + * + * @return The databaseId. + */ + long getDatabaseId(); + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + java.util.List getRangeList(); + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + com.google.spanner.v1.Range getRange(int index); + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + int getRangeCount(); + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + java.util.List getRangeOrBuilderList(); + + /** + * + * + *
+   * A list of ranges to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Range range = 2; + */ + com.google.spanner.v1.RangeOrBuilder getRangeOrBuilder(int index); + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + java.util.List getGroupList(); + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + com.google.spanner.v1.Group getGroup(int index); + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + int getGroupCount(); + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + java.util.List getGroupOrBuilderList(); + + /** + * + * + *
+   * A list of groups to be cached.
+   * 
+ * + * repeated .google.spanner.v1.Group group = 3; + */ + com.google.spanner.v1.GroupOrBuilder getGroupOrBuilder(int index); + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + * + * @return Whether the keyRecipes field is set. + */ + boolean hasKeyRecipes(); + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + * + * @return The keyRecipes. + */ + com.google.spanner.v1.RecipeList getKeyRecipes(); + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * .google.spanner.v1.RecipeList key_recipes = 5; + */ + com.google.spanner.v1.RecipeListOrBuilder getKeyRecipesOrBuilder(); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamProto.java index 651591b28bd..ce0a156c394 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/change_stream.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; -public final class ChangeStreamProto { +@com.google.protobuf.Generated +public final class ChangeStreamProto extends com.google.protobuf.GeneratedFile { private ChangeStreamProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChangeStreamProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,47 +42,47 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -165,9 +177,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.spanner.v1.TypeProto.getDescriptor(), }); internal_static_google_spanner_v1_ChangeStreamRecord_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_spanner_v1_ChangeStreamRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_descriptor, new java.lang.String[] { "DataChangeRecord", @@ -178,9 +190,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Record", }); internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor = - internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(0); + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedType(0); internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor, new java.lang.String[] { "CommitTimestamp", @@ -199,62 +211,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_descriptor = internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor - .getNestedTypes() - .get(0); + .getNestedType(0); internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_descriptor, new java.lang.String[] { "Name", "Type", "IsPrimaryKey", "OrdinalPosition", }); internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_descriptor = internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor - .getNestedTypes() - .get(1); + .getNestedType(1); internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_descriptor, new java.lang.String[] { "ColumnMetadataIndex", "Value", }); internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_descriptor = internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor - .getNestedTypes() - .get(2); + .getNestedType(2); internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_descriptor, new java.lang.String[] { "Keys", "OldValues", "NewValues", }); internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_descriptor = - internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(1); + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedType(1); internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_descriptor, new java.lang.String[] { "Timestamp", }); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_descriptor = - internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(2); + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedType(2); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_descriptor, new java.lang.String[] { "StartTimestamp", "RecordSequence", "PartitionTokens", }); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_descriptor = - internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(3); + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedType(3); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_descriptor, new java.lang.String[] { "EndTimestamp", "RecordSequence", "PartitionToken", }); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor = - internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(4); + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedType(4); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor, new java.lang.String[] { "CommitTimestamp", @@ -265,24 +274,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_descriptor = internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor - .getNestedTypes() - .get(0); + .getNestedType(0); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_descriptor, new java.lang.String[] { "SourcePartitionToken", }); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_descriptor = internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor - .getNestedTypes() - .get(1); + .getNestedType(1); internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_descriptor, new java.lang.String[] { "DestinationPartitionToken", }); + descriptor.resolveAllFeaturesImmutable(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.spanner.v1.TypeProto.getDescriptor(); diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecord.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecord.java index e842c7fc79a..9409738a81a 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecord.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecord.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/change_stream.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -39,32 +40,37 @@ * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord} */ -public final class ChangeStreamRecord extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ChangeStreamRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord) ChangeStreamRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChangeStreamRecord"); + } + // Use ChangeStreamRecord.newBuilder() to construct. - private ChangeStreamRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ChangeStreamRecord(com.google.protobuf.GeneratedMessage.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.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_fieldAccessorTable @@ -219,8 +225,8 @@ public interface DataChangeRecordOrBuilder * *
      * Indicates whether this is the last record for a transaction in the
-     *  current partition. Clients can use this field to determine when all
-     *  records for a transaction in the current partition have been received.
+     * current partition. Clients can use this field to determine when all
+     * records for a transaction in the current partition have been received.
      * 
* * bool is_last_record_in_transaction_in_partition = 4; @@ -537,14 +543,24 @@ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder getModsOr * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord} */ - public static final class DataChangeRecord extends com.google.protobuf.GeneratedMessageV3 + public static final class DataChangeRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord) DataChangeRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataChangeRecord"); + } + // Use DataChangeRecord.newBuilder() to construct. - private DataChangeRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DataChangeRecord(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -559,19 +575,13 @@ private DataChangeRecord() { 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.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_fieldAccessorTable @@ -637,6 +647,16 @@ public enum ModType implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModType"); + } + /** * * @@ -741,7 +761,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDescriptor() .getEnumTypes() .get(0); @@ -835,6 +855,16 @@ public enum ValueCaptureType implements com.google.protobuf.ProtocolMessageEnum UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ValueCaptureType"); + } + /** * * @@ -957,7 +987,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDescriptor() .getEnumTypes() .get(1); @@ -1090,14 +1120,24 @@ public interface ColumnMetadataOrBuilder * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata} */ - public static final class ColumnMetadata extends com.google.protobuf.GeneratedMessageV3 + public static final class ColumnMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata) ColumnMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ColumnMetadata"); + } + // Use ColumnMetadata.newBuilder() to construct. - private ColumnMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ColumnMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1105,19 +1145,13 @@ 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.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_fieldAccessorTable @@ -1283,8 +1317,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getType()); @@ -1304,8 +1338,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); @@ -1406,7 +1440,7 @@ public int hashCode() { public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata @@ -1414,13 +1448,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata @@ -1428,13 +1462,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata @@ -1442,7 +1476,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1467,7 +1501,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1482,7 +1516,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata) com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder { @@ -1492,7 +1526,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_fieldAccessorTable @@ -1508,14 +1542,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTypeFieldBuilder(); } } @@ -1589,41 +1623,6 @@ private void buildPartial0( 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 @@ -1689,7 +1688,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -1836,7 +1836,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.Type type_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> @@ -1979,7 +1979,7 @@ public Builder clearType() { public com.google.spanner.v1.Type.Builder getTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTypeFieldBuilder().getBuilder(); + return internalGetTypeFieldBuilder().getBuilder(); } /** @@ -2008,14 +2008,14 @@ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { * * .google.spanner.v1.Type type = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> - getTypeFieldBuilder() { + internalGetTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder>( @@ -2140,18 +2140,6 @@ public Builder clearOrdinalPosition() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata) } @@ -2276,32 +2264,36 @@ public interface ModValueOrBuilder * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue} */ - public static final class ModValue extends com.google.protobuf.GeneratedMessageV3 + public static final class ModValue extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue) ModValueOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModValue"); + } + // Use ModValue.newBuilder() to construct. - private ModValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ModValue(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ModValue() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ModValue(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_fieldAccessorTable @@ -2496,19 +2488,19 @@ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue @@ -2516,20 +2508,20 @@ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2554,7 +2546,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2570,7 +2562,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue) com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder { @@ -2580,7 +2572,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_fieldAccessorTable @@ -2595,14 +2587,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getValueFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetValueFieldBuilder(); } } @@ -2667,41 +2659,6 @@ private void buildPartial0( 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.v1.ChangeStreamRecord.DataChangeRecord.ModValue) { @@ -2758,7 +2715,8 @@ public Builder mergeFrom( } // case 8 case 18: { - input.readMessage(getValueFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetValueFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -2844,7 +2802,7 @@ public Builder clearColumnMetadataIndex() { } private com.google.protobuf.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> @@ -2987,7 +2945,7 @@ public Builder clearValue() { public com.google.protobuf.Value.Builder getValueBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getValueFieldBuilder().getBuilder(); + return internalGetValueFieldBuilder().getBuilder(); } /** @@ -3016,14 +2974,14 @@ public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { * * .google.protobuf.Value value = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> - getValueFieldBuilder() { + internalGetValueFieldBuilder() { if (valueBuilder_ == null) { valueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder>( @@ -3033,18 +2991,6 @@ public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { 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.v1.ChangeStreamRecord.DataChangeRecord.ModValue) } @@ -3347,14 +3293,24 @@ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder getK * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod} */ - public static final class Mod extends com.google.protobuf.GeneratedMessageV3 + public static final class Mod extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod) ModOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Mod"); + } + // Use Mod.newBuilder() to construct. - private Mod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Mod(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -3364,19 +3320,13 @@ private Mod() { newValues_ = java.util.Collections.emptyList(); } - @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.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_fieldAccessorTable @@ -3807,19 +3757,19 @@ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod pars public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod @@ -3827,20 +3777,20 @@ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod pars java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -3865,7 +3815,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3880,7 +3830,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod) com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder { @@ -3890,7 +3840,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_fieldAccessorTable @@ -3903,7 +3853,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -4004,41 +3954,6 @@ private void buildPartial0( int from_bitField0_ = bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod) { @@ -4073,8 +3988,8 @@ public Builder mergeFrom( keys_ = other.keys_; bitField0_ = (bitField0_ & ~0x00000001); keysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getKeysFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetKeysFieldBuilder() : null; } else { keysBuilder_.addAllMessages(other.keys_); @@ -4100,8 +4015,8 @@ public Builder mergeFrom( oldValues_ = other.oldValues_; bitField0_ = (bitField0_ & ~0x00000002); oldValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getOldValuesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetOldValuesFieldBuilder() : null; } else { oldValuesBuilder_.addAllMessages(other.oldValues_); @@ -4127,8 +4042,8 @@ public Builder mergeFrom( newValues_ = other.newValues_; bitField0_ = (bitField0_ & ~0x00000004); newValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNewValuesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetNewValuesFieldBuilder() : null; } else { newValuesBuilder_.addAllMessages(other.newValues_); @@ -4237,7 +4152,7 @@ private void ensureKeysIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder> @@ -4523,7 +4438,7 @@ public Builder removeKeys(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder getKeysBuilder(int index) { - return getKeysFieldBuilder().getBuilder(index); + return internalGetKeysFieldBuilder().getBuilder(index); } /** @@ -4578,7 +4493,7 @@ public Builder removeKeys(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder addKeysBuilder() { - return getKeysFieldBuilder() + return internalGetKeysFieldBuilder() .addBuilder( com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue .getDefaultInstance()); @@ -4596,7 +4511,7 @@ public Builder removeKeys(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder addKeysBuilder(int index) { - return getKeysFieldBuilder() + return internalGetKeysFieldBuilder() .addBuilder( index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue @@ -4616,17 +4531,17 @@ public Builder removeKeys(int index) { public java.util.List< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder> getKeysBuilderList() { - return getKeysFieldBuilder().getBuilderList(); + return internalGetKeysFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder> - getKeysFieldBuilder() { + internalGetKeysFieldBuilder() { if (keysBuilder_ == null) { keysBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>( @@ -4648,7 +4563,7 @@ private void ensureOldValuesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder> @@ -4999,7 +4914,7 @@ public Builder removeOldValues(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder getOldValuesBuilder(int index) { - return getOldValuesFieldBuilder().getBuilder(index); + return internalGetOldValuesFieldBuilder().getBuilder(index); } /** @@ -5069,7 +4984,7 @@ public Builder removeOldValues(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder addOldValuesBuilder() { - return getOldValuesFieldBuilder() + return internalGetOldValuesFieldBuilder() .addBuilder( com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue .getDefaultInstance()); @@ -5092,7 +5007,7 @@ public Builder removeOldValues(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder addOldValuesBuilder(int index) { - return getOldValuesFieldBuilder() + return internalGetOldValuesFieldBuilder() .addBuilder( index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue @@ -5117,17 +5032,17 @@ public Builder removeOldValues(int index) { public java.util.List< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder> getOldValuesBuilderList() { - return getOldValuesFieldBuilder().getBuilderList(); + return internalGetOldValuesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder> - getOldValuesFieldBuilder() { + internalGetOldValuesFieldBuilder() { if (oldValuesBuilder_ == null) { oldValuesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>( @@ -5152,7 +5067,7 @@ private void ensureNewValuesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder> @@ -5477,7 +5392,7 @@ public Builder removeNewValues(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder getNewValuesBuilder(int index) { - return getNewValuesFieldBuilder().getBuilder(index); + return internalGetNewValuesFieldBuilder().getBuilder(index); } /** @@ -5541,7 +5456,7 @@ public Builder removeNewValues(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder addNewValuesBuilder() { - return getNewValuesFieldBuilder() + return internalGetNewValuesFieldBuilder() .addBuilder( com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue .getDefaultInstance()); @@ -5562,7 +5477,7 @@ public Builder removeNewValues(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder addNewValuesBuilder(int index) { - return getNewValuesFieldBuilder() + return internalGetNewValuesFieldBuilder() .addBuilder( index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue @@ -5585,17 +5500,17 @@ public Builder removeNewValues(int index) { public java.util.List< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder> getNewValuesBuilderList() { - return getNewValuesFieldBuilder().getBuilderList(); + return internalGetNewValuesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder> - getNewValuesFieldBuilder() { + internalGetNewValuesFieldBuilder() { if (newValuesBuilder_ == null) { newValuesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>( @@ -5608,18 +5523,6 @@ public Builder removeNewValues(int index) { return newValuesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod) } @@ -5890,8 +5793,8 @@ public com.google.protobuf.ByteString getServerTransactionIdBytes() { * *
      * Indicates whether this is the last record for a transaction in the
-     *  current partition. Clients can use this field to determine when all
-     *  records for a transaction in the current partition have been received.
+     * current partition. Clients can use this field to determine when all
+     * records for a transaction in the current partition have been received.
      * 
* * bool is_last_record_in_transaction_in_partition = 4; @@ -6356,17 +6259,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getCommitTimestamp()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, recordSequence_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverTransactionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, serverTransactionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverTransactionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, serverTransactionId_); } if (isLastRecordInTransactionInPartition_ != false) { output.writeBool(4, isLastRecordInTransactionInPartition_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, table_); } for (int i = 0; i < columnMetadata_.size(); i++) { output.writeMessage(6, columnMetadata_.get(i)); @@ -6391,8 +6294,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (numberOfPartitionsInTransaction_ != 0) { output.writeInt32(11, numberOfPartitionsInTransaction_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionTag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 12, transactionTag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionTag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, transactionTag_); } if (isSystemTransaction_ != false) { output.writeBool(13, isSystemTransaction_); @@ -6409,19 +6312,19 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommitTimestamp()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, recordSequence_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverTransactionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, serverTransactionId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverTransactionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, serverTransactionId_); } if (isLastRecordInTransactionInPartition_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize( 4, isLastRecordInTransactionInPartition_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, table_); } for (int i = 0; i < columnMetadata_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, columnMetadata_.get(i)); @@ -6450,8 +6353,8 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 11, numberOfPartitionsInTransaction_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionTag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, transactionTag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionTag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, transactionTag_); } if (isSystemTransaction_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, isSystemTransaction_); @@ -6578,38 +6481,38 @@ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFro public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -6633,8 +6536,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -6652,8 +6554,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord) com.google.spanner.v1.ChangeStreamRecord.DataChangeRecordOrBuilder { @@ -6663,7 +6564,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_fieldAccessorTable @@ -6677,16 +6578,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCommitTimestampFieldBuilder(); - getColumnMetadataFieldBuilder(); - getModsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCommitTimestampFieldBuilder(); + internalGetColumnMetadataFieldBuilder(); + internalGetModsFieldBuilder(); } } @@ -6821,41 +6722,6 @@ private void buildPartial0(com.google.spanner.v1.ChangeStreamRecord.DataChangeRe 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.v1.ChangeStreamRecord.DataChangeRecord) { @@ -6909,8 +6775,8 @@ public Builder mergeFrom(com.google.spanner.v1.ChangeStreamRecord.DataChangeReco columnMetadata_ = other.columnMetadata_; bitField0_ = (bitField0_ & ~0x00000020); columnMetadataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getColumnMetadataFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetColumnMetadataFieldBuilder() : null; } else { columnMetadataBuilder_.addAllMessages(other.columnMetadata_); @@ -6936,8 +6802,8 @@ public Builder mergeFrom(com.google.spanner.v1.ChangeStreamRecord.DataChangeReco mods_ = other.mods_; bitField0_ = (bitField0_ & ~0x00000040); modsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getModsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetModsFieldBuilder() : null; } else { modsBuilder_.addAllMessages(other.mods_); @@ -6993,7 +6859,7 @@ public Builder mergeFrom( case 10: { input.readMessage( - getCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); + internalGetCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -7106,7 +6972,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp commitTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -7286,7 +7152,7 @@ public Builder clearCommitTimestamp() { public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getCommitTimestampFieldBuilder().getBuilder(); + return internalGetCommitTimestampFieldBuilder().getBuilder(); } /** @@ -7327,14 +7193,14 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { * * .google.protobuf.Timestamp commit_timestamp = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCommitTimestampFieldBuilder() { + internalGetCommitTimestampFieldBuilder() { if (commitTimestampBuilder_ == null) { commitTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -7653,8 +7519,8 @@ public Builder setServerTransactionIdBytes(com.google.protobuf.ByteString value) * *
        * Indicates whether this is the last record for a transaction in the
-       *  current partition. Clients can use this field to determine when all
-       *  records for a transaction in the current partition have been received.
+       * current partition. Clients can use this field to determine when all
+       * records for a transaction in the current partition have been received.
        * 
* * bool is_last_record_in_transaction_in_partition = 4; @@ -7671,8 +7537,8 @@ public boolean getIsLastRecordInTransactionInPartition() { * *
        * Indicates whether this is the last record for a transaction in the
-       *  current partition. Clients can use this field to determine when all
-       *  records for a transaction in the current partition have been received.
+       * current partition. Clients can use this field to determine when all
+       * records for a transaction in the current partition have been received.
        * 
* * bool is_last_record_in_transaction_in_partition = 4; @@ -7693,8 +7559,8 @@ public Builder setIsLastRecordInTransactionInPartition(boolean value) { * *
        * Indicates whether this is the last record for a transaction in the
-       *  current partition. Clients can use this field to determine when all
-       *  records for a transaction in the current partition have been received.
+       * current partition. Clients can use this field to determine when all
+       * records for a transaction in the current partition have been received.
        * 
* * bool is_last_record_in_transaction_in_partition = 4; @@ -7833,7 +7699,7 @@ private void ensureColumnMetadataIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder> @@ -8162,7 +8028,7 @@ public Builder removeColumnMetadata(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder getColumnMetadataBuilder(int index) { - return getColumnMetadataFieldBuilder().getBuilder(index); + return internalGetColumnMetadataFieldBuilder().getBuilder(index); } /** @@ -8226,7 +8092,7 @@ public Builder removeColumnMetadata(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder addColumnMetadataBuilder() { - return getColumnMetadataFieldBuilder() + return internalGetColumnMetadataFieldBuilder() .addBuilder( com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata .getDefaultInstance()); @@ -8247,7 +8113,7 @@ public Builder removeColumnMetadata(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder addColumnMetadataBuilder(int index) { - return getColumnMetadataFieldBuilder() + return internalGetColumnMetadataFieldBuilder() .addBuilder( index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata @@ -8270,17 +8136,17 @@ public Builder removeColumnMetadata(int index) { public java.util.List< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder> getColumnMetadataBuilderList() { - return getColumnMetadataFieldBuilder().getBuilderList(); + return internalGetColumnMetadataFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder> - getColumnMetadataFieldBuilder() { + internalGetColumnMetadataFieldBuilder() { if (columnMetadataBuilder_ == null) { columnMetadataBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord @@ -8306,7 +8172,7 @@ private void ensureModsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder> @@ -8574,7 +8440,7 @@ public Builder removeMods(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder getModsBuilder( int index) { - return getModsFieldBuilder().getBuilder(index); + return internalGetModsFieldBuilder().getBuilder(index); } /** @@ -8625,7 +8491,7 @@ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder get */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder addModsBuilder() { - return getModsFieldBuilder() + return internalGetModsFieldBuilder() .addBuilder( com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.getDefaultInstance()); } @@ -8641,7 +8507,7 @@ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder get */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder addModsBuilder( int index) { - return getModsFieldBuilder() + return internalGetModsFieldBuilder() .addBuilder( index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.getDefaultInstance()); @@ -8658,17 +8524,17 @@ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder add */ public java.util.List getModsBuilderList() { - return getModsFieldBuilder().getBuilderList(); + return internalGetModsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder> - getModsFieldBuilder() { + internalGetModsFieldBuilder() { if (modsBuilder_ == null) { modsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder>( @@ -9189,18 +9055,6 @@ public Builder clearIsSystemTransaction() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord) } @@ -9316,32 +9170,36 @@ public interface HeartbeatRecordOrBuilder * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.HeartbeatRecord} */ - public static final class HeartbeatRecord extends com.google.protobuf.GeneratedMessageV3 + public static final class HeartbeatRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) HeartbeatRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartbeatRecord"); + } + // Use HeartbeatRecord.newBuilder() to construct. - private HeartbeatRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private HeartbeatRecord(com.google.protobuf.GeneratedMessage.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.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_fieldAccessorTable @@ -9515,38 +9373,38 @@ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -9570,8 +9428,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -9587,8 +9444,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.HeartbeatRecord} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder { @@ -9598,7 +9454,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_fieldAccessorTable @@ -9612,14 +9468,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTimestampFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTimestampFieldBuilder(); } } @@ -9676,41 +9532,6 @@ private void buildPartial0(com.google.spanner.v1.ChangeStreamRecord.HeartbeatRec 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.v1.ChangeStreamRecord.HeartbeatRecord) { @@ -9755,7 +9576,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -9779,7 +9601,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -9945,7 +9767,7 @@ public Builder clearTimestamp() { public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getTimestampFieldBuilder().getBuilder(); + return internalGetTimestampFieldBuilder().getBuilder(); } /** @@ -9982,14 +9804,14 @@ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { * * .google.protobuf.Timestamp timestamp = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getTimestampFieldBuilder() { + internalGetTimestampFieldBuilder() { if (timestampBuilder_ == null) { timestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -9999,18 +9821,6 @@ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { return timestampBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) } @@ -10223,14 +10033,24 @@ public interface PartitionStartRecordOrBuilder * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionStartRecord} */ - public static final class PartitionStartRecord extends com.google.protobuf.GeneratedMessageV3 + public static final class PartitionStartRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) PartitionStartRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartitionStartRecord"); + } + // Use PartitionStartRecord.newBuilder() to construct. - private PartitionStartRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartitionStartRecord(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -10239,19 +10059,13 @@ private PartitionStartRecord() { partitionTokens_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartitionStartRecord(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_fieldAccessorTable @@ -10478,11 +10292,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getStartTimestamp()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, recordSequence_); } for (int i = 0; i < partitionTokens_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, partitionTokens_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, partitionTokens_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -10496,8 +10310,8 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTimestamp()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, recordSequence_); } { int dataSize = 0; @@ -10592,38 +10406,38 @@ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord pars public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -10647,8 +10461,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -10664,8 +10477,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionStartRecord} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder { @@ -10675,7 +10487,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_fieldAccessorTable @@ -10689,14 +10501,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStartTimestampFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimestampFieldBuilder(); } } @@ -10765,41 +10577,6 @@ private void buildPartial0( 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.v1.ChangeStreamRecord.PartitionStartRecord) { @@ -10862,7 +10639,7 @@ public Builder mergeFrom( case 10: { input.readMessage( - getStartTimestampFieldBuilder().getBuilder(), extensionRegistry); + internalGetStartTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -10899,7 +10676,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp startTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -11086,7 +10863,7 @@ public Builder clearStartTimestamp() { public com.google.protobuf.Timestamp.Builder getStartTimestampBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getStartTimestampFieldBuilder().getBuilder(); + return internalGetStartTimestampFieldBuilder().getBuilder(); } /** @@ -11129,14 +10906,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimestampOrBuilder() { * * .google.protobuf.Timestamp start_timestamp = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimestampFieldBuilder() { + internalGetStartTimestampFieldBuilder() { if (startTimestampBuilder_ == null) { startTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -11460,18 +11237,6 @@ public Builder addPartitionTokensBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) } @@ -11670,14 +11435,24 @@ public interface PartitionEndRecordOrBuilder * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEndRecord} */ - public static final class PartitionEndRecord extends com.google.protobuf.GeneratedMessageV3 + public static final class PartitionEndRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) PartitionEndRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartitionEndRecord"); + } + // Use PartitionEndRecord.newBuilder() to construct. - private PartitionEndRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartitionEndRecord(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -11686,19 +11461,13 @@ private PartitionEndRecord() { partitionToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartitionEndRecord(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_fieldAccessorTable @@ -11921,11 +11690,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getEndTimestamp()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, recordSequence_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, partitionToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partitionToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, partitionToken_); } getUnknownFields().writeTo(output); } @@ -11939,11 +11708,11 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndTimestamp()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, recordSequence_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, partitionToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partitionToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, partitionToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -12028,38 +11797,38 @@ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseF public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -12083,8 +11852,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -12100,8 +11868,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEndRecord} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder { @@ -12111,7 +11878,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_fieldAccessorTable @@ -12125,14 +11892,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEndTimestampFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEndTimestampFieldBuilder(); } } @@ -12200,41 +11967,6 @@ private void buildPartial0( 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.v1.ChangeStreamRecord.PartitionEndRecord) { @@ -12290,7 +12022,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getEndTimestampFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetEndTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -12326,7 +12059,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp endTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -12520,7 +12253,7 @@ public Builder clearEndTimestamp() { public com.google.protobuf.Timestamp.Builder getEndTimestampBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getEndTimestampFieldBuilder().getBuilder(); + return internalGetEndTimestampFieldBuilder().getBuilder(); } /** @@ -12565,14 +12298,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimestampOrBuilder() { * * .google.protobuf.Timestamp end_timestamp = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimestampFieldBuilder() { + internalGetEndTimestampFieldBuilder() { if (endTimestampBuilder_ == null) { endTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -12844,18 +12577,6 @@ public Builder setPartitionTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) } @@ -13048,34 +12769,34 @@ public interface PartitionEventRecordOrBuilder * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -13100,34 +12821,34 @@ public interface PartitionEventRecordOrBuilder * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -13152,34 +12873,34 @@ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent getMov * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -13203,34 +12924,34 @@ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent getMov * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -13257,34 +12978,34 @@ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent getMov * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -13309,34 +13030,34 @@ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent getMov * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -13361,34 +13082,34 @@ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent getMov * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" * } - * + * move_out_events { + * destination_partition_token: "P3" + * } + * } + * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -13413,34 +13134,34 @@ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent getMo * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -13464,34 +13185,34 @@ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent getMo * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -13518,34 +13239,34 @@ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent getMo * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -13581,14 +13302,24 @@ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent getMo * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord} */ - public static final class PartitionEventRecord extends com.google.protobuf.GeneratedMessageV3 + public static final class PartitionEventRecord extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) PartitionEventRecordOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartitionEventRecord"); + } + // Use PartitionEventRecord.newBuilder() to construct. - private PartitionEventRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartitionEventRecord(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -13599,19 +13330,13 @@ private PartitionEventRecord() { moveOutEvents_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartitionEventRecord(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_fieldAccessorTable @@ -13675,14 +13400,24 @@ public interface MoveInEventOrBuilder * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent} */ - public static final class MoveInEvent extends com.google.protobuf.GeneratedMessageV3 + public static final class MoveInEvent extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent) MoveInEventOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MoveInEvent"); + } + // Use MoveInEvent.newBuilder() to construct. - private MoveInEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MoveInEvent(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -13690,19 +13425,13 @@ private MoveInEvent() { sourcePartitionToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MoveInEvent(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_fieldAccessorTable @@ -13783,8 +13512,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePartitionToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourcePartitionToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourcePartitionToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, sourcePartitionToken_); } getUnknownFields().writeTo(output); } @@ -13795,9 +13524,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePartitionToken_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourcePartitionToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourcePartitionToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sourcePartitionToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -13875,7 +13603,7 @@ public int hashCode() { public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent @@ -13883,13 +13611,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent @@ -13897,13 +13625,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent @@ -13911,7 +13639,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -13936,7 +13664,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -13961,7 +13689,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent) com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder { @@ -13971,7 +13699,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_fieldAccessorTable @@ -13985,7 +13713,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -14040,41 +13768,6 @@ private void buildPartial0( } } - @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 @@ -14270,18 +13963,6 @@ public Builder setSourcePartitionTokenBytes(com.google.protobuf.ByteString value return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent) } @@ -14394,14 +14075,24 @@ public interface MoveOutEventOrBuilder * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent} */ - public static final class MoveOutEvent extends com.google.protobuf.GeneratedMessageV3 + public static final class MoveOutEvent extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent) MoveOutEventOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MoveOutEvent"); + } + // Use MoveOutEvent.newBuilder() to construct. - private MoveOutEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MoveOutEvent(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -14409,19 +14100,13 @@ private MoveOutEvent() { destinationPartitionToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MoveOutEvent(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_fieldAccessorTable @@ -14502,8 +14187,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPartitionToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destinationPartitionToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destinationPartitionToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, destinationPartitionToken_); } getUnknownFields().writeTo(output); } @@ -14514,10 +14199,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPartitionToken_)) { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destinationPartitionToken_)) { size += - com.google.protobuf.GeneratedMessageV3.computeStringSize( - 1, destinationPartitionToken_); + com.google.protobuf.GeneratedMessage.computeStringSize(1, destinationPartitionToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -14597,7 +14281,7 @@ public int hashCode() { public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent @@ -14605,13 +14289,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent @@ -14619,13 +14303,13 @@ public int hashCode() { java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent @@ -14633,7 +14317,7 @@ public int hashCode() { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -14658,7 +14342,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -14685,7 +14369,7 @@ protected Builder newBuilderForType( * google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent) com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder { @@ -14695,7 +14379,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_fieldAccessorTable @@ -14709,7 +14393,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -14764,41 +14448,6 @@ private void buildPartial0( } } - @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 @@ -14994,18 +14643,6 @@ public Builder setDestinationPartitionTokenBytes(com.google.protobuf.ByteString return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent) } @@ -15275,34 +14912,34 @@ public com.google.protobuf.ByteString getPartitionTokenBytes() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -15330,34 +14967,34 @@ public com.google.protobuf.ByteString getPartitionTokenBytes() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -15387,34 +15024,34 @@ public com.google.protobuf.ByteString getPartitionTokenBytes() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -15441,34 +15078,34 @@ public int getMoveInEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -15496,34 +15133,34 @@ public int getMoveInEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -15558,34 +15195,34 @@ public int getMoveInEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -15614,34 +15251,34 @@ public int getMoveInEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -15671,34 +15308,34 @@ public int getMoveInEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -15725,34 +15362,34 @@ public int getMoveOutEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -15780,34 +15417,34 @@ public int getMoveOutEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -15838,11 +15475,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getCommitTimestamp()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, recordSequence_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, partitionToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partitionToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, partitionToken_); } for (int i = 0; i < moveInEvents_.size(); i++) { output.writeMessage(4, moveInEvents_.get(i)); @@ -15862,11 +15499,11 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommitTimestamp()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(recordSequence_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, recordSequence_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, partitionToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(partitionToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, partitionToken_); } for (int i = 0; i < moveInEvents_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, moveInEvents_.get(i)); @@ -15967,38 +15604,38 @@ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord pars public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -16022,8 +15659,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -16052,8 +15688,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder { @@ -16063,7 +15698,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_fieldAccessorTable @@ -16077,16 +15712,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCommitTimestampFieldBuilder(); - getMoveInEventsFieldBuilder(); - getMoveOutEventsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCommitTimestampFieldBuilder(); + internalGetMoveInEventsFieldBuilder(); + internalGetMoveOutEventsFieldBuilder(); } } @@ -16191,41 +15826,6 @@ private void buildPartial0( 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.v1.ChangeStreamRecord.PartitionEventRecord) { @@ -16273,8 +15873,8 @@ public Builder mergeFrom( moveInEvents_ = other.moveInEvents_; bitField0_ = (bitField0_ & ~0x00000008); moveInEventsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMoveInEventsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMoveInEventsFieldBuilder() : null; } else { moveInEventsBuilder_.addAllMessages(other.moveInEvents_); @@ -16300,8 +15900,8 @@ public Builder mergeFrom( moveOutEvents_ = other.moveOutEvents_; bitField0_ = (bitField0_ & ~0x00000010); moveOutEventsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMoveOutEventsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMoveOutEventsFieldBuilder() : null; } else { moveOutEventsBuilder_.addAllMessages(other.moveOutEvents_); @@ -16337,7 +15937,7 @@ public Builder mergeFrom( case 10: { input.readMessage( - getCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); + internalGetCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -16403,7 +16003,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp commitTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -16583,7 +16183,7 @@ public Builder clearCommitTimestamp() { public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getCommitTimestampFieldBuilder().getBuilder(); + return internalGetCommitTimestampFieldBuilder().getBuilder(); } /** @@ -16624,14 +16224,14 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { * * .google.protobuf.Timestamp commit_timestamp = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCommitTimestampFieldBuilder() { + internalGetCommitTimestampFieldBuilder() { if (commitTimestampBuilder_ == null) { commitTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -16917,7 +16517,7 @@ private void ensureMoveInEventsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder> @@ -16937,34 +16537,34 @@ private void ensureMoveInEventsIsMutable() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -16996,34 +16596,34 @@ private void ensureMoveInEventsIsMutable() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17053,34 +16653,34 @@ public int getMoveInEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17111,34 +16711,34 @@ public int getMoveInEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17176,34 +16776,34 @@ public Builder setMoveInEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17239,34 +16839,34 @@ public Builder setMoveInEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17303,34 +16903,34 @@ public Builder addMoveInEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17368,34 +16968,34 @@ public Builder addMoveInEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17430,34 +17030,34 @@ public Builder addMoveInEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17493,34 +17093,34 @@ public Builder addMoveInEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17557,34 +17157,34 @@ public Builder addAllMoveInEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17617,34 +17217,34 @@ public Builder clearMoveInEvents() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17677,34 +17277,34 @@ public Builder removeMoveInEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17714,7 +17314,7 @@ public Builder removeMoveInEvents(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder getMoveInEventsBuilder(int index) { - return getMoveInEventsFieldBuilder().getBuilder(index); + return internalGetMoveInEventsFieldBuilder().getBuilder(index); } /** @@ -17731,34 +17331,34 @@ public Builder removeMoveInEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17789,34 +17389,34 @@ public Builder removeMoveInEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17850,34 +17450,34 @@ public Builder removeMoveInEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17887,7 +17487,7 @@ public Builder removeMoveInEvents(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder addMoveInEventsBuilder() { - return getMoveInEventsFieldBuilder() + return internalGetMoveInEventsFieldBuilder() .addBuilder( com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent .getDefaultInstance()); @@ -17907,34 +17507,34 @@ public Builder removeMoveInEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -17944,7 +17544,7 @@ public Builder removeMoveInEvents(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder addMoveInEventsBuilder(int index) { - return getMoveInEventsFieldBuilder() + return internalGetMoveInEventsFieldBuilder() .addBuilder( index, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent @@ -17965,34 +17565,34 @@ public Builder removeMoveInEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_in_events { - * source_partition_token: "P2" - * } - * move_in_events { - * source_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_in_events { + * source_partition_token: "P2" + * } + * move_in_events { + * source_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_out_events { - * destination_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_out_events { + * destination_partition_token: "P1" + * } * } * * @@ -18003,17 +17603,17 @@ public Builder removeMoveInEvents(int index) { public java.util.List< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder> getMoveInEventsBuilderList() { - return getMoveInEventsFieldBuilder().getBuilderList(); + return internalGetMoveInEventsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder> - getMoveInEventsFieldBuilder() { + internalGetMoveInEventsFieldBuilder() { if (moveInEventsBuilder_ == null) { moveInEventsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord @@ -18041,7 +17641,7 @@ private void ensureMoveOutEventsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder> @@ -18061,34 +17661,34 @@ private void ensureMoveOutEventsIsMutable() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18120,34 +17720,34 @@ private void ensureMoveOutEventsIsMutable() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18177,34 +17777,34 @@ public int getMoveOutEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18235,34 +17835,34 @@ public int getMoveOutEventsCount() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18300,34 +17900,34 @@ public Builder setMoveOutEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18363,34 +17963,34 @@ public Builder setMoveOutEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18427,34 +18027,34 @@ public Builder addMoveOutEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18492,34 +18092,34 @@ public Builder addMoveOutEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18554,34 +18154,34 @@ public Builder addMoveOutEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18617,34 +18217,34 @@ public Builder addMoveOutEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18681,34 +18281,34 @@ public Builder addAllMoveOutEvents( * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18741,34 +18341,34 @@ public Builder clearMoveOutEvents() { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18801,34 +18401,34 @@ public Builder removeMoveOutEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18838,7 +18438,7 @@ public Builder removeMoveOutEvents(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder getMoveOutEventsBuilder(int index) { - return getMoveOutEventsFieldBuilder().getBuilder(index); + return internalGetMoveOutEventsFieldBuilder().getBuilder(index); } /** @@ -18855,34 +18455,34 @@ public Builder removeMoveOutEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18913,34 +18513,34 @@ public Builder removeMoveOutEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -18974,34 +18574,34 @@ public Builder removeMoveOutEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -19011,7 +18611,7 @@ public Builder removeMoveOutEvents(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder addMoveOutEventsBuilder() { - return getMoveOutEventsFieldBuilder() + return internalGetMoveOutEventsFieldBuilder() .addBuilder( com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent .getDefaultInstance()); @@ -19031,34 +18631,34 @@ public Builder removeMoveOutEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -19068,7 +18668,7 @@ public Builder removeMoveOutEvents(int index) { */ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder addMoveOutEventsBuilder(int index) { - return getMoveOutEventsFieldBuilder() + return internalGetMoveOutEventsFieldBuilder() .addBuilder( index, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent @@ -19089,34 +18689,34 @@ public Builder removeMoveOutEvents(int index) { * The PartitionEventRecord returned in P1 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P1" - * move_out_events { - * destination_partition_token: "P2" - * } - * move_out_events { - * destination_partition_token: "P3" - * } + * commit_timestamp: T + * partition_token: "P1" + * move_out_events { + * destination_partition_token: "P2" + * } + * move_out_events { + * destination_partition_token: "P3" + * } * } * * The PartitionEventRecord returned in P2 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P2" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P2" + * move_in_events { + * source_partition_token: "P1" + * } * } * * The PartitionEventRecord returned in P3 will reflect the move as: * * PartitionEventRecord { - * commit_timestamp: T - * partition_token: "P3" - * move_in_events { - * source_partition_token: "P1" - * } + * commit_timestamp: T + * partition_token: "P3" + * move_in_events { + * source_partition_token: "P1" + * } * } * * @@ -19127,17 +18727,17 @@ public Builder removeMoveOutEvents(int index) { public java.util.List< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder> getMoveOutEventsBuilderList() { - return getMoveOutEventsFieldBuilder().getBuilderList(); + return internalGetMoveOutEventsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder> - getMoveOutEventsFieldBuilder() { + internalGetMoveOutEventsFieldBuilder() { if (moveOutEventsBuilder_ == null) { moveOutEventsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent .Builder, @@ -19152,18 +18752,6 @@ public Builder removeMoveOutEvents(int index) { return moveOutEventsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) } @@ -19742,38 +19330,38 @@ public static com.google.spanner.v1.ChangeStreamRecord parseFrom( public static com.google.spanner.v1.ChangeStreamRecord parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ChangeStreamRecord parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ChangeStreamRecord parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -19796,7 +19384,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -19821,7 +19409,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.ChangeStreamRecord} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ChangeStreamRecord) com.google.spanner.v1.ChangeStreamRecordOrBuilder { @@ -19831,7 +19419,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ChangeStreamProto .internal_static_google_spanner_v1_ChangeStreamRecord_fieldAccessorTable @@ -19843,7 +19431,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.ChangeStreamRecord.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -19927,39 +19515,6 @@ private void buildPartialOneofs(com.google.spanner.v1.ChangeStreamRecord result) } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.ChangeStreamRecord) { @@ -20032,34 +19587,35 @@ public Builder mergeFrom( case 10: { input.readMessage( - getDataChangeRecordFieldBuilder().getBuilder(), extensionRegistry); + internalGetDataChangeRecordFieldBuilder().getBuilder(), extensionRegistry); recordCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getHeartbeatRecordFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetHeartbeatRecordFieldBuilder().getBuilder(), extensionRegistry); recordCase_ = 2; break; } // case 18 case 26: { input.readMessage( - getPartitionStartRecordFieldBuilder().getBuilder(), extensionRegistry); + internalGetPartitionStartRecordFieldBuilder().getBuilder(), extensionRegistry); recordCase_ = 3; break; } // case 26 case 34: { input.readMessage( - getPartitionEndRecordFieldBuilder().getBuilder(), extensionRegistry); + internalGetPartitionEndRecordFieldBuilder().getBuilder(), extensionRegistry); recordCase_ = 4; break; } // case 34 case 42: { input.readMessage( - getPartitionEventRecordFieldBuilder().getBuilder(), extensionRegistry); + internalGetPartitionEventRecordFieldBuilder().getBuilder(), extensionRegistry); recordCase_ = 5; break; } // case 42 @@ -20096,7 +19652,7 @@ public Builder clearRecord() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecordOrBuilder> @@ -20268,7 +19824,7 @@ public Builder clearDataChangeRecord() { */ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Builder getDataChangeRecordBuilder() { - return getDataChangeRecordFieldBuilder().getBuilder(); + return internalGetDataChangeRecordFieldBuilder().getBuilder(); } /** @@ -20304,17 +19860,17 @@ public Builder clearDataChangeRecord() { * * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecordOrBuilder> - getDataChangeRecordFieldBuilder() { + internalGetDataChangeRecordFieldBuilder() { if (dataChangeRecordBuilder_ == null) { if (!(recordCase_ == 1)) { record_ = com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDefaultInstance(); } dataChangeRecordBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecordOrBuilder>( @@ -20328,7 +19884,7 @@ public Builder clearDataChangeRecord() { return dataChangeRecordBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord, com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder> @@ -20493,7 +20049,7 @@ public Builder clearHeartbeatRecord() { */ public com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder getHeartbeatRecordBuilder() { - return getHeartbeatRecordFieldBuilder().getBuilder(); + return internalGetHeartbeatRecordFieldBuilder().getBuilder(); } /** @@ -20527,17 +20083,17 @@ public Builder clearHeartbeatRecord() { * * .google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord, com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder> - getHeartbeatRecordFieldBuilder() { + internalGetHeartbeatRecordFieldBuilder() { if (heartbeatRecordBuilder_ == null) { if (!(recordCase_ == 2)) { record_ = com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.getDefaultInstance(); } heartbeatRecordBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord, com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder>( @@ -20551,7 +20107,7 @@ public Builder clearHeartbeatRecord() { return heartbeatRecordBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord, com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder> @@ -20724,7 +20280,7 @@ public Builder clearPartitionStartRecord() { */ public com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder getPartitionStartRecordBuilder() { - return getPartitionStartRecordFieldBuilder().getBuilder(); + return internalGetPartitionStartRecordFieldBuilder().getBuilder(); } /** @@ -20760,18 +20316,18 @@ public Builder clearPartitionStartRecord() { * .google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord, com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder> - getPartitionStartRecordFieldBuilder() { + internalGetPartitionStartRecordFieldBuilder() { if (partitionStartRecordBuilder_ == null) { if (!(recordCase_ == 3)) { record_ = com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.getDefaultInstance(); } partitionStartRecordBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord, com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder>( @@ -20785,7 +20341,7 @@ public Builder clearPartitionStartRecord() { return partitionStartRecordBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord, com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder> @@ -20958,7 +20514,7 @@ public Builder clearPartitionEndRecord() { */ public com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder getPartitionEndRecordBuilder() { - return getPartitionEndRecordFieldBuilder().getBuilder(); + return internalGetPartitionEndRecordFieldBuilder().getBuilder(); } /** @@ -20994,18 +20550,18 @@ public Builder clearPartitionEndRecord() { * .google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord, com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder> - getPartitionEndRecordFieldBuilder() { + internalGetPartitionEndRecordFieldBuilder() { if (partitionEndRecordBuilder_ == null) { if (!(recordCase_ == 4)) { record_ = com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.getDefaultInstance(); } partitionEndRecordBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord, com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder>( @@ -21019,7 +20575,7 @@ public Builder clearPartitionEndRecord() { return partitionEndRecordBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder> @@ -21199,7 +20755,7 @@ public Builder clearPartitionEventRecord() { */ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder getPartitionEventRecordBuilder() { - return getPartitionEventRecordFieldBuilder().getBuilder(); + return internalGetPartitionEventRecordFieldBuilder().getBuilder(); } /** @@ -21237,18 +20793,18 @@ public Builder clearPartitionEventRecord() { * .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder> - getPartitionEventRecordFieldBuilder() { + internalGetPartitionEventRecordFieldBuilder() { if (partitionEventRecordBuilder_ == null) { if (!(recordCase_ == 5)) { record_ = com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.getDefaultInstance(); } partitionEventRecordBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder, com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder>( @@ -21262,17 +20818,6 @@ public Builder clearPartitionEventRecord() { return partitionEventRecordBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecordOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecordOrBuilder.java index f98c16cad35..7b72f8a5d94 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecordOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecordOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/change_stream.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ChangeStreamRecordOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ChangeStreamRecord) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java index 297c7a8e283..5fc62e537c6 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.CommitRequest} */ -public final class CommitRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CommitRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.CommitRequest) CommitRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CommitRequest"); + } + // Use CommitRequest.newBuilder() to construct. - private CommitRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CommitRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private CommitRequest() { mutations_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CommitRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_CommitRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_CommitRequest_fieldAccessorTable @@ -585,6 +591,80 @@ public com.google.spanner.v1.MultiplexedSessionPrecommitToken getPrecommitToken( : precommitToken_; } + public static final int ROUTING_HINT_FIELD_NUMBER = 10; + private com.google.spanner.v1.RoutingHint routingHint_; + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + @java.lang.Override + public boolean hasRoutingHint() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHint getRoutingHint() { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder() { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -599,8 +679,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); } if (transactionCase_ == 2) { output.writeBytes(2, (com.google.protobuf.ByteString) transaction_); @@ -623,6 +703,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(9, getPrecommitToken()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getRoutingHint()); + } getUnknownFields().writeTo(output); } @@ -632,8 +715,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); } if (transactionCase_ == 2) { size += @@ -660,6 +743,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getPrecommitToken()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getRoutingHint()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -690,6 +776,10 @@ public boolean equals(final java.lang.Object obj) { if (hasPrecommitToken()) { if (!getPrecommitToken().equals(other.getPrecommitToken())) return false; } + if (hasRoutingHint() != other.hasRoutingHint()) return false; + if (hasRoutingHint()) { + if (!getRoutingHint().equals(other.getRoutingHint())) return false; + } if (!getTransactionCase().equals(other.getTransactionCase())) return false; switch (transactionCase_) { case 2: @@ -732,6 +822,10 @@ public int hashCode() { hash = (37 * hash) + PRECOMMIT_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPrecommitToken().hashCode(); } + if (hasRoutingHint()) { + hash = (37 * hash) + ROUTING_HINT_FIELD_NUMBER; + hash = (53 * hash) + getRoutingHint().hashCode(); + } switch (transactionCase_) { case 2: hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; @@ -785,38 +879,38 @@ public static com.google.spanner.v1.CommitRequest parseFrom( public static com.google.spanner.v1.CommitRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.CommitRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.CommitRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.CommitRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.CommitRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.CommitRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -839,7 +933,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -853,7 +947,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.CommitRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.CommitRequest) com.google.spanner.v1.CommitRequestOrBuilder { @@ -863,7 +957,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_CommitRequest_fieldAccessorTable @@ -877,17 +971,18 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMutationsFieldBuilder(); - getMaxCommitDelayFieldBuilder(); - getRequestOptionsFieldBuilder(); - getPrecommitTokenFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMutationsFieldBuilder(); + internalGetMaxCommitDelayFieldBuilder(); + internalGetRequestOptionsFieldBuilder(); + internalGetPrecommitTokenFieldBuilder(); + internalGetRoutingHintFieldBuilder(); } } @@ -922,6 +1017,11 @@ public Builder clear() { precommitTokenBuilder_.dispose(); precommitTokenBuilder_ = null; } + routingHint_ = null; + if (routingHintBuilder_ != null) { + routingHintBuilder_.dispose(); + routingHintBuilder_ = null; + } transactionCase_ = 0; transaction_ = null; return this; @@ -995,6 +1095,11 @@ private void buildPartial0(com.google.spanner.v1.CommitRequest result) { precommitTokenBuilder_ == null ? precommitToken_ : precommitTokenBuilder_.build(); to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.routingHint_ = + routingHintBuilder_ == null ? routingHint_ : routingHintBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -1006,39 +1111,6 @@ private void buildPartialOneofs(com.google.spanner.v1.CommitRequest result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.CommitRequest) { @@ -1075,8 +1147,8 @@ public Builder mergeFrom(com.google.spanner.v1.CommitRequest other) { mutations_ = other.mutations_; bitField0_ = (bitField0_ & ~0x00000008); mutationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMutationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMutationsFieldBuilder() : null; } else { mutationsBuilder_.addAllMessages(other.mutations_); @@ -1095,6 +1167,9 @@ public Builder mergeFrom(com.google.spanner.v1.CommitRequest other) { if (other.hasPrecommitToken()) { mergePrecommitToken(other.getPrecommitToken()); } + if (other.hasRoutingHint()) { + mergeRoutingHint(other.getRoutingHint()); + } switch (other.getTransactionCase()) { case TRANSACTION_ID: { @@ -1152,7 +1227,7 @@ public Builder mergeFrom( case 26: { input.readMessage( - getSingleUseTransactionFieldBuilder().getBuilder(), extensionRegistry); + internalGetSingleUseTransactionFieldBuilder().getBuilder(), extensionRegistry); transactionCase_ = 3; break; } // case 26 @@ -1176,22 +1251,32 @@ public Builder mergeFrom( } // case 40 case 50: { - input.readMessage(getRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 50 case 66: { - input.readMessage(getMaxCommitDelayFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMaxCommitDelayFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 66 case 74: { - input.readMessage(getPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 74 + case 82: + { + input.readMessage( + internalGetRoutingHintFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1421,7 +1506,7 @@ public Builder clearTransactionId() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder> @@ -1638,7 +1723,7 @@ public Builder clearSingleUseTransaction() { * .google.spanner.v1.TransactionOptions single_use_transaction = 3; */ public com.google.spanner.v1.TransactionOptions.Builder getSingleUseTransactionBuilder() { - return getSingleUseTransactionFieldBuilder().getBuilder(); + return internalGetSingleUseTransactionFieldBuilder().getBuilder(); } /** @@ -1687,17 +1772,17 @@ public com.google.spanner.v1.TransactionOptionsOrBuilder getSingleUseTransaction * * .google.spanner.v1.TransactionOptions single_use_transaction = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder> - getSingleUseTransactionFieldBuilder() { + internalGetSingleUseTransactionFieldBuilder() { if (singleUseTransactionBuilder_ == null) { if (!(transactionCase_ == 3)) { transaction_ = com.google.spanner.v1.TransactionOptions.getDefaultInstance(); } singleUseTransactionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder>( @@ -1721,7 +1806,7 @@ private void ensureMutationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Mutation, com.google.spanner.v1.Mutation.Builder, com.google.spanner.v1.MutationOrBuilder> @@ -2004,7 +2089,7 @@ public Builder removeMutations(int index) { * repeated .google.spanner.v1.Mutation mutations = 4; */ public com.google.spanner.v1.Mutation.Builder getMutationsBuilder(int index) { - return getMutationsFieldBuilder().getBuilder(index); + return internalGetMutationsFieldBuilder().getBuilder(index); } /** @@ -2058,7 +2143,7 @@ public com.google.spanner.v1.MutationOrBuilder getMutationsOrBuilder(int index) * repeated .google.spanner.v1.Mutation mutations = 4; */ public com.google.spanner.v1.Mutation.Builder addMutationsBuilder() { - return getMutationsFieldBuilder() + return internalGetMutationsFieldBuilder() .addBuilder(com.google.spanner.v1.Mutation.getDefaultInstance()); } @@ -2074,7 +2159,7 @@ public com.google.spanner.v1.Mutation.Builder addMutationsBuilder() { * repeated .google.spanner.v1.Mutation mutations = 4; */ public com.google.spanner.v1.Mutation.Builder addMutationsBuilder(int index) { - return getMutationsFieldBuilder() + return internalGetMutationsFieldBuilder() .addBuilder(index, com.google.spanner.v1.Mutation.getDefaultInstance()); } @@ -2090,17 +2175,17 @@ public com.google.spanner.v1.Mutation.Builder addMutationsBuilder(int index) { * repeated .google.spanner.v1.Mutation mutations = 4; */ public java.util.List getMutationsBuilderList() { - return getMutationsFieldBuilder().getBuilderList(); + return internalGetMutationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Mutation, com.google.spanner.v1.Mutation.Builder, com.google.spanner.v1.MutationOrBuilder> - getMutationsFieldBuilder() { + internalGetMutationsFieldBuilder() { if (mutationsBuilder_ == null) { mutationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Mutation, com.google.spanner.v1.Mutation.Builder, com.google.spanner.v1.MutationOrBuilder>( @@ -2173,7 +2258,7 @@ public Builder clearReturnCommitStats() { } private com.google.protobuf.Duration maxCommitDelay_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> @@ -2360,7 +2445,7 @@ public Builder clearMaxCommitDelay() { public com.google.protobuf.Duration.Builder getMaxCommitDelayBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getMaxCommitDelayFieldBuilder().getBuilder(); + return internalGetMaxCommitDelayFieldBuilder().getBuilder(); } /** @@ -2403,14 +2488,14 @@ public com.google.protobuf.DurationOrBuilder getMaxCommitDelayOrBuilder() { * .google.protobuf.Duration max_commit_delay = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getMaxCommitDelayFieldBuilder() { + internalGetMaxCommitDelayFieldBuilder() { if (maxCommitDelayBuilder_ == null) { maxCommitDelayBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -2421,7 +2506,7 @@ public com.google.protobuf.DurationOrBuilder getMaxCommitDelayOrBuilder() { } private com.google.spanner.v1.RequestOptions requestOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> @@ -2566,7 +2651,7 @@ public Builder clearRequestOptions() { public com.google.spanner.v1.RequestOptions.Builder getRequestOptionsBuilder() { bitField0_ |= 0x00000040; onChanged(); - return getRequestOptionsFieldBuilder().getBuilder(); + return internalGetRequestOptionsFieldBuilder().getBuilder(); } /** @@ -2597,14 +2682,14 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( * * .google.spanner.v1.RequestOptions request_options = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> - getRequestOptionsFieldBuilder() { + internalGetRequestOptionsFieldBuilder() { if (requestOptionsBuilder_ == null) { requestOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder>( @@ -2615,7 +2700,7 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( } private com.google.spanner.v1.MultiplexedSessionPrecommitToken precommitToken_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> @@ -2799,7 +2884,7 @@ public Builder clearPrecommitToken() { getPrecommitTokenBuilder() { bitField0_ |= 0x00000080; onChanged(); - return getPrecommitTokenFieldBuilder().getBuilder(); + return internalGetPrecommitTokenFieldBuilder().getBuilder(); } /** @@ -2841,14 +2926,14 @@ public Builder clearPrecommitToken() { * .google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 9 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> - getPrecommitTokenFieldBuilder() { + internalGetPrecommitTokenFieldBuilder() { if (precommitTokenBuilder_ == null) { precommitTokenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder>( @@ -2858,15 +2943,261 @@ public Builder clearPrecommitToken() { return precommitTokenBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.RoutingHint routingHint_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder> + routingHintBuilder_; + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + public boolean hasRoutingHint() { + return ((bitField0_ & 0x00000100) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + public com.google.spanner.v1.RoutingHint getRoutingHint() { + if (routingHintBuilder_ == null) { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } else { + return routingHintBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRoutingHint(com.google.spanner.v1.RoutingHint value) { + if (routingHintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + routingHint_ = value; + } else { + routingHintBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRoutingHint(com.google.spanner.v1.RoutingHint.Builder builderForValue) { + if (routingHintBuilder_ == null) { + routingHint_ = builderForValue.build(); + } else { + routingHintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRoutingHint(com.google.spanner.v1.RoutingHint value) { + if (routingHintBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && routingHint_ != null + && routingHint_ != com.google.spanner.v1.RoutingHint.getDefaultInstance()) { + getRoutingHintBuilder().mergeFrom(value); + } else { + routingHint_ = value; + } + } else { + routingHintBuilder_.mergeFrom(value); + } + if (routingHint_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRoutingHint() { + bitField0_ = (bitField0_ & ~0x00000100); + routingHint_ = null; + if (routingHintBuilder_ != null) { + routingHintBuilder_.dispose(); + routingHintBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RoutingHint.Builder getRoutingHintBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetRoutingHintFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder() { + if (routingHintBuilder_ != null) { + return routingHintBuilder_.getMessageOrBuilder(); + } else { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder> + internalGetRoutingHintFieldBuilder() { + if (routingHintBuilder_ == null) { + routingHintBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder>( + getRoutingHint(), getParentForChildren(), isClean()); + routingHint_ = null; + } + return routingHintBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.CommitRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java index bde61cc6bc6..e38948d301f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface CommitRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.CommitRequest) @@ -362,5 +364,63 @@ public interface CommitRequestOrBuilder */ com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder getPrecommitTokenOrBuilder(); + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + boolean hasRoutingHint(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + com.google.spanner.v1.RoutingHint getRoutingHint(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder(); + com.google.spanner.v1.CommitRequest.TransactionCase getTransactionCase(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java index 7c804c12c31..6819b485f96 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/commit_response.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.v1.CommitResponse} */ -public final class CommitResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CommitResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.CommitResponse) CommitResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CommitResponse"); + } + // Use CommitResponse.newBuilder() to construct. - private CommitResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CommitResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CommitResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CommitResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.CommitResponseProto .internal_static_google_spanner_v1_CommitResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.CommitResponseProto .internal_static_google_spanner_v1_CommitResponse_fieldAccessorTable @@ -96,32 +102,36 @@ public interface CommitStatsOrBuilder * * Protobuf type {@code google.spanner.v1.CommitResponse.CommitStats} */ - public static final class CommitStats extends com.google.protobuf.GeneratedMessageV3 + public static final class CommitStats extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.CommitResponse.CommitStats) CommitStatsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CommitStats"); + } + // Use CommitStats.newBuilder() to construct. - private CommitStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CommitStats(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CommitStats() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CommitStats(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.CommitResponseProto .internal_static_google_spanner_v1_CommitResponse_CommitStats_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.CommitResponseProto .internal_static_google_spanner_v1_CommitResponse_CommitStats_fieldAccessorTable @@ -256,38 +266,38 @@ public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.CommitResponse.CommitStats parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.CommitResponse.CommitStats parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.CommitResponse.CommitStats parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -310,8 +320,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -325,8 +334,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.CommitResponse.CommitStats} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.CommitResponse.CommitStats) com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder { @@ -336,7 +344,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.CommitResponseProto .internal_static_google_spanner_v1_CommitResponse_CommitStats_fieldAccessorTable @@ -348,7 +356,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.CommitResponse.CommitStats.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -398,41 +406,6 @@ private void buildPartial0(com.google.spanner.v1.CommitResponse.CommitStats resu } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.CommitResponse.CommitStats) { @@ -574,18 +547,6 @@ public Builder clearMutationCount() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.CommitResponse.CommitStats) } @@ -918,6 +879,80 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimestampOrBuilder() { : snapshotTimestamp_; } + public static final int CACHE_UPDATE_FIELD_NUMBER = 6; + private com.google.spanner.v1.CacheUpdate cacheUpdate_; + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + @java.lang.Override + public boolean hasCacheUpdate() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + @java.lang.Override + public com.google.spanner.v1.CacheUpdate getCacheUpdate() { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder() { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -945,6 +980,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(5, getSnapshotTimestamp()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getCacheUpdate()); + } getUnknownFields().writeTo(output); } @@ -968,6 +1006,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSnapshotTimestamp()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCacheUpdate()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -995,6 +1036,10 @@ public boolean equals(final java.lang.Object obj) { if (hasSnapshotTimestamp()) { if (!getSnapshotTimestamp().equals(other.getSnapshotTimestamp())) return false; } + if (hasCacheUpdate() != other.hasCacheUpdate()) return false; + if (hasCacheUpdate()) { + if (!getCacheUpdate().equals(other.getCacheUpdate())) return false; + } if (!getMultiplexedSessionRetryCase().equals(other.getMultiplexedSessionRetryCase())) return false; switch (multiplexedSessionRetryCase_) { @@ -1027,6 +1072,10 @@ public int hashCode() { hash = (37 * hash) + SNAPSHOT_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getSnapshotTimestamp().hashCode(); } + if (hasCacheUpdate()) { + hash = (37 * hash) + CACHE_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getCacheUpdate().hashCode(); + } switch (multiplexedSessionRetryCase_) { case 4: hash = (37 * hash) + PRECOMMIT_TOKEN_FIELD_NUMBER; @@ -1076,38 +1125,38 @@ public static com.google.spanner.v1.CommitResponse parseFrom( public static com.google.spanner.v1.CommitResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.CommitResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.CommitResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.CommitResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.CommitResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.CommitResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1130,7 +1179,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1144,7 +1193,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.CommitResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.CommitResponse) com.google.spanner.v1.CommitResponseOrBuilder { @@ -1154,7 +1203,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.CommitResponseProto .internal_static_google_spanner_v1_CommitResponse_fieldAccessorTable @@ -1168,16 +1217,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCommitTimestampFieldBuilder(); - getCommitStatsFieldBuilder(); - getSnapshotTimestampFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCommitTimestampFieldBuilder(); + internalGetCommitStatsFieldBuilder(); + internalGetSnapshotTimestampFieldBuilder(); + internalGetCacheUpdateFieldBuilder(); } } @@ -1203,6 +1253,11 @@ public Builder clear() { snapshotTimestampBuilder_.dispose(); snapshotTimestampBuilder_ = null; } + cacheUpdate_ = null; + if (cacheUpdateBuilder_ != null) { + cacheUpdateBuilder_.dispose(); + cacheUpdateBuilder_ = null; + } multiplexedSessionRetryCase_ = 0; multiplexedSessionRetry_ = null; return this; @@ -1259,6 +1314,11 @@ private void buildPartial0(com.google.spanner.v1.CommitResponse result) { : snapshotTimestampBuilder_.build(); to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cacheUpdate_ = + cacheUpdateBuilder_ == null ? cacheUpdate_ : cacheUpdateBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -1270,39 +1330,6 @@ private void buildPartialOneofs(com.google.spanner.v1.CommitResponse result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.CommitResponse) { @@ -1324,6 +1351,9 @@ public Builder mergeFrom(com.google.spanner.v1.CommitResponse other) { if (other.hasSnapshotTimestamp()) { mergeSnapshotTimestamp(other.getSnapshotTimestamp()); } + if (other.hasCacheUpdate()) { + mergeCacheUpdate(other.getCacheUpdate()); + } switch (other.getMultiplexedSessionRetryCase()) { case PRECOMMIT_TOKEN: { @@ -1363,29 +1393,39 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getCommitStatsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCommitStatsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 34: { - input.readMessage(getPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); multiplexedSessionRetryCase_ = 4; break; } // case 34 case 42: { input.readMessage( - getSnapshotTimestampFieldBuilder().getBuilder(), extensionRegistry); + internalGetSnapshotTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 42 + case 50: + { + input.readMessage( + internalGetCacheUpdateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1420,7 +1460,7 @@ public Builder clearMultiplexedSessionRetry() { private int bitField0_; private com.google.protobuf.Timestamp commitTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1565,7 +1605,7 @@ public Builder clearCommitTimestamp() { public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getCommitTimestampFieldBuilder().getBuilder(); + return internalGetCommitTimestampFieldBuilder().getBuilder(); } /** @@ -1596,14 +1636,14 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { * * .google.protobuf.Timestamp commit_timestamp = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCommitTimestampFieldBuilder() { + internalGetCommitTimestampFieldBuilder() { if (commitTimestampBuilder_ == null) { commitTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1614,7 +1654,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { } private com.google.spanner.v1.CommitResponse.CommitStats commitStats_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.CommitResponse.CommitStats, com.google.spanner.v1.CommitResponse.CommitStats.Builder, com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder> @@ -1775,7 +1815,7 @@ public Builder clearCommitStats() { public com.google.spanner.v1.CommitResponse.CommitStats.Builder getCommitStatsBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getCommitStatsFieldBuilder().getBuilder(); + return internalGetCommitStatsFieldBuilder().getBuilder(); } /** @@ -1810,14 +1850,14 @@ public com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder getCommitStatsO * * .google.spanner.v1.CommitResponse.CommitStats commit_stats = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.CommitResponse.CommitStats, com.google.spanner.v1.CommitResponse.CommitStats.Builder, com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder> - getCommitStatsFieldBuilder() { + internalGetCommitStatsFieldBuilder() { if (commitStatsBuilder_ == null) { commitStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.CommitResponse.CommitStats, com.google.spanner.v1.CommitResponse.CommitStats.Builder, com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder>( @@ -1827,7 +1867,7 @@ public com.google.spanner.v1.CommitResponse.CommitStatsOrBuilder getCommitStatsO return commitStatsBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> @@ -1999,7 +2039,7 @@ public Builder clearPrecommitToken() { */ public com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder getPrecommitTokenBuilder() { - return getPrecommitTokenFieldBuilder().getBuilder(); + return internalGetPrecommitTokenFieldBuilder().getBuilder(); } /** @@ -2035,18 +2075,18 @@ public Builder clearPrecommitToken() { * * .google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> - getPrecommitTokenFieldBuilder() { + internalGetPrecommitTokenFieldBuilder() { if (precommitTokenBuilder_ == null) { if (!(multiplexedSessionRetryCase_ == 4)) { multiplexedSessionRetry_ = com.google.spanner.v1.MultiplexedSessionPrecommitToken.getDefaultInstance(); } precommitTokenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder>( @@ -2061,7 +2101,7 @@ public Builder clearPrecommitToken() { } private com.google.protobuf.Timestamp snapshotTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -2227,7 +2267,7 @@ public Builder clearSnapshotTimestamp() { public com.google.protobuf.Timestamp.Builder getSnapshotTimestampBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getSnapshotTimestampFieldBuilder().getBuilder(); + return internalGetSnapshotTimestampFieldBuilder().getBuilder(); } /** @@ -2264,14 +2304,14 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimestampOrBuilder() { * * .google.protobuf.Timestamp snapshot_timestamp = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getSnapshotTimestampFieldBuilder() { + internalGetSnapshotTimestampFieldBuilder() { if (snapshotTimestampBuilder_ == null) { snapshotTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2281,15 +2321,261 @@ public com.google.protobuf.TimestampOrBuilder getSnapshotTimestampOrBuilder() { return snapshotTimestampBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.CacheUpdate cacheUpdate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder> + cacheUpdateBuilder_; + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + public boolean hasCacheUpdate() { + return ((bitField0_ & 0x00000010) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + public com.google.spanner.v1.CacheUpdate getCacheUpdate() { + if (cacheUpdateBuilder_ == null) { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } else { + return cacheUpdateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCacheUpdate(com.google.spanner.v1.CacheUpdate value) { + if (cacheUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cacheUpdate_ = value; + } else { + cacheUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCacheUpdate(com.google.spanner.v1.CacheUpdate.Builder builderForValue) { + if (cacheUpdateBuilder_ == null) { + cacheUpdate_ = builderForValue.build(); + } else { + cacheUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCacheUpdate(com.google.spanner.v1.CacheUpdate value) { + if (cacheUpdateBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && cacheUpdate_ != null + && cacheUpdate_ != com.google.spanner.v1.CacheUpdate.getDefaultInstance()) { + getCacheUpdateBuilder().mergeFrom(value); + } else { + cacheUpdate_ = value; + } + } else { + cacheUpdateBuilder_.mergeFrom(value); + } + if (cacheUpdate_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCacheUpdate() { + bitField0_ = (bitField0_ & ~0x00000010); + cacheUpdate_ = null; + if (cacheUpdateBuilder_ != null) { + cacheUpdateBuilder_.dispose(); + cacheUpdateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.CacheUpdate.Builder getCacheUpdateBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetCacheUpdateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder() { + if (cacheUpdateBuilder_ != null) { + return cacheUpdateBuilder_.getMessageOrBuilder(); + } else { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder> + internalGetCacheUpdateFieldBuilder() { + if (cacheUpdateBuilder_ == null) { + cacheUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder>( + getCacheUpdate(), getParentForChildren(), isClean()); + cacheUpdate_ = null; + } + return cacheUpdateBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.CommitResponse) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java index 9b8eccd6b47..bf00f8accf4 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/commit_response.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface CommitResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.CommitResponse) @@ -190,5 +192,63 @@ public interface CommitResponseOrBuilder */ com.google.protobuf.TimestampOrBuilder getSnapshotTimestampOrBuilder(); + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + boolean hasCacheUpdate(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + com.google.spanner.v1.CacheUpdate getCacheUpdate(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder(); + com.google.spanner.v1.CommitResponse.MultiplexedSessionRetryCase getMultiplexedSessionRetryCase(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java index 24191aa23eb..31051dde3b6 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponseProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/commit_response.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; -public final class CommitResponseProto { +@com.google.protobuf.Generated +public final class CommitResponseProto extends com.google.protobuf.GeneratedFile { private CommitResponseProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CommitResponseProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,11 +42,11 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_CommitResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_CommitResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_CommitResponse_CommitStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_CommitResponse_CommitStats_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -46,52 +58,65 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\'google/spanner/v1/commit_response.prot" - + "o\022\021google.spanner.v1\032\037google/protobuf/ti" - + "mestamp.proto\032#google/spanner/v1/transac" - + "tion.proto\"\325\002\n\016CommitResponse\0224\n\020commit_" - + "timestamp\030\001 \001(\0132\032.google.protobuf.Timest" - + "amp\022C\n\014commit_stats\030\002 \001(\0132-.google.spann" - + "er.v1.CommitResponse.CommitStats\022N\n\017prec" - + "ommit_token\030\004 \001(\01323.google.spanner.v1.Mu" - + "ltiplexedSessionPrecommitTokenH\000\0226\n\022snap" - + "shot_timestamp\030\005 \001(\0132\032.google.protobuf.T" - + "imestamp\032%\n\013CommitStats\022\026\n\016mutation_coun" - + "t\030\001 \001(\003B\031\n\027MultiplexedSessionRetryB\266\001\n\025c" - + "om.google.spanner.v1B\023CommitResponseProt" - + "oP\001Z5cloud.google.com/go/spanner/apiv1/s" - + "pannerpb;spannerpb\252\002\027Google.Cloud.Spanne" - + "r.V1\312\002\027Google\\Cloud\\Spanner\\V1\352\002\032Google:" - + ":Cloud::Spanner::V1b\006proto3" + + "o\022\021google.spanner.v1\032\037google/api/field_b" + + "ehavior.proto\032\037google/protobuf/timestamp" + + ".proto\032 google/spanner/v1/location.proto" + + "\032#google/spanner/v1/transaction.proto\"\220\003" + + "\n\016CommitResponse\0224\n\020commit_timestamp\030\001 \001" + + "(\0132\032.google.protobuf.Timestamp\022C\n\014commit" + + "_stats\030\002 \001(\0132-.google.spanner.v1.CommitR" + + "esponse.CommitStats\022N\n\017precommit_token\030\004" + + " \001(\01323.google.spanner.v1.MultiplexedSess" + + "ionPrecommitTokenH\000\0226\n\022snapshot_timestam" + + "p\030\005 \001(\0132\032.google.protobuf.Timestamp\0229\n\014c" + + "ache_update\030\006 \001(\0132\036.google.spanner.v1.Ca" + + "cheUpdateB\003\340A\001\032%\n\013CommitStats\022\026\n\016mutatio" + + "n_count\030\001 \001(\003B\031\n\027MultiplexedSessionRetry" + + "B\266\001\n\025com.google.spanner.v1B\023CommitRespon" + + "seProtoP\001Z5cloud.google.com/go/spanner/a" + + "piv1/spannerpb;spannerpb\252\002\027Google.Cloud." + + "Spanner.V1\312\002\027Google\\Cloud\\Spanner\\V1\352\002\032G" + + "oogle::Cloud::Spanner::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.spanner.v1.LocationProto.getDescriptor(), com.google.spanner.v1.TransactionProto.getDescriptor(), }); - internal_static_google_spanner_v1_CommitResponse_descriptor = - getDescriptor().getMessageTypes().get(0); + internal_static_google_spanner_v1_CommitResponse_descriptor = getDescriptor().getMessageType(0); internal_static_google_spanner_v1_CommitResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_CommitResponse_descriptor, new java.lang.String[] { "CommitTimestamp", "CommitStats", "PrecommitToken", "SnapshotTimestamp", + "CacheUpdate", "MultiplexedSessionRetry", }); internal_static_google_spanner_v1_CommitResponse_CommitStats_descriptor = - internal_static_google_spanner_v1_CommitResponse_descriptor.getNestedTypes().get(0); + internal_static_google_spanner_v1_CommitResponse_descriptor.getNestedType(0); internal_static_google_spanner_v1_CommitResponse_CommitStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_CommitResponse_CommitStats_descriptor, new java.lang.String[] { "MutationCount", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.spanner.v1.LocationProto.getDescriptor(); com.google.spanner.v1.TransactionProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequest.java index 73c09945452..f33336e704f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.CreateSessionRequest} */ -public final class CreateSessionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateSessionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.CreateSessionRequest) CreateSessionRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateSessionRequest"); + } + // Use CreateSessionRequest.newBuilder() to construct. - private CreateSessionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateSessionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private CreateSessionRequest() { database_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateSessionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_CreateSessionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_CreateSessionRequest_fieldAccessorTable @@ -185,8 +191,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSession()); @@ -200,8 +206,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSession()); @@ -286,38 +292,38 @@ public static com.google.spanner.v1.CreateSessionRequest parseFrom( public static com.google.spanner.v1.CreateSessionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.CreateSessionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.CreateSessionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.CreateSessionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.CreateSessionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.CreateSessionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -340,7 +346,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -354,7 +360,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.CreateSessionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.CreateSessionRequest) com.google.spanner.v1.CreateSessionRequestOrBuilder { @@ -364,7 +370,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_CreateSessionRequest_fieldAccessorTable @@ -378,14 +384,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSessionFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSessionFieldBuilder(); } } @@ -446,39 +452,6 @@ private void buildPartial0(com.google.spanner.v1.CreateSessionRequest result) { 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.v1.CreateSessionRequest) { @@ -533,7 +506,7 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getSessionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetSessionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -678,7 +651,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.Session session_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder> @@ -828,7 +801,7 @@ public Builder clearSession() { public com.google.spanner.v1.Session.Builder getSessionBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSessionFieldBuilder().getBuilder(); + return internalGetSessionFieldBuilder().getBuilder(); } /** @@ -859,14 +832,14 @@ public com.google.spanner.v1.SessionOrBuilder getSessionOrBuilder() { * .google.spanner.v1.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder> - getSessionFieldBuilder() { + internalGetSessionFieldBuilder() { if (sessionBuilder_ == null) { sessionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder>( @@ -876,17 +849,6 @@ public com.google.spanner.v1.SessionOrBuilder getSessionOrBuilder() { return sessionBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.CreateSessionRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequestOrBuilder.java index d1cc03b399b..74c2c254d17 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CreateSessionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface CreateSessionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.CreateSessionRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java index 9ef67339f14..eee6b1de158 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DatabaseName.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequest.java index c85d25840a9..0ccb2e08873 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.DeleteSessionRequest} */ -public final class DeleteSessionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteSessionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.DeleteSessionRequest) DeleteSessionRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteSessionRequest"); + } + // Use DeleteSessionRequest.newBuilder() to construct. - private DeleteSessionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteSessionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private DeleteSessionRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteSessionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DeleteSessionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DeleteSessionRequest_fieldAccessorTable @@ -135,8 +141,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -147,8 +153,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -222,38 +228,38 @@ public static com.google.spanner.v1.DeleteSessionRequest parseFrom( public static com.google.spanner.v1.DeleteSessionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DeleteSessionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DeleteSessionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.DeleteSessionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DeleteSessionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DeleteSessionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -276,7 +282,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -290,7 +296,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.DeleteSessionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.DeleteSessionRequest) com.google.spanner.v1.DeleteSessionRequestOrBuilder { @@ -300,7 +306,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DeleteSessionRequest_fieldAccessorTable @@ -312,7 +318,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.DeleteSessionRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -362,39 +368,6 @@ private void buildPartial0(com.google.spanner.v1.DeleteSessionRequest result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.DeleteSessionRequest) { @@ -584,17 +557,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.DeleteSessionRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequestOrBuilder.java index 3b9fd21702c..d8187971b1e 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DeleteSessionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface DeleteSessionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.DeleteSessionRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DirectedReadOptions.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DirectedReadOptions.java index 130f6e7c650..9bdd468b013 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DirectedReadOptions.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DirectedReadOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -32,32 +33,37 @@ * * Protobuf type {@code google.spanner.v1.DirectedReadOptions} */ -public final class DirectedReadOptions extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DirectedReadOptions extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.DirectedReadOptions) DirectedReadOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DirectedReadOptions"); + } + // Use DirectedReadOptions.newBuilder() to construct. - private DirectedReadOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DirectedReadOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DirectedReadOptions() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DirectedReadOptions(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_fieldAccessorTable @@ -132,32 +138,42 @@ public interface ReplicaSelectionOrBuilder * Callers must provide one or more of the following fields for replica * selection: * - * * `location` - The location must be one of the regions within the - * multi-region configuration of your database. - * * `type` - The type of the replica. + * * `location` - The location must be one of the regions within the + * multi-region configuration of your database. + * * `type` - The type of the replica. * * Some examples of using replica_selectors are: * - * * `location:us-east1` --> The "us-east1" replica(s) of any available type - * is used to process the request. - * * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in the nearest - * available location are used to process the - * request. - * * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) - * in location "us-east1" is used to process - * the request. + * * `location:us-east1` --> The "us-east1" replica(s) of any available type + * is used to process the request. + * * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in the nearest + * available location are used to process the + * request. + * * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) + * in location "us-east1" is used to process + * the request. * * * Protobuf type {@code google.spanner.v1.DirectedReadOptions.ReplicaSelection} */ - public static final class ReplicaSelection extends com.google.protobuf.GeneratedMessageV3 + public static final class ReplicaSelection extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.DirectedReadOptions.ReplicaSelection) ReplicaSelectionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReplicaSelection"); + } + // Use ReplicaSelection.newBuilder() to construct. - private ReplicaSelection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReplicaSelection(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -166,19 +182,13 @@ private ReplicaSelection() { type_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReplicaSelection(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_ReplicaSelection_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_ReplicaSelection_fieldAccessorTable @@ -230,6 +240,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + /** * * @@ -321,7 +341,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.getDescriptor() .getEnumTypes() .get(0); @@ -454,8 +474,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, location_); } if (type_ != com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Type.TYPE_UNSPECIFIED @@ -471,8 +491,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, location_); } if (type_ != com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Type.TYPE_UNSPECIFIED @@ -554,38 +574,38 @@ public static com.google.spanner.v1.DirectedReadOptions.ReplicaSelection parseFr public static com.google.spanner.v1.DirectedReadOptions.ReplicaSelection parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions.ReplicaSelection parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DirectedReadOptions.ReplicaSelection parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions.ReplicaSelection parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DirectedReadOptions.ReplicaSelection parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions.ReplicaSelection parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -609,8 +629,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -623,26 +642,25 @@ protected Builder newBuilderForType( * Callers must provide one or more of the following fields for replica * selection: * - * * `location` - The location must be one of the regions within the - * multi-region configuration of your database. - * * `type` - The type of the replica. + * * `location` - The location must be one of the regions within the + * multi-region configuration of your database. + * * `type` - The type of the replica. * * Some examples of using replica_selectors are: * - * * `location:us-east1` --> The "us-east1" replica(s) of any available type - * is used to process the request. - * * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in the nearest - * available location are used to process the - * request. - * * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) - * in location "us-east1" is used to process - * the request. + * * `location:us-east1` --> The "us-east1" replica(s) of any available type + * is used to process the request. + * * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in the nearest + * available location are used to process the + * request. + * * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) + * in location "us-east1" is used to process + * the request. * * * Protobuf type {@code google.spanner.v1.DirectedReadOptions.ReplicaSelection} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.DirectedReadOptions.ReplicaSelection) com.google.spanner.v1.DirectedReadOptions.ReplicaSelectionOrBuilder { @@ -652,7 +670,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_ReplicaSelection_fieldAccessorTable @@ -664,7 +682,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -720,41 +738,6 @@ private void buildPartial0( } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.DirectedReadOptions.ReplicaSelection) { @@ -1043,18 +1026,6 @@ public Builder clearType() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.DirectedReadOptions.ReplicaSelection) } @@ -1207,14 +1178,24 @@ public interface IncludeReplicasOrBuilder * * Protobuf type {@code google.spanner.v1.DirectedReadOptions.IncludeReplicas} */ - public static final class IncludeReplicas extends com.google.protobuf.GeneratedMessageV3 + public static final class IncludeReplicas extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.DirectedReadOptions.IncludeReplicas) IncludeReplicasOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IncludeReplicas"); + } + // Use IncludeReplicas.newBuilder() to construct. - private IncludeReplicas(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private IncludeReplicas(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1222,19 +1203,13 @@ private IncludeReplicas() { replicaSelections_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new IncludeReplicas(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_IncludeReplicas_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_IncludeReplicas_fieldAccessorTable @@ -1468,38 +1443,38 @@ public static com.google.spanner.v1.DirectedReadOptions.IncludeReplicas parseFro public static com.google.spanner.v1.DirectedReadOptions.IncludeReplicas parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions.IncludeReplicas parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DirectedReadOptions.IncludeReplicas parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions.IncludeReplicas parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DirectedReadOptions.IncludeReplicas parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions.IncludeReplicas parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1523,8 +1498,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1539,8 +1513,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.DirectedReadOptions.IncludeReplicas} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.DirectedReadOptions.IncludeReplicas) com.google.spanner.v1.DirectedReadOptions.IncludeReplicasOrBuilder { @@ -1550,7 +1523,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_IncludeReplicas_fieldAccessorTable @@ -1562,7 +1535,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.DirectedReadOptions.IncludeReplicas.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1633,41 +1606,6 @@ private void buildPartial0(com.google.spanner.v1.DirectedReadOptions.IncludeRepl } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.DirectedReadOptions.IncludeReplicas) { @@ -1700,8 +1638,8 @@ public Builder mergeFrom(com.google.spanner.v1.DirectedReadOptions.IncludeReplic replicaSelections_ = other.replicaSelections_; bitField0_ = (bitField0_ & ~0x00000001); replicaSelectionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getReplicaSelectionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReplicaSelectionsFieldBuilder() : null; } else { replicaSelectionsBuilder_.addAllMessages(other.replicaSelections_); @@ -1788,7 +1726,7 @@ private void ensureReplicaSelectionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.DirectedReadOptions.ReplicaSelection, com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder, com.google.spanner.v1.DirectedReadOptions.ReplicaSelectionOrBuilder> @@ -2083,7 +2021,7 @@ public Builder removeReplicaSelections(int index) { */ public com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder getReplicaSelectionsBuilder(int index) { - return getReplicaSelectionsFieldBuilder().getBuilder(index); + return internalGetReplicaSelectionsFieldBuilder().getBuilder(index); } /** @@ -2140,7 +2078,7 @@ public Builder removeReplicaSelections(int index) { */ public com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder addReplicaSelectionsBuilder() { - return getReplicaSelectionsFieldBuilder() + return internalGetReplicaSelectionsFieldBuilder() .addBuilder( com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.getDefaultInstance()); } @@ -2158,7 +2096,7 @@ public Builder removeReplicaSelections(int index) { */ public com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder addReplicaSelectionsBuilder(int index) { - return getReplicaSelectionsFieldBuilder() + return internalGetReplicaSelectionsFieldBuilder() .addBuilder( index, com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.getDefaultInstance()); @@ -2177,17 +2115,17 @@ public Builder removeReplicaSelections(int index) { */ public java.util.List getReplicaSelectionsBuilderList() { - return getReplicaSelectionsFieldBuilder().getBuilderList(); + return internalGetReplicaSelectionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.DirectedReadOptions.ReplicaSelection, com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder, com.google.spanner.v1.DirectedReadOptions.ReplicaSelectionOrBuilder> - getReplicaSelectionsFieldBuilder() { + internalGetReplicaSelectionsFieldBuilder() { if (replicaSelectionsBuilder_ == null) { replicaSelectionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.DirectedReadOptions.ReplicaSelection, com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder, com.google.spanner.v1.DirectedReadOptions.ReplicaSelectionOrBuilder>( @@ -2262,18 +2200,6 @@ public Builder clearAutoFailoverDisabled() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.DirectedReadOptions.IncludeReplicas) } @@ -2410,14 +2336,24 @@ public interface ExcludeReplicasOrBuilder * * Protobuf type {@code google.spanner.v1.DirectedReadOptions.ExcludeReplicas} */ - public static final class ExcludeReplicas extends com.google.protobuf.GeneratedMessageV3 + public static final class ExcludeReplicas extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.DirectedReadOptions.ExcludeReplicas) ExcludeReplicasOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExcludeReplicas"); + } + // Use ExcludeReplicas.newBuilder() to construct. - private ExcludeReplicas(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExcludeReplicas(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -2425,19 +2361,13 @@ private ExcludeReplicas() { replicaSelections_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExcludeReplicas(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_ExcludeReplicas_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_ExcludeReplicas_fieldAccessorTable @@ -2641,38 +2571,38 @@ public static com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas parseFro public static com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2696,8 +2626,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2712,8 +2641,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.DirectedReadOptions.ExcludeReplicas} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.DirectedReadOptions.ExcludeReplicas) com.google.spanner.v1.DirectedReadOptions.ExcludeReplicasOrBuilder { @@ -2723,7 +2651,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_ExcludeReplicas_fieldAccessorTable @@ -2735,7 +2663,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2802,41 +2730,6 @@ private void buildPartial0(com.google.spanner.v1.DirectedReadOptions.ExcludeRepl int from_bitField0_ = bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas) { @@ -2869,8 +2762,8 @@ public Builder mergeFrom(com.google.spanner.v1.DirectedReadOptions.ExcludeReplic replicaSelections_ = other.replicaSelections_; bitField0_ = (bitField0_ & ~0x00000001); replicaSelectionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getReplicaSelectionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReplicaSelectionsFieldBuilder() : null; } else { replicaSelectionsBuilder_.addAllMessages(other.replicaSelections_); @@ -2948,7 +2841,7 @@ private void ensureReplicaSelectionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.DirectedReadOptions.ReplicaSelection, com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder, com.google.spanner.v1.DirectedReadOptions.ReplicaSelectionOrBuilder> @@ -3243,7 +3136,7 @@ public Builder removeReplicaSelections(int index) { */ public com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder getReplicaSelectionsBuilder(int index) { - return getReplicaSelectionsFieldBuilder().getBuilder(index); + return internalGetReplicaSelectionsFieldBuilder().getBuilder(index); } /** @@ -3300,7 +3193,7 @@ public Builder removeReplicaSelections(int index) { */ public com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder addReplicaSelectionsBuilder() { - return getReplicaSelectionsFieldBuilder() + return internalGetReplicaSelectionsFieldBuilder() .addBuilder( com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.getDefaultInstance()); } @@ -3318,7 +3211,7 @@ public Builder removeReplicaSelections(int index) { */ public com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder addReplicaSelectionsBuilder(int index) { - return getReplicaSelectionsFieldBuilder() + return internalGetReplicaSelectionsFieldBuilder() .addBuilder( index, com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.getDefaultInstance()); @@ -3337,17 +3230,17 @@ public Builder removeReplicaSelections(int index) { */ public java.util.List getReplicaSelectionsBuilderList() { - return getReplicaSelectionsFieldBuilder().getBuilderList(); + return internalGetReplicaSelectionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.DirectedReadOptions.ReplicaSelection, com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder, com.google.spanner.v1.DirectedReadOptions.ReplicaSelectionOrBuilder> - getReplicaSelectionsFieldBuilder() { + internalGetReplicaSelectionsFieldBuilder() { if (replicaSelectionsBuilder_ == null) { replicaSelectionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.DirectedReadOptions.ReplicaSelection, com.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Builder, com.google.spanner.v1.DirectedReadOptions.ReplicaSelectionOrBuilder>( @@ -3360,18 +3253,6 @@ public Builder removeReplicaSelections(int index) { return replicaSelectionsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.DirectedReadOptions.ExcludeReplicas) } @@ -3733,38 +3614,38 @@ public static com.google.spanner.v1.DirectedReadOptions parseFrom( public static com.google.spanner.v1.DirectedReadOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DirectedReadOptions parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.DirectedReadOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.DirectedReadOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -3787,7 +3668,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3805,7 +3686,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.DirectedReadOptions} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.DirectedReadOptions) com.google.spanner.v1.DirectedReadOptionsOrBuilder { @@ -3815,7 +3696,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_DirectedReadOptions_fieldAccessorTable @@ -3827,7 +3708,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.DirectedReadOptions.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -3893,39 +3774,6 @@ private void buildPartialOneofs(com.google.spanner.v1.DirectedReadOptions result } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.DirectedReadOptions) { @@ -3982,13 +3830,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getIncludeReplicasFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetIncludeReplicasFieldBuilder().getBuilder(), extensionRegistry); replicasCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getExcludeReplicasFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExcludeReplicasFieldBuilder().getBuilder(), extensionRegistry); replicasCase_ = 2; break; } // case 18 @@ -4025,7 +3875,7 @@ public Builder clearReplicas() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions.IncludeReplicas, com.google.spanner.v1.DirectedReadOptions.IncludeReplicas.Builder, com.google.spanner.v1.DirectedReadOptions.IncludeReplicasOrBuilder> @@ -4218,7 +4068,7 @@ public Builder clearIncludeReplicas() { */ public com.google.spanner.v1.DirectedReadOptions.IncludeReplicas.Builder getIncludeReplicasBuilder() { - return getIncludeReplicasFieldBuilder().getBuilder(); + return internalGetIncludeReplicasFieldBuilder().getBuilder(); } /** @@ -4260,18 +4110,18 @@ public Builder clearIncludeReplicas() { * * .google.spanner.v1.DirectedReadOptions.IncludeReplicas include_replicas = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions.IncludeReplicas, com.google.spanner.v1.DirectedReadOptions.IncludeReplicas.Builder, com.google.spanner.v1.DirectedReadOptions.IncludeReplicasOrBuilder> - getIncludeReplicasFieldBuilder() { + internalGetIncludeReplicasFieldBuilder() { if (includeReplicasBuilder_ == null) { if (!(replicasCase_ == 1)) { replicas_ = com.google.spanner.v1.DirectedReadOptions.IncludeReplicas.getDefaultInstance(); } includeReplicasBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions.IncludeReplicas, com.google.spanner.v1.DirectedReadOptions.IncludeReplicas.Builder, com.google.spanner.v1.DirectedReadOptions.IncludeReplicasOrBuilder>( @@ -4285,7 +4135,7 @@ public Builder clearIncludeReplicas() { return includeReplicasBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas, com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas.Builder, com.google.spanner.v1.DirectedReadOptions.ExcludeReplicasOrBuilder> @@ -4464,7 +4314,7 @@ public Builder clearExcludeReplicas() { */ public com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas.Builder getExcludeReplicasBuilder() { - return getExcludeReplicasFieldBuilder().getBuilder(); + return internalGetExcludeReplicasFieldBuilder().getBuilder(); } /** @@ -4502,18 +4352,18 @@ public Builder clearExcludeReplicas() { * * .google.spanner.v1.DirectedReadOptions.ExcludeReplicas exclude_replicas = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas, com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas.Builder, com.google.spanner.v1.DirectedReadOptions.ExcludeReplicasOrBuilder> - getExcludeReplicasFieldBuilder() { + internalGetExcludeReplicasFieldBuilder() { if (excludeReplicasBuilder_ == null) { if (!(replicasCase_ == 2)) { replicas_ = com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas.getDefaultInstance(); } excludeReplicasBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas, com.google.spanner.v1.DirectedReadOptions.ExcludeReplicas.Builder, com.google.spanner.v1.DirectedReadOptions.ExcludeReplicasOrBuilder>( @@ -4527,17 +4377,6 @@ public Builder clearExcludeReplicas() { return excludeReplicasBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.DirectedReadOptions) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DirectedReadOptionsOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DirectedReadOptionsOrBuilder.java index 0749a26f8d5..879e73f4d58 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DirectedReadOptionsOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/DirectedReadOptionsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface DirectedReadOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.DirectedReadOptions) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java index ce7b064cf05..8c038e860af 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.ExecuteBatchDmlRequest} */ -public final class ExecuteBatchDmlRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ExecuteBatchDmlRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ExecuteBatchDmlRequest) ExecuteBatchDmlRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExecuteBatchDmlRequest"); + } + // Use ExecuteBatchDmlRequest.newBuilder() to construct. - private ExecuteBatchDmlRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExecuteBatchDmlRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private ExecuteBatchDmlRequest() { statements_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExecuteBatchDmlRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteBatchDmlRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteBatchDmlRequest_fieldAccessorTable @@ -284,14 +290,24 @@ com.google.spanner.v1.Type getParamTypesOrDefault( * * Protobuf type {@code google.spanner.v1.ExecuteBatchDmlRequest.Statement} */ - public static final class Statement extends com.google.protobuf.GeneratedMessageV3 + public static final class Statement extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ExecuteBatchDmlRequest.Statement) StatementOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Statement"); + } + // Use Statement.newBuilder() to construct. - private Statement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Statement(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -299,12 +315,6 @@ private Statement() { sql_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Statement(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteBatchDmlRequest_Statement_descriptor; @@ -323,7 +333,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteBatchDmlRequest_Statement_fieldAccessorTable @@ -631,13 +641,13 @@ public final boolean isInitialized() { @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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, sql_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getParams()); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetParamTypes(), ParamTypesDefaultEntryHolder.defaultEntry, 3); getUnknownFields().writeTo(output); } @@ -648,8 +658,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sql_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sql_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParams()); @@ -749,38 +759,38 @@ public static com.google.spanner.v1.ExecuteBatchDmlRequest.Statement parseFrom( public static com.google.spanner.v1.ExecuteBatchDmlRequest.Statement parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteBatchDmlRequest.Statement parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteBatchDmlRequest.Statement parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteBatchDmlRequest.Statement parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteBatchDmlRequest.Statement parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteBatchDmlRequest.Statement parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -804,8 +814,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -819,8 +828,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.ExecuteBatchDmlRequest.Statement} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ExecuteBatchDmlRequest.Statement) com.google.spanner.v1.ExecuteBatchDmlRequest.StatementOrBuilder { @@ -852,7 +860,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteBatchDmlRequest_Statement_fieldAccessorTable @@ -866,14 +874,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getParamsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetParamsFieldBuilder(); } } @@ -939,41 +947,6 @@ private void buildPartial0(com.google.spanner.v1.ExecuteBatchDmlRequest.Statemen 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.v1.ExecuteBatchDmlRequest.Statement) { @@ -1031,7 +1004,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getParamsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetParamsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -1179,7 +1153,7 @@ public Builder setSqlBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Struct params_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> @@ -1399,7 +1373,7 @@ public Builder clearParams() { public com.google.protobuf.Struct.Builder getParamsBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getParamsFieldBuilder().getBuilder(); + return internalGetParamsFieldBuilder().getBuilder(); } /** @@ -1450,14 +1424,14 @@ public com.google.protobuf.StructOrBuilder getParamsOrBuilder() { * * .google.protobuf.Struct params = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getParamsFieldBuilder() { + internalGetParamsFieldBuilder() { if (paramsBuilder_ == null) { paramsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( @@ -1776,18 +1750,6 @@ public com.google.spanner.v1.Type.Builder putParamTypesBuilderIfAbsent(java.lang return (com.google.spanner.v1.Type.Builder) entry; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ExecuteBatchDmlRequest.Statement) } @@ -2202,8 +2164,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getTransaction()); @@ -2229,8 +2191,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTransaction()); @@ -2346,38 +2308,38 @@ public static com.google.spanner.v1.ExecuteBatchDmlRequest parseFrom( public static com.google.spanner.v1.ExecuteBatchDmlRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteBatchDmlRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteBatchDmlRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteBatchDmlRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteBatchDmlRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteBatchDmlRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2400,7 +2362,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2414,7 +2376,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.ExecuteBatchDmlRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ExecuteBatchDmlRequest) com.google.spanner.v1.ExecuteBatchDmlRequestOrBuilder { @@ -2424,7 +2386,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteBatchDmlRequest_fieldAccessorTable @@ -2438,16 +2400,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTransactionFieldBuilder(); - getStatementsFieldBuilder(); - getRequestOptionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTransactionFieldBuilder(); + internalGetStatementsFieldBuilder(); + internalGetRequestOptionsFieldBuilder(); } } @@ -2547,39 +2509,6 @@ private void buildPartial0(com.google.spanner.v1.ExecuteBatchDmlRequest result) 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.v1.ExecuteBatchDmlRequest) { @@ -2619,8 +2548,8 @@ public Builder mergeFrom(com.google.spanner.v1.ExecuteBatchDmlRequest other) { statements_ = other.statements_; bitField0_ = (bitField0_ & ~0x00000004); statementsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getStatementsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetStatementsFieldBuilder() : null; } else { statementsBuilder_.addAllMessages(other.statements_); @@ -2670,7 +2599,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTransactionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTransactionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -2696,7 +2626,8 @@ public Builder mergeFrom( } // case 32 case 42: { - input.readMessage(getRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -2847,7 +2778,7 @@ public Builder setSessionBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.TransactionSelector transaction_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> @@ -3035,7 +2966,7 @@ public Builder clearTransaction() { public com.google.spanner.v1.TransactionSelector.Builder getTransactionBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTransactionFieldBuilder().getBuilder(); + return internalGetTransactionFieldBuilder().getBuilder(); } /** @@ -3078,14 +3009,14 @@ public com.google.spanner.v1.TransactionSelectorOrBuilder getTransactionOrBuilde * .google.spanner.v1.TransactionSelector transaction = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> - getTransactionFieldBuilder() { + internalGetTransactionFieldBuilder() { if (transactionBuilder_ == null) { transactionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder>( @@ -3107,7 +3038,7 @@ private void ensureStatementsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ExecuteBatchDmlRequest.Statement, com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.Builder, com.google.spanner.v1.ExecuteBatchDmlRequest.StatementOrBuilder> @@ -3463,7 +3394,7 @@ public Builder removeStatements(int index) { */ public com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.Builder getStatementsBuilder( int index) { - return getStatementsFieldBuilder().getBuilder(index); + return internalGetStatementsFieldBuilder().getBuilder(index); } /** @@ -3533,7 +3464,7 @@ public com.google.spanner.v1.ExecuteBatchDmlRequest.StatementOrBuilder getStatem * */ public com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.Builder addStatementsBuilder() { - return getStatementsFieldBuilder() + return internalGetStatementsFieldBuilder() .addBuilder(com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.getDefaultInstance()); } @@ -3555,7 +3486,7 @@ public com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.Builder addStateme */ public com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.Builder addStatementsBuilder( int index) { - return getStatementsFieldBuilder() + return internalGetStatementsFieldBuilder() .addBuilder( index, com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.getDefaultInstance()); } @@ -3578,17 +3509,17 @@ public com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.Builder addStateme */ public java.util.List getStatementsBuilderList() { - return getStatementsFieldBuilder().getBuilderList(); + return internalGetStatementsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ExecuteBatchDmlRequest.Statement, com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.Builder, com.google.spanner.v1.ExecuteBatchDmlRequest.StatementOrBuilder> - getStatementsFieldBuilder() { + internalGetStatementsFieldBuilder() { if (statementsBuilder_ == null) { statementsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ExecuteBatchDmlRequest.Statement, com.google.spanner.v1.ExecuteBatchDmlRequest.Statement.Builder, com.google.spanner.v1.ExecuteBatchDmlRequest.StatementOrBuilder>( @@ -3676,7 +3607,7 @@ public Builder clearSeqno() { } private com.google.spanner.v1.RequestOptions requestOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> @@ -3821,7 +3752,7 @@ public Builder clearRequestOptions() { public com.google.spanner.v1.RequestOptions.Builder getRequestOptionsBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getRequestOptionsFieldBuilder().getBuilder(); + return internalGetRequestOptionsFieldBuilder().getBuilder(); } /** @@ -3852,14 +3783,14 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( * * .google.spanner.v1.RequestOptions request_options = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> - getRequestOptionsFieldBuilder() { + internalGetRequestOptionsFieldBuilder() { if (requestOptionsBuilder_ == null) { requestOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder>( @@ -3949,17 +3880,6 @@ public Builder clearLastStatements() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ExecuteBatchDmlRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java index 98d86cc96c0..ca03a10204d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ExecuteBatchDmlRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ExecuteBatchDmlRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java index 2da5aef4e1a..49a517a8aa3 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -34,11 +35,11 @@ * * 1. Check the status in the response message. The * [google.rpc.Code][google.rpc.Code] enum - * value `OK` indicates that all statements were executed successfully. + * value `OK` indicates that all statements were executed successfully. * 2. If the status was not `OK`, check the number of result sets in the - * response. If the response contains `N` - * [ResultSet][google.spanner.v1.ResultSet] messages, then statement `N+1` in - * the request failed. + * response. If the response contains `N` + * [ResultSet][google.spanner.v1.ResultSet] messages, then statement `N+1` in + * the request failed. * * Example 1: * @@ -51,21 +52,32 @@ * * Request: 5 DML statements. The third statement has a syntax error. * * Response: 2 [ResultSet][google.spanner.v1.ResultSet] messages, and a syntax * error (`INVALID_ARGUMENT`) - * status. The number of [ResultSet][google.spanner.v1.ResultSet] messages - * indicates that the third statement failed, and the fourth and fifth - * statements were not executed. + * status. The number of [ResultSet][google.spanner.v1.ResultSet] messages + * indicates that the third statement failed, and the fourth and fifth + * statements were not executed. * * * Protobuf type {@code google.spanner.v1.ExecuteBatchDmlResponse} */ -public final class ExecuteBatchDmlResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ExecuteBatchDmlResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ExecuteBatchDmlResponse) ExecuteBatchDmlResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExecuteBatchDmlResponse"); + } + // Use ExecuteBatchDmlResponse.newBuilder() to construct. - private ExecuteBatchDmlResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExecuteBatchDmlResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -73,19 +85,13 @@ private ExecuteBatchDmlResponse() { resultSets_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExecuteBatchDmlResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteBatchDmlResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteBatchDmlResponse_fieldAccessorTable @@ -463,38 +469,38 @@ public static com.google.spanner.v1.ExecuteBatchDmlResponse parseFrom( public static com.google.spanner.v1.ExecuteBatchDmlResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteBatchDmlResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteBatchDmlResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteBatchDmlResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteBatchDmlResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteBatchDmlResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -517,7 +523,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -537,11 +543,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * 1. Check the status in the response message. The * [google.rpc.Code][google.rpc.Code] enum - * value `OK` indicates that all statements were executed successfully. + * value `OK` indicates that all statements were executed successfully. * 2. If the status was not `OK`, check the number of result sets in the - * response. If the response contains `N` - * [ResultSet][google.spanner.v1.ResultSet] messages, then statement `N+1` in - * the request failed. + * response. If the response contains `N` + * [ResultSet][google.spanner.v1.ResultSet] messages, then statement `N+1` in + * the request failed. * * Example 1: * @@ -554,14 +560,14 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Request: 5 DML statements. The third statement has a syntax error. * * Response: 2 [ResultSet][google.spanner.v1.ResultSet] messages, and a syntax * error (`INVALID_ARGUMENT`) - * status. The number of [ResultSet][google.spanner.v1.ResultSet] messages - * indicates that the third statement failed, and the fourth and fifth - * statements were not executed. + * status. The number of [ResultSet][google.spanner.v1.ResultSet] messages + * indicates that the third statement failed, and the fourth and fifth + * statements were not executed. * * * Protobuf type {@code google.spanner.v1.ExecuteBatchDmlResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ExecuteBatchDmlResponse) com.google.spanner.v1.ExecuteBatchDmlResponseOrBuilder { @@ -571,7 +577,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteBatchDmlResponse_fieldAccessorTable @@ -585,16 +591,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultSetsFieldBuilder(); - getStatusFieldBuilder(); - getPrecommitTokenFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetResultSetsFieldBuilder(); + internalGetStatusFieldBuilder(); + internalGetPrecommitTokenFieldBuilder(); } } @@ -681,39 +687,6 @@ private void buildPartial0(com.google.spanner.v1.ExecuteBatchDmlResponse result) 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.v1.ExecuteBatchDmlResponse) { @@ -745,8 +718,8 @@ public Builder mergeFrom(com.google.spanner.v1.ExecuteBatchDmlResponse other) { resultSets_ = other.resultSets_; bitField0_ = (bitField0_ & ~0x00000001); resultSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getResultSetsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetResultSetsFieldBuilder() : null; } else { resultSetsBuilder_.addAllMessages(other.resultSets_); @@ -799,13 +772,14 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetStatusFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -838,7 +812,7 @@ private void ensureResultSetsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ResultSet, com.google.spanner.v1.ResultSet.Builder, com.google.spanner.v1.ResultSetOrBuilder> @@ -1201,7 +1175,7 @@ public Builder removeResultSets(int index) { * repeated .google.spanner.v1.ResultSet result_sets = 1; */ public com.google.spanner.v1.ResultSet.Builder getResultSetsBuilder(int index) { - return getResultSetsFieldBuilder().getBuilder(index); + return internalGetResultSetsFieldBuilder().getBuilder(index); } /** @@ -1273,7 +1247,7 @@ public com.google.spanner.v1.ResultSetOrBuilder getResultSetsOrBuilder(int index * repeated .google.spanner.v1.ResultSet result_sets = 1; */ public com.google.spanner.v1.ResultSet.Builder addResultSetsBuilder() { - return getResultSetsFieldBuilder() + return internalGetResultSetsFieldBuilder() .addBuilder(com.google.spanner.v1.ResultSet.getDefaultInstance()); } @@ -1295,7 +1269,7 @@ public com.google.spanner.v1.ResultSet.Builder addResultSetsBuilder() { * repeated .google.spanner.v1.ResultSet result_sets = 1; */ public com.google.spanner.v1.ResultSet.Builder addResultSetsBuilder(int index) { - return getResultSetsFieldBuilder() + return internalGetResultSetsFieldBuilder() .addBuilder(index, com.google.spanner.v1.ResultSet.getDefaultInstance()); } @@ -1317,17 +1291,17 @@ public com.google.spanner.v1.ResultSet.Builder addResultSetsBuilder(int index) { * repeated .google.spanner.v1.ResultSet result_sets = 1; */ public java.util.List getResultSetsBuilderList() { - return getResultSetsFieldBuilder().getBuilderList(); + return internalGetResultSetsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ResultSet, com.google.spanner.v1.ResultSet.Builder, com.google.spanner.v1.ResultSetOrBuilder> - getResultSetsFieldBuilder() { + internalGetResultSetsFieldBuilder() { if (resultSetsBuilder_ == null) { resultSetsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.ResultSet, com.google.spanner.v1.ResultSet.Builder, com.google.spanner.v1.ResultSetOrBuilder>( @@ -1338,7 +1312,7 @@ public java.util.List getResultSetsBuil } private com.google.rpc.Status status_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; @@ -1486,7 +1460,7 @@ public Builder clearStatus() { public com.google.rpc.Status.Builder getStatusBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStatusFieldBuilder().getBuilder(); + return internalGetStatusFieldBuilder().getBuilder(); } /** @@ -1517,12 +1491,12 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { * * .google.rpc.Status status = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusFieldBuilder() { + internalGetStatusFieldBuilder() { if (statusBuilder_ == null) { statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); @@ -1532,7 +1506,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { } private com.google.spanner.v1.MultiplexedSessionPrecommitToken precommitToken_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> @@ -1716,7 +1690,7 @@ public Builder clearPrecommitToken() { getPrecommitTokenBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getPrecommitTokenFieldBuilder().getBuilder(); + return internalGetPrecommitTokenFieldBuilder().getBuilder(); } /** @@ -1758,14 +1732,14 @@ public Builder clearPrecommitToken() { * .google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> - getPrecommitTokenFieldBuilder() { + internalGetPrecommitTokenFieldBuilder() { if (precommitTokenBuilder_ == null) { precommitTokenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder>( @@ -1775,17 +1749,6 @@ public Builder clearPrecommitToken() { return precommitTokenBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ExecuteBatchDmlResponse) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java index bde57013ec0..5fe10121554 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ExecuteBatchDmlResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ExecuteBatchDmlResponse) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java index 8fd531908a0..c4fb3c56ef0 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.ExecuteSqlRequest} */ -public final class ExecuteSqlRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ExecuteSqlRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ExecuteSqlRequest) ExecuteSqlRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExecuteSqlRequest"); + } + // Use ExecuteSqlRequest.newBuilder() to construct. - private ExecuteSqlRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExecuteSqlRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,12 +60,6 @@ private ExecuteSqlRequest() { partitionToken_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExecuteSqlRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteSqlRequest_descriptor; @@ -72,7 +78,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteSqlRequest_fieldAccessorTable @@ -150,6 +156,16 @@ public enum QueryMode implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryMode"); + } + /** * * @@ -273,7 +289,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.ExecuteSqlRequest.getDescriptor().getEnumTypes().get(0); } @@ -453,14 +469,24 @@ public interface QueryOptionsOrBuilder * * Protobuf type {@code google.spanner.v1.ExecuteSqlRequest.QueryOptions} */ - public static final class QueryOptions extends com.google.protobuf.GeneratedMessageV3 + public static final class QueryOptions extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ExecuteSqlRequest.QueryOptions) QueryOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryOptions"); + } + // Use QueryOptions.newBuilder() to construct. - private QueryOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private QueryOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -469,19 +495,13 @@ private QueryOptions() { optimizerStatisticsPackage_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryOptions(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteSqlRequest_QueryOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteSqlRequest_QueryOptions_fieldAccessorTable @@ -698,11 +718,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizerVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, optimizerVersion_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizerVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, optimizerVersion_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizerStatisticsPackage_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, optimizerStatisticsPackage_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizerStatisticsPackage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, optimizerStatisticsPackage_); } getUnknownFields().writeTo(output); } @@ -713,13 +733,12 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizerVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, optimizerVersion_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizerVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, optimizerVersion_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizerStatisticsPackage_)) { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizerStatisticsPackage_)) { size += - com.google.protobuf.GeneratedMessageV3.computeStringSize( - 2, optimizerStatisticsPackage_); + com.google.protobuf.GeneratedMessage.computeStringSize(2, optimizerStatisticsPackage_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -797,38 +816,38 @@ public static com.google.spanner.v1.ExecuteSqlRequest.QueryOptions parseFrom( public static com.google.spanner.v1.ExecuteSqlRequest.QueryOptions parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteSqlRequest.QueryOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteSqlRequest.QueryOptions parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteSqlRequest.QueryOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteSqlRequest.QueryOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteSqlRequest.QueryOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -852,8 +871,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -867,8 +885,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.ExecuteSqlRequest.QueryOptions} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ExecuteSqlRequest.QueryOptions) com.google.spanner.v1.ExecuteSqlRequest.QueryOptionsOrBuilder { @@ -878,7 +895,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteSqlRequest_QueryOptions_fieldAccessorTable @@ -890,7 +907,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.ExecuteSqlRequest.QueryOptions.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -944,41 +961,6 @@ private void buildPartial0(com.google.spanner.v1.ExecuteSqlRequest.QueryOptions } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.ExecuteSqlRequest.QueryOptions) { @@ -1501,18 +1483,6 @@ public Builder setOptimizerStatisticsPackageBytes(com.google.protobuf.ByteString return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ExecuteSqlRequest.QueryOptions) } @@ -2315,6 +2285,80 @@ public boolean getLastStatement() { return lastStatement_; } + public static final int ROUTING_HINT_FIELD_NUMBER = 18; + private com.google.spanner.v1.RoutingHint routingHint_; + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + @java.lang.Override + public boolean hasRoutingHint() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHint getRoutingHint() { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder() { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2329,19 +2373,19 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getTransaction()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sql_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sql_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getParams()); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetParamTypes(), ParamTypesDefaultEntryHolder.defaultEntry, 5); if (!resumeToken_.isEmpty()) { output.writeBytes(6, resumeToken_); @@ -2370,6 +2414,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (lastStatement_ != false) { output.writeBool(17, lastStatement_); } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(18, getRoutingHint()); + } getUnknownFields().writeTo(output); } @@ -2379,14 +2426,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTransaction()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sql_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sql_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getParams()); @@ -2429,6 +2476,9 @@ public int getSerializedSize() { if (lastStatement_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, lastStatement_); } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getRoutingHint()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2473,6 +2523,10 @@ public boolean equals(final java.lang.Object obj) { } if (getDataBoostEnabled() != other.getDataBoostEnabled()) return false; if (getLastStatement() != other.getLastStatement()) return false; + if (hasRoutingHint() != other.hasRoutingHint()) return false; + if (hasRoutingHint()) { + if (!getRoutingHint().equals(other.getRoutingHint())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2524,6 +2578,10 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDataBoostEnabled()); hash = (37 * hash) + LAST_STATEMENT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLastStatement()); + if (hasRoutingHint()) { + hash = (37 * hash) + ROUTING_HINT_FIELD_NUMBER; + hash = (53 * hash) + getRoutingHint().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2566,38 +2624,38 @@ public static com.google.spanner.v1.ExecuteSqlRequest parseFrom( public static com.google.spanner.v1.ExecuteSqlRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteSqlRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteSqlRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteSqlRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ExecuteSqlRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ExecuteSqlRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2620,7 +2678,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2635,7 +2693,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.ExecuteSqlRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ExecuteSqlRequest) com.google.spanner.v1.ExecuteSqlRequestOrBuilder { @@ -2667,7 +2725,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ExecuteSqlRequest_fieldAccessorTable @@ -2681,18 +2739,19 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTransactionFieldBuilder(); - getParamsFieldBuilder(); - getQueryOptionsFieldBuilder(); - getRequestOptionsFieldBuilder(); - getDirectedReadOptionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTransactionFieldBuilder(); + internalGetParamsFieldBuilder(); + internalGetQueryOptionsFieldBuilder(); + internalGetRequestOptionsFieldBuilder(); + internalGetDirectedReadOptionsFieldBuilder(); + internalGetRoutingHintFieldBuilder(); } } @@ -2734,6 +2793,11 @@ public Builder clear() { } dataBoostEnabled_ = false; lastStatement_ = false; + routingHint_ = null; + if (routingHintBuilder_ != null) { + routingHintBuilder_.dispose(); + routingHintBuilder_ = null; + } return this; } @@ -2825,42 +2889,14 @@ private void buildPartial0(com.google.spanner.v1.ExecuteSqlRequest result) { if (((from_bitField0_ & 0x00002000) != 0)) { result.lastStatement_ = lastStatement_; } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.routingHint_ = + routingHintBuilder_ == null ? routingHint_ : routingHintBuilder_.build(); + to_bitField0_ |= 0x00000020; + } 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.v1.ExecuteSqlRequest) { @@ -2891,13 +2927,13 @@ public Builder mergeFrom(com.google.spanner.v1.ExecuteSqlRequest other) { } internalGetMutableParamTypes().mergeFrom(other.internalGetParamTypes()); bitField0_ |= 0x00000010; - if (other.getResumeToken() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getResumeToken().isEmpty()) { setResumeToken(other.getResumeToken()); } if (other.queryMode_ != 0) { setQueryModeValue(other.getQueryModeValue()); } - if (other.getPartitionToken() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getPartitionToken().isEmpty()) { setPartitionToken(other.getPartitionToken()); } if (other.getSeqno() != 0L) { @@ -2918,6 +2954,9 @@ public Builder mergeFrom(com.google.spanner.v1.ExecuteSqlRequest other) { if (other.getLastStatement() != false) { setLastStatement(other.getLastStatement()); } + if (other.hasRoutingHint()) { + mergeRoutingHint(other.getRoutingHint()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2952,7 +2991,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTransactionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTransactionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -2964,7 +3004,7 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getParamsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetParamsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -3007,20 +3047,22 @@ public Builder mergeFrom( } // case 72 case 82: { - input.readMessage(getQueryOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetQueryOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000200; break; } // case 82 case 90: { - input.readMessage(getRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000400; break; } // case 90 case 122: { input.readMessage( - getDirectedReadOptionsFieldBuilder().getBuilder(), extensionRegistry); + internalGetDirectedReadOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000800; break; } // case 122 @@ -3036,6 +3078,13 @@ public Builder mergeFrom( bitField0_ |= 0x00002000; break; } // case 136 + case 146: + { + input.readMessage( + internalGetRoutingHintFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3177,7 +3226,7 @@ public Builder setSessionBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.TransactionSelector transaction_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> @@ -3386,7 +3435,7 @@ public Builder clearTransaction() { public com.google.spanner.v1.TransactionSelector.Builder getTransactionBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTransactionFieldBuilder().getBuilder(); + return internalGetTransactionFieldBuilder().getBuilder(); } /** @@ -3435,14 +3484,14 @@ public com.google.spanner.v1.TransactionSelectorOrBuilder getTransactionOrBuilde * * .google.spanner.v1.TransactionSelector transaction = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> - getTransactionFieldBuilder() { + internalGetTransactionFieldBuilder() { if (transactionBuilder_ == null) { transactionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder>( @@ -3564,7 +3613,7 @@ public Builder setSqlBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Struct params_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> @@ -3791,7 +3840,7 @@ public Builder clearParams() { public com.google.protobuf.Struct.Builder getParamsBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getParamsFieldBuilder().getBuilder(); + return internalGetParamsFieldBuilder().getBuilder(); } /** @@ -3844,14 +3893,14 @@ public com.google.protobuf.StructOrBuilder getParamsOrBuilder() { * * .google.protobuf.Struct params = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getParamsFieldBuilder() { + internalGetParamsFieldBuilder() { if (paramsBuilder_ == null) { paramsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( @@ -4508,7 +4557,7 @@ public Builder clearSeqno() { } private com.google.spanner.v1.ExecuteSqlRequest.QueryOptions queryOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ExecuteSqlRequest.QueryOptions, com.google.spanner.v1.ExecuteSqlRequest.QueryOptions.Builder, com.google.spanner.v1.ExecuteSqlRequest.QueryOptionsOrBuilder> @@ -4655,7 +4704,7 @@ public Builder clearQueryOptions() { public com.google.spanner.v1.ExecuteSqlRequest.QueryOptions.Builder getQueryOptionsBuilder() { bitField0_ |= 0x00000200; onChanged(); - return getQueryOptionsFieldBuilder().getBuilder(); + return internalGetQueryOptionsFieldBuilder().getBuilder(); } /** @@ -4687,14 +4736,14 @@ public com.google.spanner.v1.ExecuteSqlRequest.QueryOptions.Builder getQueryOpti * * .google.spanner.v1.ExecuteSqlRequest.QueryOptions query_options = 10; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ExecuteSqlRequest.QueryOptions, com.google.spanner.v1.ExecuteSqlRequest.QueryOptions.Builder, com.google.spanner.v1.ExecuteSqlRequest.QueryOptionsOrBuilder> - getQueryOptionsFieldBuilder() { + internalGetQueryOptionsFieldBuilder() { if (queryOptionsBuilder_ == null) { queryOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ExecuteSqlRequest.QueryOptions, com.google.spanner.v1.ExecuteSqlRequest.QueryOptions.Builder, com.google.spanner.v1.ExecuteSqlRequest.QueryOptionsOrBuilder>( @@ -4705,7 +4754,7 @@ public com.google.spanner.v1.ExecuteSqlRequest.QueryOptions.Builder getQueryOpti } private com.google.spanner.v1.RequestOptions requestOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> @@ -4850,7 +4899,7 @@ public Builder clearRequestOptions() { public com.google.spanner.v1.RequestOptions.Builder getRequestOptionsBuilder() { bitField0_ |= 0x00000400; onChanged(); - return getRequestOptionsFieldBuilder().getBuilder(); + return internalGetRequestOptionsFieldBuilder().getBuilder(); } /** @@ -4881,14 +4930,14 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( * * .google.spanner.v1.RequestOptions request_options = 11; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> - getRequestOptionsFieldBuilder() { + internalGetRequestOptionsFieldBuilder() { if (requestOptionsBuilder_ == null) { requestOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder>( @@ -4899,7 +4948,7 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( } private com.google.spanner.v1.DirectedReadOptions directedReadOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions, com.google.spanner.v1.DirectedReadOptions.Builder, com.google.spanner.v1.DirectedReadOptionsOrBuilder> @@ -5046,7 +5095,7 @@ public Builder clearDirectedReadOptions() { public com.google.spanner.v1.DirectedReadOptions.Builder getDirectedReadOptionsBuilder() { bitField0_ |= 0x00000800; onChanged(); - return getDirectedReadOptionsFieldBuilder().getBuilder(); + return internalGetDirectedReadOptionsFieldBuilder().getBuilder(); } /** @@ -5077,14 +5126,14 @@ public com.google.spanner.v1.DirectedReadOptionsOrBuilder getDirectedReadOptions * * .google.spanner.v1.DirectedReadOptions directed_read_options = 15; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions, com.google.spanner.v1.DirectedReadOptions.Builder, com.google.spanner.v1.DirectedReadOptionsOrBuilder> - getDirectedReadOptionsFieldBuilder() { + internalGetDirectedReadOptionsFieldBuilder() { if (directedReadOptionsBuilder_ == null) { directedReadOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions, com.google.spanner.v1.DirectedReadOptions.Builder, com.google.spanner.v1.DirectedReadOptionsOrBuilder>( @@ -5242,15 +5291,261 @@ public Builder clearLastStatement() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.RoutingHint routingHint_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder> + routingHintBuilder_; + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + public boolean hasRoutingHint() { + return ((bitField0_ & 0x00004000) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + public com.google.spanner.v1.RoutingHint getRoutingHint() { + if (routingHintBuilder_ == null) { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } else { + return routingHintBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRoutingHint(com.google.spanner.v1.RoutingHint value) { + if (routingHintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + routingHint_ = value; + } else { + routingHintBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRoutingHint(com.google.spanner.v1.RoutingHint.Builder builderForValue) { + if (routingHintBuilder_ == null) { + routingHint_ = builderForValue.build(); + } else { + routingHintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRoutingHint(com.google.spanner.v1.RoutingHint value) { + if (routingHintBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && routingHint_ != null + && routingHint_ != com.google.spanner.v1.RoutingHint.getDefaultInstance()) { + getRoutingHintBuilder().mergeFrom(value); + } else { + routingHint_ = value; + } + } else { + routingHintBuilder_.mergeFrom(value); + } + if (routingHint_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRoutingHint() { + bitField0_ = (bitField0_ & ~0x00004000); + routingHint_ = null; + if (routingHintBuilder_ != null) { + routingHintBuilder_.dispose(); + routingHintBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RoutingHint.Builder getRoutingHintBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return internalGetRoutingHintFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder() { + if (routingHintBuilder_ != null) { + return routingHintBuilder_.getMessageOrBuilder(); + } else { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder> + internalGetRoutingHintFieldBuilder() { + if (routingHintBuilder_ == null) { + routingHintBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder>( + getRoutingHint(), getParentForChildren(), isClean()); + routingHint_ = null; + } + return routingHintBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.ExecuteSqlRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java index c3f479e50fe..c72df5d5568 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ExecuteSqlRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ExecuteSqlRequest) @@ -560,4 +562,62 @@ com.google.spanner.v1.Type getParamTypesOrDefault( * @return The lastStatement. */ boolean getLastStatement(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + boolean hasRoutingHint(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + com.google.spanner.v1.RoutingHint getRoutingHint(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequest.java index 365733d9238..f3c97672a68 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.GetSessionRequest} */ -public final class GetSessionRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetSessionRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.GetSessionRequest) GetSessionRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetSessionRequest"); + } + // Use GetSessionRequest.newBuilder() to construct. - private GetSessionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetSessionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private GetSessionRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetSessionRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_GetSessionRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_GetSessionRequest_fieldAccessorTable @@ -135,8 +141,8 @@ public final boolean isInitialized() { @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } getUnknownFields().writeTo(output); } @@ -147,8 +153,8 @@ public int getSerializedSize() { 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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -221,38 +227,38 @@ public static com.google.spanner.v1.GetSessionRequest parseFrom( public static com.google.spanner.v1.GetSessionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.GetSessionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.GetSessionRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.GetSessionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.GetSessionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.GetSessionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -275,7 +281,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -289,7 +295,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.GetSessionRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.GetSessionRequest) com.google.spanner.v1.GetSessionRequestOrBuilder { @@ -299,7 +305,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_GetSessionRequest_fieldAccessorTable @@ -311,7 +317,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.GetSessionRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -361,39 +367,6 @@ private void buildPartial0(com.google.spanner.v1.GetSessionRequest result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.GetSessionRequest) { @@ -583,17 +556,6 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.GetSessionRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequestOrBuilder.java index 3d42182345a..28aece5eded 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GetSessionRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface GetSessionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.GetSessionRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Group.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Group.java new file mode 100644 index 00000000000..47cf2c5c211 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Group.java @@ -0,0 +1,1321 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +/** + * + * + *
+ * A `Group` represents a paxos group in a database. A group is a set of
+ * tablets that are replicated across multiple servers. Groups may have a leader
+ * tablet. Groups store one (or sometimes more) ranges of keys.
+ * 
+ * + * Protobuf type {@code google.spanner.v1.Group} + */ +@com.google.protobuf.Generated +public final class Group extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.Group) + GroupOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Group"); + } + + // Use Group.newBuilder() to construct. + private Group(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Group() { + tablets_ = java.util.Collections.emptyList(); + generation_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto.internal_static_google_spanner_v1_Group_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Group.class, com.google.spanner.v1.Group.Builder.class); + } + + public static final int GROUP_UID_FIELD_NUMBER = 1; + private long groupUid_ = 0L; + + /** + * + * + *
+   * The UID of the paxos group, unique within the database. Matches the
+   * `group_uid` field in `Range`.
+   * 
+ * + * uint64 group_uid = 1; + * + * @return The groupUid. + */ + @java.lang.Override + public long getGroupUid() { + return groupUid_; + } + + public static final int TABLETS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List tablets_; + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + @java.lang.Override + public java.util.List getTabletsList() { + return tablets_; + } + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + @java.lang.Override + public java.util.List getTabletsOrBuilderList() { + return tablets_; + } + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + @java.lang.Override + public int getTabletsCount() { + return tablets_.size(); + } + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + @java.lang.Override + public com.google.spanner.v1.Tablet getTablets(int index) { + return tablets_.get(index); + } + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + @java.lang.Override + public com.google.spanner.v1.TabletOrBuilder getTabletsOrBuilder(int index) { + return tablets_.get(index); + } + + public static final int LEADER_INDEX_FIELD_NUMBER = 3; + private int leaderIndex_ = 0; + + /** + * + * + *
+   * The last known leader tablet of the group as an index into `tablets`. May
+   * be negative if the group has no known leader.
+   * 
+ * + * int32 leader_index = 3; + * + * @return The leaderIndex. + */ + @java.lang.Override + public int getLeaderIndex() { + return leaderIndex_; + } + + public static final int GENERATION_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString generation_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * `generation` indicates the freshness of the group information (including
+   * leader information) contained in this proto. Generations can be compared
+   * lexicographically; if generation A is greater than generation B, then the
+   * `Group` corresponding to A is newer than the `Group` corresponding to B,
+   * and should be used preferentially.
+   * 
+ * + * bytes generation = 4; + * + * @return The generation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGeneration() { + return generation_; + } + + 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 (groupUid_ != 0L) { + output.writeUInt64(1, groupUid_); + } + for (int i = 0; i < tablets_.size(); i++) { + output.writeMessage(2, tablets_.get(i)); + } + if (leaderIndex_ != 0) { + output.writeInt32(3, leaderIndex_); + } + if (!generation_.isEmpty()) { + output.writeBytes(4, generation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (groupUid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(1, groupUid_); + } + for (int i = 0; i < tablets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, tablets_.get(i)); + } + if (leaderIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, leaderIndex_); + } + if (!generation_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, generation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.Group)) { + return super.equals(obj); + } + com.google.spanner.v1.Group other = (com.google.spanner.v1.Group) obj; + + if (getGroupUid() != other.getGroupUid()) return false; + if (!getTabletsList().equals(other.getTabletsList())) return false; + if (getLeaderIndex() != other.getLeaderIndex()) return false; + if (!getGeneration().equals(other.getGeneration())) 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) + GROUP_UID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGroupUid()); + if (getTabletsCount() > 0) { + hash = (37 * hash) + TABLETS_FIELD_NUMBER; + hash = (53 * hash) + getTabletsList().hashCode(); + } + hash = (37 * hash) + LEADER_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getLeaderIndex(); + hash = (37 * hash) + GENERATION_FIELD_NUMBER; + hash = (53 * hash) + getGeneration().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.Group parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Group parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Group parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Group parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Group parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Group parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Group parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Group parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Group parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Group parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Group parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Group parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.Group 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A `Group` represents a paxos group in a database. A group is a set of
+   * tablets that are replicated across multiple servers. Groups may have a leader
+   * tablet. Groups store one (or sometimes more) ranges of keys.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.Group} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.Group) + com.google.spanner.v1.GroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto.internal_static_google_spanner_v1_Group_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Group.class, com.google.spanner.v1.Group.Builder.class); + } + + // Construct using com.google.spanner.v1.Group.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + groupUid_ = 0L; + if (tabletsBuilder_ == null) { + tablets_ = java.util.Collections.emptyList(); + } else { + tablets_ = null; + tabletsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + leaderIndex_ = 0; + generation_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.LocationProto.internal_static_google_spanner_v1_Group_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.Group getDefaultInstanceForType() { + return com.google.spanner.v1.Group.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.Group build() { + com.google.spanner.v1.Group result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.Group buildPartial() { + com.google.spanner.v1.Group result = new com.google.spanner.v1.Group(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.v1.Group result) { + if (tabletsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + tablets_ = java.util.Collections.unmodifiableList(tablets_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.tablets_ = tablets_; + } else { + result.tablets_ = tabletsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.v1.Group result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.groupUid_ = groupUid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.leaderIndex_ = leaderIndex_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.generation_ = generation_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.Group) { + return mergeFrom((com.google.spanner.v1.Group) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.Group other) { + if (other == com.google.spanner.v1.Group.getDefaultInstance()) return this; + if (other.getGroupUid() != 0L) { + setGroupUid(other.getGroupUid()); + } + if (tabletsBuilder_ == null) { + if (!other.tablets_.isEmpty()) { + if (tablets_.isEmpty()) { + tablets_ = other.tablets_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTabletsIsMutable(); + tablets_.addAll(other.tablets_); + } + onChanged(); + } + } else { + if (!other.tablets_.isEmpty()) { + if (tabletsBuilder_.isEmpty()) { + tabletsBuilder_.dispose(); + tabletsBuilder_ = null; + tablets_ = other.tablets_; + bitField0_ = (bitField0_ & ~0x00000002); + tabletsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTabletsFieldBuilder() + : null; + } else { + tabletsBuilder_.addAllMessages(other.tablets_); + } + } + } + if (other.getLeaderIndex() != 0) { + setLeaderIndex(other.getLeaderIndex()); + } + if (!other.getGeneration().isEmpty()) { + setGeneration(other.getGeneration()); + } + 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: + { + groupUid_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + com.google.spanner.v1.Tablet m = + input.readMessage(com.google.spanner.v1.Tablet.parser(), extensionRegistry); + if (tabletsBuilder_ == null) { + ensureTabletsIsMutable(); + tablets_.add(m); + } else { + tabletsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + leaderIndex_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + generation_ = input.readBytes(); + 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 long groupUid_; + + /** + * + * + *
+     * The UID of the paxos group, unique within the database. Matches the
+     * `group_uid` field in `Range`.
+     * 
+ * + * uint64 group_uid = 1; + * + * @return The groupUid. + */ + @java.lang.Override + public long getGroupUid() { + return groupUid_; + } + + /** + * + * + *
+     * The UID of the paxos group, unique within the database. Matches the
+     * `group_uid` field in `Range`.
+     * 
+ * + * uint64 group_uid = 1; + * + * @param value The groupUid to set. + * @return This builder for chaining. + */ + public Builder setGroupUid(long value) { + + groupUid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The UID of the paxos group, unique within the database. Matches the
+     * `group_uid` field in `Range`.
+     * 
+ * + * uint64 group_uid = 1; + * + * @return This builder for chaining. + */ + public Builder clearGroupUid() { + bitField0_ = (bitField0_ & ~0x00000001); + groupUid_ = 0L; + onChanged(); + return this; + } + + private java.util.List tablets_ = + java.util.Collections.emptyList(); + + private void ensureTabletsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + tablets_ = new java.util.ArrayList(tablets_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.Tablet, + com.google.spanner.v1.Tablet.Builder, + com.google.spanner.v1.TabletOrBuilder> + tabletsBuilder_; + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public java.util.List getTabletsList() { + if (tabletsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tablets_); + } else { + return tabletsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public int getTabletsCount() { + if (tabletsBuilder_ == null) { + return tablets_.size(); + } else { + return tabletsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public com.google.spanner.v1.Tablet getTablets(int index) { + if (tabletsBuilder_ == null) { + return tablets_.get(index); + } else { + return tabletsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public Builder setTablets(int index, com.google.spanner.v1.Tablet value) { + if (tabletsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTabletsIsMutable(); + tablets_.set(index, value); + onChanged(); + } else { + tabletsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public Builder setTablets(int index, com.google.spanner.v1.Tablet.Builder builderForValue) { + if (tabletsBuilder_ == null) { + ensureTabletsIsMutable(); + tablets_.set(index, builderForValue.build()); + onChanged(); + } else { + tabletsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public Builder addTablets(com.google.spanner.v1.Tablet value) { + if (tabletsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTabletsIsMutable(); + tablets_.add(value); + onChanged(); + } else { + tabletsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public Builder addTablets(int index, com.google.spanner.v1.Tablet value) { + if (tabletsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTabletsIsMutable(); + tablets_.add(index, value); + onChanged(); + } else { + tabletsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public Builder addTablets(com.google.spanner.v1.Tablet.Builder builderForValue) { + if (tabletsBuilder_ == null) { + ensureTabletsIsMutable(); + tablets_.add(builderForValue.build()); + onChanged(); + } else { + tabletsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public Builder addTablets(int index, com.google.spanner.v1.Tablet.Builder builderForValue) { + if (tabletsBuilder_ == null) { + ensureTabletsIsMutable(); + tablets_.add(index, builderForValue.build()); + onChanged(); + } else { + tabletsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public Builder addAllTablets( + java.lang.Iterable values) { + if (tabletsBuilder_ == null) { + ensureTabletsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tablets_); + onChanged(); + } else { + tabletsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public Builder clearTablets() { + if (tabletsBuilder_ == null) { + tablets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + tabletsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public Builder removeTablets(int index) { + if (tabletsBuilder_ == null) { + ensureTabletsIsMutable(); + tablets_.remove(index); + onChanged(); + } else { + tabletsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public com.google.spanner.v1.Tablet.Builder getTabletsBuilder(int index) { + return internalGetTabletsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public com.google.spanner.v1.TabletOrBuilder getTabletsOrBuilder(int index) { + if (tabletsBuilder_ == null) { + return tablets_.get(index); + } else { + return tabletsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public java.util.List + getTabletsOrBuilderList() { + if (tabletsBuilder_ != null) { + return tabletsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tablets_); + } + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public com.google.spanner.v1.Tablet.Builder addTabletsBuilder() { + return internalGetTabletsFieldBuilder() + .addBuilder(com.google.spanner.v1.Tablet.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public com.google.spanner.v1.Tablet.Builder addTabletsBuilder(int index) { + return internalGetTabletsFieldBuilder() + .addBuilder(index, com.google.spanner.v1.Tablet.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of tablets that are part of the group. Note that this list may not
+     * be exhaustive; it will only include tablets the server considers useful
+     * to the client. The returned list is ordered ascending by distance.
+     *
+     * Tablet UIDs reference `Tablet.tablet_uid`.
+     * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + public java.util.List getTabletsBuilderList() { + return internalGetTabletsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.Tablet, + com.google.spanner.v1.Tablet.Builder, + com.google.spanner.v1.TabletOrBuilder> + internalGetTabletsFieldBuilder() { + if (tabletsBuilder_ == null) { + tabletsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.Tablet, + com.google.spanner.v1.Tablet.Builder, + com.google.spanner.v1.TabletOrBuilder>( + tablets_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + tablets_ = null; + } + return tabletsBuilder_; + } + + private int leaderIndex_; + + /** + * + * + *
+     * The last known leader tablet of the group as an index into `tablets`. May
+     * be negative if the group has no known leader.
+     * 
+ * + * int32 leader_index = 3; + * + * @return The leaderIndex. + */ + @java.lang.Override + public int getLeaderIndex() { + return leaderIndex_; + } + + /** + * + * + *
+     * The last known leader tablet of the group as an index into `tablets`. May
+     * be negative if the group has no known leader.
+     * 
+ * + * int32 leader_index = 3; + * + * @param value The leaderIndex to set. + * @return This builder for chaining. + */ + public Builder setLeaderIndex(int value) { + + leaderIndex_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The last known leader tablet of the group as an index into `tablets`. May
+     * be negative if the group has no known leader.
+     * 
+ * + * int32 leader_index = 3; + * + * @return This builder for chaining. + */ + public Builder clearLeaderIndex() { + bitField0_ = (bitField0_ & ~0x00000004); + leaderIndex_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString generation_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * `generation` indicates the freshness of the group information (including
+     * leader information) contained in this proto. Generations can be compared
+     * lexicographically; if generation A is greater than generation B, then the
+     * `Group` corresponding to A is newer than the `Group` corresponding to B,
+     * and should be used preferentially.
+     * 
+ * + * bytes generation = 4; + * + * @return The generation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGeneration() { + return generation_; + } + + /** + * + * + *
+     * `generation` indicates the freshness of the group information (including
+     * leader information) contained in this proto. Generations can be compared
+     * lexicographically; if generation A is greater than generation B, then the
+     * `Group` corresponding to A is newer than the `Group` corresponding to B,
+     * and should be used preferentially.
+     * 
+ * + * bytes generation = 4; + * + * @param value The generation to set. + * @return This builder for chaining. + */ + public Builder setGeneration(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + generation_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * `generation` indicates the freshness of the group information (including
+     * leader information) contained in this proto. Generations can be compared
+     * lexicographically; if generation A is greater than generation B, then the
+     * `Group` corresponding to A is newer than the `Group` corresponding to B,
+     * and should be used preferentially.
+     * 
+ * + * bytes generation = 4; + * + * @return This builder for chaining. + */ + public Builder clearGeneration() { + bitField0_ = (bitField0_ & ~0x00000008); + generation_ = getDefaultInstance().getGeneration(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.Group) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.Group) + private static final com.google.spanner.v1.Group DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.Group(); + } + + public static com.google.spanner.v1.Group getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Group parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.Group getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GroupOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GroupOrBuilder.java new file mode 100644 index 00000000000..75312cd6a77 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/GroupOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +@com.google.protobuf.Generated +public interface GroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.Group) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The UID of the paxos group, unique within the database. Matches the
+   * `group_uid` field in `Range`.
+   * 
+ * + * uint64 group_uid = 1; + * + * @return The groupUid. + */ + long getGroupUid(); + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + java.util.List getTabletsList(); + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + com.google.spanner.v1.Tablet getTablets(int index); + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + int getTabletsCount(); + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + java.util.List getTabletsOrBuilderList(); + + /** + * + * + *
+   * A list of tablets that are part of the group. Note that this list may not
+   * be exhaustive; it will only include tablets the server considers useful
+   * to the client. The returned list is ordered ascending by distance.
+   *
+   * Tablet UIDs reference `Tablet.tablet_uid`.
+   * 
+ * + * repeated .google.spanner.v1.Tablet tablets = 2; + */ + com.google.spanner.v1.TabletOrBuilder getTabletsOrBuilder(int index); + + /** + * + * + *
+   * The last known leader tablet of the group as an index into `tablets`. May
+   * be negative if the group has no known leader.
+   * 
+ * + * int32 leader_index = 3; + * + * @return The leaderIndex. + */ + int getLeaderIndex(); + + /** + * + * + *
+   * `generation` indicates the freshness of the group information (including
+   * leader information) contained in this proto. Generations can be compared
+   * lexicographically; if generation A is greater than generation B, then the
+   * `Group` corresponding to A is newer than the `Group` corresponding to B,
+   * and should be used preferentially.
+   * 
+ * + * bytes generation = 4; + * + * @return The generation. + */ + com.google.protobuf.ByteString getGeneration(); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRange.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRange.java index fd382b3a7ee..992a09ec134 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRange.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRange.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/keys.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -35,15 +36,15 @@ * * For example, consider the following table definition: * - * CREATE TABLE UserEvents ( - * UserName STRING(MAX), - * EventDate STRING(10) - * ) PRIMARY KEY(UserName, EventDate); + * CREATE TABLE UserEvents ( + * UserName STRING(MAX), + * EventDate STRING(10) + * ) PRIMARY KEY(UserName, EventDate); * * The following keys name rows in this table: * - * ["Bob", "2014-09-23"] - * ["Alfred", "2015-06-12"] + * ["Bob", "2014-09-23"] + * ["Alfred", "2015-06-12"] * * Since the `UserEvents` table's `PRIMARY KEY` clause names two * columns, each `UserEvents` key has two elements; the first is the @@ -54,8 +55,8 @@ * sort order. For example, the following range returns all events for * user `"Bob"` that occurred in the year 2015: * - * "start_closed": ["Bob", "2015-01-01"] - * "end_closed": ["Bob", "2015-12-31"] + * "start_closed": ["Bob", "2015-01-01"] + * "end_closed": ["Bob", "2015-12-31"] * * Start and end keys can omit trailing key components. This affects the * inclusion and exclusion of rows that exactly match the provided key @@ -66,48 +67,48 @@ * For example, the following range includes all events for `"Bob"` that * occurred during and after the year 2000: * - * "start_closed": ["Bob", "2000-01-01"] - * "end_closed": ["Bob"] + * "start_closed": ["Bob", "2000-01-01"] + * "end_closed": ["Bob"] * * The next example retrieves all events for `"Bob"`: * - * "start_closed": ["Bob"] - * "end_closed": ["Bob"] + * "start_closed": ["Bob"] + * "end_closed": ["Bob"] * * To retrieve events before the year 2000: * - * "start_closed": ["Bob"] - * "end_open": ["Bob", "2000-01-01"] + * "start_closed": ["Bob"] + * "end_open": ["Bob", "2000-01-01"] * * The following range includes all rows in the table: * - * "start_closed": [] - * "end_closed": [] + * "start_closed": [] + * "end_closed": [] * * This range returns all users whose `UserName` begins with any * character from A to C: * - * "start_closed": ["A"] - * "end_open": ["D"] + * "start_closed": ["A"] + * "end_open": ["D"] * * This range returns all users whose `UserName` begins with B: * - * "start_closed": ["B"] - * "end_open": ["C"] + * "start_closed": ["B"] + * "end_open": ["C"] * * Key ranges honor column sort order. For example, suppose a table is * defined as follows: * - * CREATE TABLE DescendingSortedTable { - * Key INT64, - * ... - * ) PRIMARY KEY(Key DESC); + * CREATE TABLE DescendingSortedTable { + * Key INT64, + * ... + * ) PRIMARY KEY(Key DESC); * * The following range retrieves all rows with key values between 1 * and 100 inclusive: * - * "start_closed": ["100"] - * "end_closed": ["1"] + * "start_closed": ["100"] + * "end_closed": ["1"] * * Note that 100 is passed as the start, and 1 is passed as the end, * because `Key` is a descending column in the schema. @@ -115,31 +116,36 @@ * * Protobuf type {@code google.spanner.v1.KeyRange} */ -public final class KeyRange extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class KeyRange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.KeyRange) KeyRangeOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "KeyRange"); + } + // Use KeyRange.newBuilder() to construct. - private KeyRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private KeyRange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private KeyRange() {} - @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.v1.KeysProto.internal_static_google_spanner_v1_KeyRange_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.KeysProto .internal_static_google_spanner_v1_KeyRange_fieldAccessorTable @@ -643,38 +649,38 @@ public static com.google.spanner.v1.KeyRange parseFrom( public static com.google.spanner.v1.KeyRange parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.KeyRange parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.KeyRange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.KeyRange parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.KeyRange parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.KeyRange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -697,7 +703,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -718,15 +724,15 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * For example, consider the following table definition: * - * CREATE TABLE UserEvents ( - * UserName STRING(MAX), - * EventDate STRING(10) - * ) PRIMARY KEY(UserName, EventDate); + * CREATE TABLE UserEvents ( + * UserName STRING(MAX), + * EventDate STRING(10) + * ) PRIMARY KEY(UserName, EventDate); * * The following keys name rows in this table: * - * ["Bob", "2014-09-23"] - * ["Alfred", "2015-06-12"] + * ["Bob", "2014-09-23"] + * ["Alfred", "2015-06-12"] * * Since the `UserEvents` table's `PRIMARY KEY` clause names two * columns, each `UserEvents` key has two elements; the first is the @@ -737,8 +743,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * sort order. For example, the following range returns all events for * user `"Bob"` that occurred in the year 2015: * - * "start_closed": ["Bob", "2015-01-01"] - * "end_closed": ["Bob", "2015-12-31"] + * "start_closed": ["Bob", "2015-01-01"] + * "end_closed": ["Bob", "2015-12-31"] * * Start and end keys can omit trailing key components. This affects the * inclusion and exclusion of rows that exactly match the provided key @@ -749,48 +755,48 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * For example, the following range includes all events for `"Bob"` that * occurred during and after the year 2000: * - * "start_closed": ["Bob", "2000-01-01"] - * "end_closed": ["Bob"] + * "start_closed": ["Bob", "2000-01-01"] + * "end_closed": ["Bob"] * * The next example retrieves all events for `"Bob"`: * - * "start_closed": ["Bob"] - * "end_closed": ["Bob"] + * "start_closed": ["Bob"] + * "end_closed": ["Bob"] * * To retrieve events before the year 2000: * - * "start_closed": ["Bob"] - * "end_open": ["Bob", "2000-01-01"] + * "start_closed": ["Bob"] + * "end_open": ["Bob", "2000-01-01"] * * The following range includes all rows in the table: * - * "start_closed": [] - * "end_closed": [] + * "start_closed": [] + * "end_closed": [] * * This range returns all users whose `UserName` begins with any * character from A to C: * - * "start_closed": ["A"] - * "end_open": ["D"] + * "start_closed": ["A"] + * "end_open": ["D"] * * This range returns all users whose `UserName` begins with B: * - * "start_closed": ["B"] - * "end_open": ["C"] + * "start_closed": ["B"] + * "end_open": ["C"] * * Key ranges honor column sort order. For example, suppose a table is * defined as follows: * - * CREATE TABLE DescendingSortedTable { - * Key INT64, - * ... - * ) PRIMARY KEY(Key DESC); + * CREATE TABLE DescendingSortedTable { + * Key INT64, + * ... + * ) PRIMARY KEY(Key DESC); * * The following range retrieves all rows with key values between 1 * and 100 inclusive: * - * "start_closed": ["100"] - * "end_closed": ["1"] + * "start_closed": ["100"] + * "end_closed": ["1"] * * Note that 100 is passed as the start, and 1 is passed as the end, * because `Key` is a descending column in the schema. @@ -798,7 +804,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.KeyRange} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.KeyRange) com.google.spanner.v1.KeyRangeOrBuilder { @@ -807,7 +813,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.KeysProto .internal_static_google_spanner_v1_KeyRange_fieldAccessorTable @@ -818,7 +824,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.KeyRange.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -898,39 +904,6 @@ private void buildPartialOneofs(com.google.spanner.v1.KeyRange result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.KeyRange) { @@ -1003,25 +976,28 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getStartClosedFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartClosedFieldBuilder().getBuilder(), extensionRegistry); startKeyTypeCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getStartOpenFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartOpenFieldBuilder().getBuilder(), extensionRegistry); startKeyTypeCase_ = 2; break; } // case 18 case 26: { - input.readMessage(getEndClosedFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetEndClosedFieldBuilder().getBuilder(), extensionRegistry); endKeyTypeCase_ = 3; break; } // case 26 case 34: { - input.readMessage(getEndOpenFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndOpenFieldBuilder().getBuilder(), extensionRegistry); endKeyTypeCase_ = 4; break; } // case 34 @@ -1072,7 +1048,7 @@ public Builder clearEndKeyType() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> @@ -1239,7 +1215,7 @@ public Builder clearStartClosed() { * .google.protobuf.ListValue start_closed = 1; */ public com.google.protobuf.ListValue.Builder getStartClosedBuilder() { - return getStartClosedFieldBuilder().getBuilder(); + return internalGetStartClosedFieldBuilder().getBuilder(); } /** @@ -1274,17 +1250,17 @@ public com.google.protobuf.ListValueOrBuilder getStartClosedOrBuilder() { * * .google.protobuf.ListValue start_closed = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> - getStartClosedFieldBuilder() { + internalGetStartClosedFieldBuilder() { if (startClosedBuilder_ == null) { if (!(startKeyTypeCase_ == 1)) { startKeyType_ = com.google.protobuf.ListValue.getDefaultInstance(); } startClosedBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder>( @@ -1296,7 +1272,7 @@ public com.google.protobuf.ListValueOrBuilder getStartClosedOrBuilder() { return startClosedBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> @@ -1463,7 +1439,7 @@ public Builder clearStartOpen() { * .google.protobuf.ListValue start_open = 2; */ public com.google.protobuf.ListValue.Builder getStartOpenBuilder() { - return getStartOpenFieldBuilder().getBuilder(); + return internalGetStartOpenFieldBuilder().getBuilder(); } /** @@ -1498,17 +1474,17 @@ public com.google.protobuf.ListValueOrBuilder getStartOpenOrBuilder() { * * .google.protobuf.ListValue start_open = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> - getStartOpenFieldBuilder() { + internalGetStartOpenFieldBuilder() { if (startOpenBuilder_ == null) { if (!(startKeyTypeCase_ == 2)) { startKeyType_ = com.google.protobuf.ListValue.getDefaultInstance(); } startOpenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder>( @@ -1520,7 +1496,7 @@ public com.google.protobuf.ListValueOrBuilder getStartOpenOrBuilder() { return startOpenBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> @@ -1686,7 +1662,7 @@ public Builder clearEndClosed() { * .google.protobuf.ListValue end_closed = 3; */ public com.google.protobuf.ListValue.Builder getEndClosedBuilder() { - return getEndClosedFieldBuilder().getBuilder(); + return internalGetEndClosedFieldBuilder().getBuilder(); } /** @@ -1721,17 +1697,17 @@ public com.google.protobuf.ListValueOrBuilder getEndClosedOrBuilder() { * * .google.protobuf.ListValue end_closed = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> - getEndClosedFieldBuilder() { + internalGetEndClosedFieldBuilder() { if (endClosedBuilder_ == null) { if (!(endKeyTypeCase_ == 3)) { endKeyType_ = com.google.protobuf.ListValue.getDefaultInstance(); } endClosedBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder>( @@ -1743,7 +1719,7 @@ public com.google.protobuf.ListValueOrBuilder getEndClosedOrBuilder() { return endClosedBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> @@ -1909,7 +1885,7 @@ public Builder clearEndOpen() { * .google.protobuf.ListValue end_open = 4; */ public com.google.protobuf.ListValue.Builder getEndOpenBuilder() { - return getEndOpenFieldBuilder().getBuilder(); + return internalGetEndOpenFieldBuilder().getBuilder(); } /** @@ -1944,17 +1920,17 @@ public com.google.protobuf.ListValueOrBuilder getEndOpenOrBuilder() { * * .google.protobuf.ListValue end_open = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> - getEndOpenFieldBuilder() { + internalGetEndOpenFieldBuilder() { if (endOpenBuilder_ == null) { if (!(endKeyTypeCase_ == 4)) { endKeyType_ = com.google.protobuf.ListValue.getDefaultInstance(); } endOpenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder>( @@ -1966,17 +1942,6 @@ public com.google.protobuf.ListValueOrBuilder getEndOpenOrBuilder() { return endOpenBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.KeyRange) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRangeOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRangeOrBuilder.java index feab2ddf47a..ede28888030 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRangeOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRangeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/keys.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface KeyRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.KeyRange) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRecipe.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRecipe.java new file mode 100644 index 00000000000..b6723d35963 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRecipe.java @@ -0,0 +1,4400 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +/** + * + * + *
+ * A `KeyRecipe` provides the metadata required to translate reads, mutations,
+ * and queries into a byte array in "sortable string format" (ssformat)that can
+ * be used with `Range`s to route requests. Note that the client *must* tolerate
+ * `KeyRecipe`s that appear to be invalid, since the `KeyRecipe` format may
+ * change over time. Requests with invalid `KeyRecipe`s should be routed to a
+ * default server.
+ * 
+ * + * Protobuf type {@code google.spanner.v1.KeyRecipe} + */ +@com.google.protobuf.Generated +public final class KeyRecipe extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.KeyRecipe) + KeyRecipeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "KeyRecipe"); + } + + // Use KeyRecipe.newBuilder() to construct. + private KeyRecipe(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private KeyRecipe() { + part_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.KeyRecipe.class, com.google.spanner.v1.KeyRecipe.Builder.class); + } + + public interface PartOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.KeyRecipe.Part) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If non-zero, `tag` is the only field present in this `Part`. The part
+     * is encoded by appending `tag` to the ssformat key.
+     * 
+ * + * uint32 tag = 1; + * + * @return The tag. + */ + int getTag(); + + /** + * + * + *
+     * Whether the key column is sorted ascending or descending. Only present
+     * if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.KeyRecipe.Part.Order order = 2; + * + * @return The enum numeric value on the wire for order. + */ + int getOrderValue(); + + /** + * + * + *
+     * Whether the key column is sorted ascending or descending. Only present
+     * if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.KeyRecipe.Part.Order order = 2; + * + * @return The order. + */ + com.google.spanner.v1.KeyRecipe.Part.Order getOrder(); + + /** + * + * + *
+     * How NULLs are represented in the encoded key part. Only present if `tag`
+     * is zero.
+     * 
+ * + * .google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3; + * + * @return The enum numeric value on the wire for nullOrder. + */ + int getNullOrderValue(); + + /** + * + * + *
+     * How NULLs are represented in the encoded key part. Only present if `tag`
+     * is zero.
+     * 
+ * + * .google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3; + * + * @return The nullOrder. + */ + com.google.spanner.v1.KeyRecipe.Part.NullOrder getNullOrder(); + + /** + * + * + *
+     * The type of the key part. Only present if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.Type type = 4; + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
+     * The type of the key part. Only present if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.Type type = 4; + * + * @return The type. + */ + com.google.spanner.v1.Type getType(); + + /** + * + * + *
+     * The type of the key part. Only present if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.Type type = 4; + */ + com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder(); + + /** + * + * + *
+     * `identifier` is the name of the column or query parameter.
+     * 
+ * + * string identifier = 5; + * + * @return Whether the identifier field is set. + */ + boolean hasIdentifier(); + + /** + * + * + *
+     * `identifier` is the name of the column or query parameter.
+     * 
+ * + * string identifier = 5; + * + * @return The identifier. + */ + java.lang.String getIdentifier(); + + /** + * + * + *
+     * `identifier` is the name of the column or query parameter.
+     * 
+ * + * string identifier = 5; + * + * @return The bytes for identifier. + */ + com.google.protobuf.ByteString getIdentifierBytes(); + + /** + * + * + *
+     * The constant value of the key part.
+     * It is present when query uses a constant as a part of the key.
+     * 
+ * + * .google.protobuf.Value value = 6; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + + /** + * + * + *
+     * The constant value of the key part.
+     * It is present when query uses a constant as a part of the key.
+     * 
+ * + * .google.protobuf.Value value = 6; + * + * @return The value. + */ + com.google.protobuf.Value getValue(); + + /** + * + * + *
+     * The constant value of the key part.
+     * It is present when query uses a constant as a part of the key.
+     * 
+ * + * .google.protobuf.Value value = 6; + */ + com.google.protobuf.ValueOrBuilder getValueOrBuilder(); + + /** + * + * + *
+     * If true, the client is responsible to fill in the value randomly.
+     * It's relevant only for the INT64 type.
+     * 
+ * + * bool random = 8; + * + * @return Whether the random field is set. + */ + boolean hasRandom(); + + /** + * + * + *
+     * If true, the client is responsible to fill in the value randomly.
+     * It's relevant only for the INT64 type.
+     * 
+ * + * bool random = 8; + * + * @return The random. + */ + boolean getRandom(); + + /** + * + * + *
+     * It is a repeated field to support fetching key columns from nested
+     * structs, such as `STRUCT` query parameters.
+     * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @return A list containing the structIdentifiers. + */ + java.util.List getStructIdentifiersList(); + + /** + * + * + *
+     * It is a repeated field to support fetching key columns from nested
+     * structs, such as `STRUCT` query parameters.
+     * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @return The count of structIdentifiers. + */ + int getStructIdentifiersCount(); + + /** + * + * + *
+     * It is a repeated field to support fetching key columns from nested
+     * structs, such as `STRUCT` query parameters.
+     * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @param index The index of the element to return. + * @return The structIdentifiers at the given index. + */ + int getStructIdentifiers(int index); + + com.google.spanner.v1.KeyRecipe.Part.ValueTypeCase getValueTypeCase(); + } + + /** + * + * + *
+   * An ssformat key is composed of a sequence of tag numbers and key column
+   * values. `Part` represents a single tag or key column value.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.KeyRecipe.Part} + */ + public static final class Part extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.KeyRecipe.Part) + PartOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Part"); + } + + // Use Part.newBuilder() to construct. + private Part(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Part() { + order_ = 0; + nullOrder_ = 0; + structIdentifiers_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_Part_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_Part_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.KeyRecipe.Part.class, + com.google.spanner.v1.KeyRecipe.Part.Builder.class); + } + + /** + * + * + *
+     * The remaining fields encode column values.
+     * 
+ * + * Protobuf enum {@code google.spanner.v1.KeyRecipe.Part.Order} + */ + public enum Order implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value, equivalent to `ASCENDING`.
+       * 
+ * + * ORDER_UNSPECIFIED = 0; + */ + ORDER_UNSPECIFIED(0), + /** + * + * + *
+       * The key is ascending - corresponds to `ASC` in the schema definition.
+       * 
+ * + * ASCENDING = 1; + */ + ASCENDING(1), + /** + * + * + *
+       * The key is descending - corresponds to `DESC` in the schema definition.
+       * 
+ * + * DESCENDING = 2; + */ + DESCENDING(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Order"); + } + + /** + * + * + *
+       * Default value, equivalent to `ASCENDING`.
+       * 
+ * + * ORDER_UNSPECIFIED = 0; + */ + public static final int ORDER_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The key is ascending - corresponds to `ASC` in the schema definition.
+       * 
+ * + * ASCENDING = 1; + */ + public static final int ASCENDING_VALUE = 1; + + /** + * + * + *
+       * The key is descending - corresponds to `DESC` in the schema definition.
+       * 
+ * + * DESCENDING = 2; + */ + public static final int DESCENDING_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 Order 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 Order forNumber(int value) { + switch (value) { + case 0: + return ORDER_UNSPECIFIED; + case 1: + return ASCENDING; + case 2: + return DESCENDING; + 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 Order findValueByNumber(int number) { + return Order.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.spanner.v1.KeyRecipe.Part.getDescriptor().getEnumTypes().get(0); + } + + private static final Order[] VALUES = values(); + + public static Order 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 Order(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.spanner.v1.KeyRecipe.Part.Order) + } + + /** + * + * + *
+     * The null order of the key column. This dictates where NULL values sort
+     * in the sorted order. Note that columns which are `NOT NULL` can have a
+     * special encoding.
+     * 
+ * + * Protobuf enum {@code google.spanner.v1.KeyRecipe.Part.NullOrder} + */ + public enum NullOrder implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value. This value is unused.
+       * 
+ * + * NULL_ORDER_UNSPECIFIED = 0; + */ + NULL_ORDER_UNSPECIFIED(0), + /** + * + * + *
+       * NULL values sort before any non-NULL values.
+       * 
+ * + * NULLS_FIRST = 1; + */ + NULLS_FIRST(1), + /** + * + * + *
+       * NULL values sort after any non-NULL values.
+       * 
+ * + * NULLS_LAST = 2; + */ + NULLS_LAST(2), + /** + * + * + *
+       * The column does not support NULL values.
+       * 
+ * + * NOT_NULL = 3; + */ + NOT_NULL(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NullOrder"); + } + + /** + * + * + *
+       * Default value. This value is unused.
+       * 
+ * + * NULL_ORDER_UNSPECIFIED = 0; + */ + public static final int NULL_ORDER_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * NULL values sort before any non-NULL values.
+       * 
+ * + * NULLS_FIRST = 1; + */ + public static final int NULLS_FIRST_VALUE = 1; + + /** + * + * + *
+       * NULL values sort after any non-NULL values.
+       * 
+ * + * NULLS_LAST = 2; + */ + public static final int NULLS_LAST_VALUE = 2; + + /** + * + * + *
+       * The column does not support NULL values.
+       * 
+ * + * NOT_NULL = 3; + */ + public static final int NOT_NULL_VALUE = 3; + + 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 NullOrder 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 NullOrder forNumber(int value) { + switch (value) { + case 0: + return NULL_ORDER_UNSPECIFIED; + case 1: + return NULLS_FIRST; + case 2: + return NULLS_LAST; + case 3: + return NOT_NULL; + 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 NullOrder findValueByNumber(int number) { + return NullOrder.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.spanner.v1.KeyRecipe.Part.getDescriptor().getEnumTypes().get(1); + } + + private static final NullOrder[] VALUES = values(); + + public static NullOrder 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 NullOrder(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.spanner.v1.KeyRecipe.Part.NullOrder) + } + + 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 { + IDENTIFIER(5), + VALUE(6), + RANDOM(8), + 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 5: + return IDENTIFIER; + case 6: + return VALUE; + case 8: + return RANDOM; + 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 TAG_FIELD_NUMBER = 1; + private int tag_ = 0; + + /** + * + * + *
+     * If non-zero, `tag` is the only field present in this `Part`. The part
+     * is encoded by appending `tag` to the ssformat key.
+     * 
+ * + * uint32 tag = 1; + * + * @return The tag. + */ + @java.lang.Override + public int getTag() { + return tag_; + } + + public static final int ORDER_FIELD_NUMBER = 2; + private int order_ = 0; + + /** + * + * + *
+     * Whether the key column is sorted ascending or descending. Only present
+     * if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.KeyRecipe.Part.Order order = 2; + * + * @return The enum numeric value on the wire for order. + */ + @java.lang.Override + public int getOrderValue() { + return order_; + } + + /** + * + * + *
+     * Whether the key column is sorted ascending or descending. Only present
+     * if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.KeyRecipe.Part.Order order = 2; + * + * @return The order. + */ + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.Part.Order getOrder() { + com.google.spanner.v1.KeyRecipe.Part.Order result = + com.google.spanner.v1.KeyRecipe.Part.Order.forNumber(order_); + return result == null ? com.google.spanner.v1.KeyRecipe.Part.Order.UNRECOGNIZED : result; + } + + public static final int NULL_ORDER_FIELD_NUMBER = 3; + private int nullOrder_ = 0; + + /** + * + * + *
+     * How NULLs are represented in the encoded key part. Only present if `tag`
+     * is zero.
+     * 
+ * + * .google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3; + * + * @return The enum numeric value on the wire for nullOrder. + */ + @java.lang.Override + public int getNullOrderValue() { + return nullOrder_; + } + + /** + * + * + *
+     * How NULLs are represented in the encoded key part. Only present if `tag`
+     * is zero.
+     * 
+ * + * .google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3; + * + * @return The nullOrder. + */ + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.Part.NullOrder getNullOrder() { + com.google.spanner.v1.KeyRecipe.Part.NullOrder result = + com.google.spanner.v1.KeyRecipe.Part.NullOrder.forNumber(nullOrder_); + return result == null ? com.google.spanner.v1.KeyRecipe.Part.NullOrder.UNRECOGNIZED : result; + } + + public static final int TYPE_FIELD_NUMBER = 4; + private com.google.spanner.v1.Type type_; + + /** + * + * + *
+     * The type of the key part. Only present if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.Type type = 4; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The type of the key part. Only present if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.Type type = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.spanner.v1.Type getType() { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } + + /** + * + * + *
+     * The type of the key part. Only present if `tag` is zero.
+     * 
+ * + * .google.spanner.v1.Type type = 4; + */ + @java.lang.Override + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } + + public static final int IDENTIFIER_FIELD_NUMBER = 5; + + /** + * + * + *
+     * `identifier` is the name of the column or query parameter.
+     * 
+ * + * string identifier = 5; + * + * @return Whether the identifier field is set. + */ + public boolean hasIdentifier() { + return valueTypeCase_ == 5; + } + + /** + * + * + *
+     * `identifier` is the name of the column or query parameter.
+     * 
+ * + * string identifier = 5; + * + * @return The identifier. + */ + public java.lang.String getIdentifier() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 5) { + 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_ == 5) { + valueType_ = s; + } + return s; + } + } + + /** + * + * + *
+     * `identifier` is the name of the column or query parameter.
+     * 
+ * + * string identifier = 5; + * + * @return The bytes for identifier. + */ + public com.google.protobuf.ByteString getIdentifierBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 5) { + ref = valueType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueTypeCase_ == 5) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 6; + + /** + * + * + *
+     * The constant value of the key part.
+     * It is present when query uses a constant as a part of the key.
+     * 
+ * + * .google.protobuf.Value value = 6; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return valueTypeCase_ == 6; + } + + /** + * + * + *
+     * The constant value of the key part.
+     * It is present when query uses a constant as a part of the key.
+     * 
+ * + * .google.protobuf.Value value = 6; + * + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.Value getValue() { + if (valueTypeCase_ == 6) { + return (com.google.protobuf.Value) valueType_; + } + return com.google.protobuf.Value.getDefaultInstance(); + } + + /** + * + * + *
+     * The constant value of the key part.
+     * It is present when query uses a constant as a part of the key.
+     * 
+ * + * .google.protobuf.Value value = 6; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { + if (valueTypeCase_ == 6) { + return (com.google.protobuf.Value) valueType_; + } + return com.google.protobuf.Value.getDefaultInstance(); + } + + public static final int RANDOM_FIELD_NUMBER = 8; + + /** + * + * + *
+     * If true, the client is responsible to fill in the value randomly.
+     * It's relevant only for the INT64 type.
+     * 
+ * + * bool random = 8; + * + * @return Whether the random field is set. + */ + @java.lang.Override + public boolean hasRandom() { + return valueTypeCase_ == 8; + } + + /** + * + * + *
+     * If true, the client is responsible to fill in the value randomly.
+     * It's relevant only for the INT64 type.
+     * 
+ * + * bool random = 8; + * + * @return The random. + */ + @java.lang.Override + public boolean getRandom() { + if (valueTypeCase_ == 8) { + return (java.lang.Boolean) valueType_; + } + return false; + } + + public static final int STRUCT_IDENTIFIERS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList structIdentifiers_ = emptyIntList(); + + /** + * + * + *
+     * It is a repeated field to support fetching key columns from nested
+     * structs, such as `STRUCT` query parameters.
+     * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @return A list containing the structIdentifiers. + */ + @java.lang.Override + public java.util.List getStructIdentifiersList() { + return structIdentifiers_; + } + + /** + * + * + *
+     * It is a repeated field to support fetching key columns from nested
+     * structs, such as `STRUCT` query parameters.
+     * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @return The count of structIdentifiers. + */ + public int getStructIdentifiersCount() { + return structIdentifiers_.size(); + } + + /** + * + * + *
+     * It is a repeated field to support fetching key columns from nested
+     * structs, such as `STRUCT` query parameters.
+     * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @param index The index of the element to return. + * @return The structIdentifiers at the given index. + */ + public int getStructIdentifiers(int index) { + return structIdentifiers_.getInt(index); + } + + private int structIdentifiersMemoizedSerializedSize = -1; + + 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 (tag_ != 0) { + output.writeUInt32(1, tag_); + } + if (order_ != com.google.spanner.v1.KeyRecipe.Part.Order.ORDER_UNSPECIFIED.getNumber()) { + output.writeEnum(2, order_); + } + if (nullOrder_ + != com.google.spanner.v1.KeyRecipe.Part.NullOrder.NULL_ORDER_UNSPECIFIED.getNumber()) { + output.writeEnum(3, nullOrder_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getType()); + } + if (valueTypeCase_ == 5) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, valueType_); + } + if (valueTypeCase_ == 6) { + output.writeMessage(6, (com.google.protobuf.Value) valueType_); + } + if (getStructIdentifiersList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(structIdentifiersMemoizedSerializedSize); + } + for (int i = 0; i < structIdentifiers_.size(); i++) { + output.writeInt32NoTag(structIdentifiers_.getInt(i)); + } + if (valueTypeCase_ == 8) { + output.writeBool(8, (boolean) ((java.lang.Boolean) valueType_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tag_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, tag_); + } + if (order_ != com.google.spanner.v1.KeyRecipe.Part.Order.ORDER_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, order_); + } + if (nullOrder_ + != com.google.spanner.v1.KeyRecipe.Part.NullOrder.NULL_ORDER_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, nullOrder_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getType()); + } + if (valueTypeCase_ == 5) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, valueType_); + } + if (valueTypeCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.protobuf.Value) valueType_); + } + { + int dataSize = 0; + for (int i = 0; i < structIdentifiers_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag( + structIdentifiers_.getInt(i)); + } + size += dataSize; + if (!getStructIdentifiersList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + structIdentifiersMemoizedSerializedSize = dataSize; + } + if (valueTypeCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 8, (boolean) ((java.lang.Boolean) valueType_)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.KeyRecipe.Part)) { + return super.equals(obj); + } + com.google.spanner.v1.KeyRecipe.Part other = (com.google.spanner.v1.KeyRecipe.Part) obj; + + if (getTag() != other.getTag()) return false; + if (order_ != other.order_) return false; + if (nullOrder_ != other.nullOrder_) return false; + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (!getStructIdentifiersList().equals(other.getStructIdentifiersList())) return false; + if (!getValueTypeCase().equals(other.getValueTypeCase())) return false; + switch (valueTypeCase_) { + case 5: + if (!getIdentifier().equals(other.getIdentifier())) return false; + break; + case 6: + if (!getValue().equals(other.getValue())) return false; + break; + case 8: + if (getRandom() != other.getRandom()) 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) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag(); + hash = (37 * hash) + ORDER_FIELD_NUMBER; + hash = (53 * hash) + order_; + hash = (37 * hash) + NULL_ORDER_FIELD_NUMBER; + hash = (53 * hash) + nullOrder_; + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + if (getStructIdentifiersCount() > 0) { + hash = (37 * hash) + STRUCT_IDENTIFIERS_FIELD_NUMBER; + hash = (53 * hash) + getStructIdentifiersList().hashCode(); + } + switch (valueTypeCase_) { + case 5: + hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getIdentifier().hashCode(); + break; + case 6: + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + break; + case 8: + hash = (37 * hash) + RANDOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRandom()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.KeyRecipe.Part parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.KeyRecipe.Part 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * An ssformat key is composed of a sequence of tag numbers and key column
+     * values. `Part` represents a single tag or key column value.
+     * 
+ * + * Protobuf type {@code google.spanner.v1.KeyRecipe.Part} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.KeyRecipe.Part) + com.google.spanner.v1.KeyRecipe.PartOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_Part_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_Part_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.KeyRecipe.Part.class, + com.google.spanner.v1.KeyRecipe.Part.Builder.class); + } + + // Construct using com.google.spanner.v1.KeyRecipe.Part.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tag_ = 0; + order_ = 0; + nullOrder_ = 0; + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + if (valueBuilder_ != null) { + valueBuilder_.clear(); + } + structIdentifiers_ = emptyIntList(); + valueTypeCase_ = 0; + valueType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_Part_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.Part getDefaultInstanceForType() { + return com.google.spanner.v1.KeyRecipe.Part.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.Part build() { + com.google.spanner.v1.KeyRecipe.Part result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.Part buildPartial() { + com.google.spanner.v1.KeyRecipe.Part result = + new com.google.spanner.v1.KeyRecipe.Part(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.v1.KeyRecipe.Part result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tag_ = tag_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.order_ = order_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nullOrder_ = nullOrder_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + structIdentifiers_.makeImmutable(); + result.structIdentifiers_ = structIdentifiers_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.spanner.v1.KeyRecipe.Part result) { + result.valueTypeCase_ = valueTypeCase_; + result.valueType_ = this.valueType_; + if (valueTypeCase_ == 6 && valueBuilder_ != null) { + result.valueType_ = valueBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.KeyRecipe.Part) { + return mergeFrom((com.google.spanner.v1.KeyRecipe.Part) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.KeyRecipe.Part other) { + if (other == com.google.spanner.v1.KeyRecipe.Part.getDefaultInstance()) return this; + if (other.getTag() != 0) { + setTag(other.getTag()); + } + if (other.order_ != 0) { + setOrderValue(other.getOrderValue()); + } + if (other.nullOrder_ != 0) { + setNullOrderValue(other.getNullOrderValue()); + } + if (other.hasType()) { + mergeType(other.getType()); + } + if (!other.structIdentifiers_.isEmpty()) { + if (structIdentifiers_.isEmpty()) { + structIdentifiers_ = other.structIdentifiers_; + structIdentifiers_.makeImmutable(); + bitField0_ |= 0x00000080; + } else { + ensureStructIdentifiersIsMutable(); + structIdentifiers_.addAll(other.structIdentifiers_); + } + onChanged(); + } + switch (other.getValueTypeCase()) { + case IDENTIFIER: + { + valueTypeCase_ = 5; + valueType_ = other.valueType_; + onChanged(); + break; + } + case VALUE: + { + mergeValue(other.getValue()); + break; + } + case RANDOM: + { + setRandom(other.getRandom()); + 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: + { + tag_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + order_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + nullOrder_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage(internalGetTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + valueTypeCase_ = 5; + valueType_ = s; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 6; + break; + } // case 50 + case 56: + { + int v = input.readInt32(); + ensureStructIdentifiersIsMutable(); + structIdentifiers_.addInt(v); + break; + } // case 56 + case 58: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureStructIdentifiersIsMutable(); + while (input.getBytesUntilLimit() > 0) { + structIdentifiers_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 58 + case 64: + { + valueType_ = input.readBool(); + valueTypeCase_ = 8; + break; + } // case 64 + 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_; + + private int tag_; + + /** + * + * + *
+       * If non-zero, `tag` is the only field present in this `Part`. The part
+       * is encoded by appending `tag` to the ssformat key.
+       * 
+ * + * uint32 tag = 1; + * + * @return The tag. + */ + @java.lang.Override + public int getTag() { + return tag_; + } + + /** + * + * + *
+       * If non-zero, `tag` is the only field present in this `Part`. The part
+       * is encoded by appending `tag` to the ssformat key.
+       * 
+ * + * uint32 tag = 1; + * + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag(int value) { + + tag_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * If non-zero, `tag` is the only field present in this `Part`. The part
+       * is encoded by appending `tag` to the ssformat key.
+       * 
+ * + * uint32 tag = 1; + * + * @return This builder for chaining. + */ + public Builder clearTag() { + bitField0_ = (bitField0_ & ~0x00000001); + tag_ = 0; + onChanged(); + return this; + } + + private int order_ = 0; + + /** + * + * + *
+       * Whether the key column is sorted ascending or descending. Only present
+       * if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.Order order = 2; + * + * @return The enum numeric value on the wire for order. + */ + @java.lang.Override + public int getOrderValue() { + return order_; + } + + /** + * + * + *
+       * Whether the key column is sorted ascending or descending. Only present
+       * if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.Order order = 2; + * + * @param value The enum numeric value on the wire for order to set. + * @return This builder for chaining. + */ + public Builder setOrderValue(int value) { + order_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Whether the key column is sorted ascending or descending. Only present
+       * if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.Order order = 2; + * + * @return The order. + */ + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.Part.Order getOrder() { + com.google.spanner.v1.KeyRecipe.Part.Order result = + com.google.spanner.v1.KeyRecipe.Part.Order.forNumber(order_); + return result == null ? com.google.spanner.v1.KeyRecipe.Part.Order.UNRECOGNIZED : result; + } + + /** + * + * + *
+       * Whether the key column is sorted ascending or descending. Only present
+       * if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.Order order = 2; + * + * @param value The order to set. + * @return This builder for chaining. + */ + public Builder setOrder(com.google.spanner.v1.KeyRecipe.Part.Order value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + order_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Whether the key column is sorted ascending or descending. Only present
+       * if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.Order order = 2; + * + * @return This builder for chaining. + */ + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000002); + order_ = 0; + onChanged(); + return this; + } + + private int nullOrder_ = 0; + + /** + * + * + *
+       * How NULLs are represented in the encoded key part. Only present if `tag`
+       * is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3; + * + * @return The enum numeric value on the wire for nullOrder. + */ + @java.lang.Override + public int getNullOrderValue() { + return nullOrder_; + } + + /** + * + * + *
+       * How NULLs are represented in the encoded key part. Only present if `tag`
+       * is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3; + * + * @param value The enum numeric value on the wire for nullOrder to set. + * @return This builder for chaining. + */ + public Builder setNullOrderValue(int value) { + nullOrder_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * How NULLs are represented in the encoded key part. Only present if `tag`
+       * is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3; + * + * @return The nullOrder. + */ + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.Part.NullOrder getNullOrder() { + com.google.spanner.v1.KeyRecipe.Part.NullOrder result = + com.google.spanner.v1.KeyRecipe.Part.NullOrder.forNumber(nullOrder_); + return result == null + ? com.google.spanner.v1.KeyRecipe.Part.NullOrder.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * How NULLs are represented in the encoded key part. Only present if `tag`
+       * is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3; + * + * @param value The nullOrder to set. + * @return This builder for chaining. + */ + public Builder setNullOrder(com.google.spanner.v1.KeyRecipe.Part.NullOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + nullOrder_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * How NULLs are represented in the encoded key part. Only present if `tag`
+       * is zero.
+       * 
+ * + * .google.spanner.v1.KeyRecipe.Part.NullOrder null_order = 3; + * + * @return This builder for chaining. + */ + public Builder clearNullOrder() { + bitField0_ = (bitField0_ & ~0x00000004); + nullOrder_ = 0; + onChanged(); + return this; + } + + private com.google.spanner.v1.Type type_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + typeBuilder_; + + /** + * + * + *
+       * The type of the key part. Only present if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.Type type = 4; + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * The type of the key part. Only present if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.Type type = 4; + * + * @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(); + } + } + + /** + * + * + *
+       * The type of the key part. Only present if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.Type type = 4; + */ + 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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * The type of the key part. Only present if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.Type type = 4; + */ + public Builder setType(com.google.spanner.v1.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + type_ = builderForValue.build(); + } else { + typeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * The type of the key part. Only present if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.Type type = 4; + */ + public Builder mergeType(com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && type_ != null + && type_ != com.google.spanner.v1.Type.getDefaultInstance()) { + getTypeBuilder().mergeFrom(value); + } else { + type_ = value; + } + } else { + typeBuilder_.mergeFrom(value); + } + if (type_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The type of the key part. Only present if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.Type type = 4; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * The type of the key part. Only present if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.Type type = 4; + */ + public com.google.spanner.v1.Type.Builder getTypeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * The type of the key part. Only present if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.Type type = 4; + */ + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilder(); + } else { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } + } + + /** + * + * + *
+       * The type of the key part. Only present if `tag` is zero.
+       * 
+ * + * .google.spanner.v1.Type type = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + internalGetTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder>( + getType(), getParentForChildren(), isClean()); + type_ = null; + } + return typeBuilder_; + } + + /** + * + * + *
+       * `identifier` is the name of the column or query parameter.
+       * 
+ * + * string identifier = 5; + * + * @return Whether the identifier field is set. + */ + @java.lang.Override + public boolean hasIdentifier() { + return valueTypeCase_ == 5; + } + + /** + * + * + *
+       * `identifier` is the name of the column or query parameter.
+       * 
+ * + * string identifier = 5; + * + * @return The identifier. + */ + @java.lang.Override + public java.lang.String getIdentifier() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 5) { + 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_ == 5) { + valueType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * `identifier` is the name of the column or query parameter.
+       * 
+ * + * string identifier = 5; + * + * @return The bytes for identifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentifierBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 5) { + ref = valueType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueTypeCase_ == 5) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * `identifier` is the name of the column or query parameter.
+       * 
+ * + * string identifier = 5; + * + * @param value The identifier to set. + * @return This builder for chaining. + */ + public Builder setIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 5; + valueType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * `identifier` is the name of the column or query parameter.
+       * 
+ * + * string identifier = 5; + * + * @return This builder for chaining. + */ + public Builder clearIdentifier() { + if (valueTypeCase_ == 5) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * `identifier` is the name of the column or query parameter.
+       * 
+ * + * string identifier = 5; + * + * @param value The bytes for identifier to set. + * @return This builder for chaining. + */ + public Builder setIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueTypeCase_ = 5; + valueType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + valueBuilder_; + + /** + * + * + *
+       * The constant value of the key part.
+       * It is present when query uses a constant as a part of the key.
+       * 
+ * + * .google.protobuf.Value value = 6; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return valueTypeCase_ == 6; + } + + /** + * + * + *
+       * The constant value of the key part.
+       * It is present when query uses a constant as a part of the key.
+       * 
+ * + * .google.protobuf.Value value = 6; + * + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.Value getValue() { + if (valueBuilder_ == null) { + if (valueTypeCase_ == 6) { + return (com.google.protobuf.Value) valueType_; + } + return com.google.protobuf.Value.getDefaultInstance(); + } else { + if (valueTypeCase_ == 6) { + return valueBuilder_.getMessage(); + } + return com.google.protobuf.Value.getDefaultInstance(); + } + } + + /** + * + * + *
+       * The constant value of the key part.
+       * It is present when query uses a constant as a part of the key.
+       * 
+ * + * .google.protobuf.Value value = 6; + */ + public Builder setValue(com.google.protobuf.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + valueTypeCase_ = 6; + return this; + } + + /** + * + * + *
+       * The constant value of the key part.
+       * It is present when query uses a constant as a part of the key.
+       * 
+ * + * .google.protobuf.Value value = 6; + */ + public Builder setValue(com.google.protobuf.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 6; + return this; + } + + /** + * + * + *
+       * The constant value of the key part.
+       * It is present when query uses a constant as a part of the key.
+       * 
+ * + * .google.protobuf.Value value = 6; + */ + public Builder mergeValue(com.google.protobuf.Value value) { + if (valueBuilder_ == null) { + if (valueTypeCase_ == 6 && valueType_ != com.google.protobuf.Value.getDefaultInstance()) { + valueType_ = + com.google.protobuf.Value.newBuilder((com.google.protobuf.Value) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 6) { + valueBuilder_.mergeFrom(value); + } else { + valueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 6; + return this; + } + + /** + * + * + *
+       * The constant value of the key part.
+       * It is present when query uses a constant as a part of the key.
+       * 
+ * + * .google.protobuf.Value value = 6; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + if (valueTypeCase_ == 6) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 6) { + valueTypeCase_ = 0; + valueType_ = null; + } + valueBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * The constant value of the key part.
+       * It is present when query uses a constant as a part of the key.
+       * 
+ * + * .google.protobuf.Value value = 6; + */ + public com.google.protobuf.Value.Builder getValueBuilder() { + return internalGetValueFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * The constant value of the key part.
+       * It is present when query uses a constant as a part of the key.
+       * 
+ * + * .google.protobuf.Value value = 6; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { + if ((valueTypeCase_ == 6) && (valueBuilder_ != null)) { + return valueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 6) { + return (com.google.protobuf.Value) valueType_; + } + return com.google.protobuf.Value.getDefaultInstance(); + } + } + + /** + * + * + *
+       * The constant value of the key part.
+       * It is present when query uses a constant as a part of the key.
+       * 
+ * + * .google.protobuf.Value value = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + internalGetValueFieldBuilder() { + if (valueBuilder_ == null) { + if (!(valueTypeCase_ == 6)) { + valueType_ = com.google.protobuf.Value.getDefaultInstance(); + } + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + (com.google.protobuf.Value) valueType_, getParentForChildren(), isClean()); + valueType_ = null; + } + valueTypeCase_ = 6; + onChanged(); + return valueBuilder_; + } + + /** + * + * + *
+       * If true, the client is responsible to fill in the value randomly.
+       * It's relevant only for the INT64 type.
+       * 
+ * + * bool random = 8; + * + * @return Whether the random field is set. + */ + public boolean hasRandom() { + return valueTypeCase_ == 8; + } + + /** + * + * + *
+       * If true, the client is responsible to fill in the value randomly.
+       * It's relevant only for the INT64 type.
+       * 
+ * + * bool random = 8; + * + * @return The random. + */ + public boolean getRandom() { + if (valueTypeCase_ == 8) { + return (java.lang.Boolean) valueType_; + } + return false; + } + + /** + * + * + *
+       * If true, the client is responsible to fill in the value randomly.
+       * It's relevant only for the INT64 type.
+       * 
+ * + * bool random = 8; + * + * @param value The random to set. + * @return This builder for chaining. + */ + public Builder setRandom(boolean value) { + + valueTypeCase_ = 8; + valueType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * If true, the client is responsible to fill in the value randomly.
+       * It's relevant only for the INT64 type.
+       * 
+ * + * bool random = 8; + * + * @return This builder for chaining. + */ + public Builder clearRandom() { + if (valueTypeCase_ == 8) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.Internal.IntList structIdentifiers_ = emptyIntList(); + + private void ensureStructIdentifiersIsMutable() { + if (!structIdentifiers_.isModifiable()) { + structIdentifiers_ = makeMutableCopy(structIdentifiers_); + } + bitField0_ |= 0x00000080; + } + + /** + * + * + *
+       * It is a repeated field to support fetching key columns from nested
+       * structs, such as `STRUCT` query parameters.
+       * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @return A list containing the structIdentifiers. + */ + public java.util.List getStructIdentifiersList() { + structIdentifiers_.makeImmutable(); + return structIdentifiers_; + } + + /** + * + * + *
+       * It is a repeated field to support fetching key columns from nested
+       * structs, such as `STRUCT` query parameters.
+       * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @return The count of structIdentifiers. + */ + public int getStructIdentifiersCount() { + return structIdentifiers_.size(); + } + + /** + * + * + *
+       * It is a repeated field to support fetching key columns from nested
+       * structs, such as `STRUCT` query parameters.
+       * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @param index The index of the element to return. + * @return The structIdentifiers at the given index. + */ + public int getStructIdentifiers(int index) { + return structIdentifiers_.getInt(index); + } + + /** + * + * + *
+       * It is a repeated field to support fetching key columns from nested
+       * structs, such as `STRUCT` query parameters.
+       * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @param index The index to set the value at. + * @param value The structIdentifiers to set. + * @return This builder for chaining. + */ + public Builder setStructIdentifiers(int index, int value) { + + ensureStructIdentifiersIsMutable(); + structIdentifiers_.setInt(index, value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+       * It is a repeated field to support fetching key columns from nested
+       * structs, such as `STRUCT` query parameters.
+       * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @param value The structIdentifiers to add. + * @return This builder for chaining. + */ + public Builder addStructIdentifiers(int value) { + + ensureStructIdentifiersIsMutable(); + structIdentifiers_.addInt(value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+       * It is a repeated field to support fetching key columns from nested
+       * structs, such as `STRUCT` query parameters.
+       * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @param values The structIdentifiers to add. + * @return This builder for chaining. + */ + public Builder addAllStructIdentifiers( + java.lang.Iterable values) { + ensureStructIdentifiersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, structIdentifiers_); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+       * It is a repeated field to support fetching key columns from nested
+       * structs, such as `STRUCT` query parameters.
+       * 
+ * + * repeated int32 struct_identifiers = 7; + * + * @return This builder for chaining. + */ + public Builder clearStructIdentifiers() { + structIdentifiers_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.KeyRecipe.Part) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.KeyRecipe.Part) + private static final com.google.spanner.v1.KeyRecipe.Part DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.KeyRecipe.Part(); + } + + public static com.google.spanner.v1.KeyRecipe.Part getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Part parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.Part getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int targetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object target_; + + public enum TargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TABLE_NAME(1), + INDEX_NAME(2), + OPERATION_UID(3), + TARGET_NOT_SET(0); + private final int value; + + private TargetCase(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 TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 1: + return TABLE_NAME; + case 2: + return INDEX_NAME; + case 3: + return OPERATION_UID; + case 0: + return TARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public static final int TABLE_NAME_FIELD_NUMBER = 1; + + /** + * + * + *
+   * A table name, matching the name from the database schema.
+   * 
+ * + * string table_name = 1; + * + * @return Whether the tableName field is set. + */ + public boolean hasTableName() { + return targetCase_ == 1; + } + + /** + * + * + *
+   * A table name, matching the name from the database schema.
+   * 
+ * + * string table_name = 1; + * + * @return The tableName. + */ + public java.lang.String getTableName() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + 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 (targetCase_ == 1) { + target_ = s; + } + return s; + } + } + + /** + * + * + *
+   * A table name, matching the name from the database schema.
+   * 
+ * + * string table_name = 1; + * + * @return The bytes for tableName. + */ + public com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 1) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_NAME_FIELD_NUMBER = 2; + + /** + * + * + *
+   * An index name, matching the name from the database schema.
+   * 
+ * + * string index_name = 2; + * + * @return Whether the indexName field is set. + */ + public boolean hasIndexName() { + return targetCase_ == 2; + } + + /** + * + * + *
+   * An index name, matching the name from the database schema.
+   * 
+ * + * string index_name = 2; + * + * @return The indexName. + */ + public java.lang.String getIndexName() { + java.lang.Object ref = ""; + if (targetCase_ == 2) { + ref = target_; + } + 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 (targetCase_ == 2) { + target_ = s; + } + return s; + } + } + + /** + * + * + *
+   * An index name, matching the name from the database schema.
+   * 
+ * + * string index_name = 2; + * + * @return The bytes for indexName. + */ + public com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 2) { + ref = target_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 2) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPERATION_UID_FIELD_NUMBER = 3; + + /** + * + * + *
+   * The UID of a query, matching the UID from `RoutingHint`.
+   * 
+ * + * uint64 operation_uid = 3; + * + * @return Whether the operationUid field is set. + */ + @java.lang.Override + public boolean hasOperationUid() { + return targetCase_ == 3; + } + + /** + * + * + *
+   * The UID of a query, matching the UID from `RoutingHint`.
+   * 
+ * + * uint64 operation_uid = 3; + * + * @return The operationUid. + */ + @java.lang.Override + public long getOperationUid() { + if (targetCase_ == 3) { + return (java.lang.Long) target_; + } + return 0L; + } + + public static final int PART_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List part_; + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + @java.lang.Override + public java.util.List getPartList() { + return part_; + } + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + @java.lang.Override + public java.util.List + getPartOrBuilderList() { + return part_; + } + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + @java.lang.Override + public int getPartCount() { + return part_.size(); + } + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.Part getPart(int index) { + return part_.get(index); + } + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + @java.lang.Override + public com.google.spanner.v1.KeyRecipe.PartOrBuilder getPartOrBuilder(int index) { + return part_.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 (targetCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, target_); + } + if (targetCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, target_); + } + if (targetCase_ == 3) { + output.writeUInt64(3, (long) ((java.lang.Long) target_)); + } + for (int i = 0; i < part_.size(); i++) { + output.writeMessage(4, part_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, target_); + } + if (targetCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, target_); + } + if (targetCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeUInt64Size( + 3, (long) ((java.lang.Long) target_)); + } + for (int i = 0; i < part_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, part_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.KeyRecipe)) { + return super.equals(obj); + } + com.google.spanner.v1.KeyRecipe other = (com.google.spanner.v1.KeyRecipe) obj; + + if (!getPartList().equals(other.getPartList())) return false; + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 1: + if (!getTableName().equals(other.getTableName())) return false; + break; + case 2: + if (!getIndexName().equals(other.getIndexName())) return false; + break; + case 3: + if (getOperationUid() != other.getOperationUid()) 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 (getPartCount() > 0) { + hash = (37 * hash) + PART_FIELD_NUMBER; + hash = (53 * hash) + getPartList().hashCode(); + } + switch (targetCase_) { + case 1: + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + break; + case 2: + hash = (37 * hash) + INDEX_NAME_FIELD_NUMBER; + hash = (53 * hash) + getIndexName().hashCode(); + break; + case 3: + hash = (37 * hash) + OPERATION_UID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOperationUid()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.KeyRecipe parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.KeyRecipe parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.KeyRecipe parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.KeyRecipe parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.KeyRecipe parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.KeyRecipe parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.KeyRecipe parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.KeyRecipe parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.KeyRecipe 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A `KeyRecipe` provides the metadata required to translate reads, mutations,
+   * and queries into a byte array in "sortable string format" (ssformat)that can
+   * be used with `Range`s to route requests. Note that the client *must* tolerate
+   * `KeyRecipe`s that appear to be invalid, since the `KeyRecipe` format may
+   * change over time. Requests with invalid `KeyRecipe`s should be routed to a
+   * default server.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.KeyRecipe} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.KeyRecipe) + com.google.spanner.v1.KeyRecipeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.KeyRecipe.class, com.google.spanner.v1.KeyRecipe.Builder.class); + } + + // Construct using com.google.spanner.v1.KeyRecipe.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (partBuilder_ == null) { + part_ = java.util.Collections.emptyList(); + } else { + part_ = null; + partBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_KeyRecipe_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.KeyRecipe getDefaultInstanceForType() { + return com.google.spanner.v1.KeyRecipe.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.KeyRecipe build() { + com.google.spanner.v1.KeyRecipe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.KeyRecipe buildPartial() { + com.google.spanner.v1.KeyRecipe result = new com.google.spanner.v1.KeyRecipe(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.v1.KeyRecipe result) { + if (partBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + part_ = java.util.Collections.unmodifiableList(part_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.part_ = part_; + } else { + result.part_ = partBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.v1.KeyRecipe result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.spanner.v1.KeyRecipe result) { + result.targetCase_ = targetCase_; + result.target_ = this.target_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.KeyRecipe) { + return mergeFrom((com.google.spanner.v1.KeyRecipe) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.KeyRecipe other) { + if (other == com.google.spanner.v1.KeyRecipe.getDefaultInstance()) return this; + if (partBuilder_ == null) { + if (!other.part_.isEmpty()) { + if (part_.isEmpty()) { + part_ = other.part_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePartIsMutable(); + part_.addAll(other.part_); + } + onChanged(); + } + } else { + if (!other.part_.isEmpty()) { + if (partBuilder_.isEmpty()) { + partBuilder_.dispose(); + partBuilder_ = null; + part_ = other.part_; + bitField0_ = (bitField0_ & ~0x00000008); + partBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPartFieldBuilder() + : null; + } else { + partBuilder_.addAllMessages(other.part_); + } + } + } + switch (other.getTargetCase()) { + case TABLE_NAME: + { + targetCase_ = 1; + target_ = other.target_; + onChanged(); + break; + } + case INDEX_NAME: + { + targetCase_ = 2; + target_ = other.target_; + onChanged(); + break; + } + case OPERATION_UID: + { + setOperationUid(other.getOperationUid()); + break; + } + case TARGET_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: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 1; + target_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + targetCase_ = 2; + target_ = s; + break; + } // case 18 + case 24: + { + target_ = input.readUInt64(); + targetCase_ = 3; + break; + } // case 24 + case 34: + { + com.google.spanner.v1.KeyRecipe.Part m = + input.readMessage( + com.google.spanner.v1.KeyRecipe.Part.parser(), extensionRegistry); + if (partBuilder_ == null) { + ensurePartIsMutable(); + part_.add(m); + } else { + partBuilder_.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 targetCase_ = 0; + private java.lang.Object target_; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * A table name, matching the name from the database schema.
+     * 
+ * + * string table_name = 1; + * + * @return Whether the tableName field is set. + */ + @java.lang.Override + public boolean hasTableName() { + return targetCase_ == 1; + } + + /** + * + * + *
+     * A table name, matching the name from the database schema.
+     * 
+ * + * string table_name = 1; + * + * @return The tableName. + */ + @java.lang.Override + public java.lang.String getTableName() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 1) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A table name, matching the name from the database schema.
+     * 
+ * + * string table_name = 1; + * + * @return The bytes for tableName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 1) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 1) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A table name, matching the name from the database schema.
+     * 
+ * + * string table_name = 1; + * + * @param value The tableName to set. + * @return This builder for chaining. + */ + public Builder setTableName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 1; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * A table name, matching the name from the database schema.
+     * 
+ * + * string table_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearTableName() { + if (targetCase_ == 1) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A table name, matching the name from the database schema.
+     * 
+ * + * string table_name = 1; + * + * @param value The bytes for tableName to set. + * @return This builder for chaining. + */ + public Builder setTableNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 1; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * An index name, matching the name from the database schema.
+     * 
+ * + * string index_name = 2; + * + * @return Whether the indexName field is set. + */ + @java.lang.Override + public boolean hasIndexName() { + return targetCase_ == 2; + } + + /** + * + * + *
+     * An index name, matching the name from the database schema.
+     * 
+ * + * string index_name = 2; + * + * @return The indexName. + */ + @java.lang.Override + public java.lang.String getIndexName() { + java.lang.Object ref = ""; + if (targetCase_ == 2) { + ref = target_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetCase_ == 2) { + target_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * An index name, matching the name from the database schema.
+     * 
+ * + * string index_name = 2; + * + * @return The bytes for indexName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = ""; + if (targetCase_ == 2) { + ref = target_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetCase_ == 2) { + target_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * An index name, matching the name from the database schema.
+     * 
+ * + * string index_name = 2; + * + * @param value The indexName to set. + * @return This builder for chaining. + */ + public Builder setIndexName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetCase_ = 2; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * An index name, matching the name from the database schema.
+     * 
+ * + * string index_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearIndexName() { + if (targetCase_ == 2) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * An index name, matching the name from the database schema.
+     * 
+ * + * string index_name = 2; + * + * @param value The bytes for indexName to set. + * @return This builder for chaining. + */ + public Builder setIndexNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetCase_ = 2; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The UID of a query, matching the UID from `RoutingHint`.
+     * 
+ * + * uint64 operation_uid = 3; + * + * @return Whether the operationUid field is set. + */ + public boolean hasOperationUid() { + return targetCase_ == 3; + } + + /** + * + * + *
+     * The UID of a query, matching the UID from `RoutingHint`.
+     * 
+ * + * uint64 operation_uid = 3; + * + * @return The operationUid. + */ + public long getOperationUid() { + if (targetCase_ == 3) { + return (java.lang.Long) target_; + } + return 0L; + } + + /** + * + * + *
+     * The UID of a query, matching the UID from `RoutingHint`.
+     * 
+ * + * uint64 operation_uid = 3; + * + * @param value The operationUid to set. + * @return This builder for chaining. + */ + public Builder setOperationUid(long value) { + + targetCase_ = 3; + target_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The UID of a query, matching the UID from `RoutingHint`.
+     * 
+ * + * uint64 operation_uid = 3; + * + * @return This builder for chaining. + */ + public Builder clearOperationUid() { + if (targetCase_ == 3) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + private java.util.List part_ = + java.util.Collections.emptyList(); + + private void ensurePartIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + part_ = new java.util.ArrayList(part_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.KeyRecipe.Part, + com.google.spanner.v1.KeyRecipe.Part.Builder, + com.google.spanner.v1.KeyRecipe.PartOrBuilder> + partBuilder_; + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public java.util.List getPartList() { + if (partBuilder_ == null) { + return java.util.Collections.unmodifiableList(part_); + } else { + return partBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public int getPartCount() { + if (partBuilder_ == null) { + return part_.size(); + } else { + return partBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public com.google.spanner.v1.KeyRecipe.Part getPart(int index) { + if (partBuilder_ == null) { + return part_.get(index); + } else { + return partBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public Builder setPart(int index, com.google.spanner.v1.KeyRecipe.Part value) { + if (partBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartIsMutable(); + part_.set(index, value); + onChanged(); + } else { + partBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public Builder setPart( + int index, com.google.spanner.v1.KeyRecipe.Part.Builder builderForValue) { + if (partBuilder_ == null) { + ensurePartIsMutable(); + part_.set(index, builderForValue.build()); + onChanged(); + } else { + partBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public Builder addPart(com.google.spanner.v1.KeyRecipe.Part value) { + if (partBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartIsMutable(); + part_.add(value); + onChanged(); + } else { + partBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public Builder addPart(int index, com.google.spanner.v1.KeyRecipe.Part value) { + if (partBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartIsMutable(); + part_.add(index, value); + onChanged(); + } else { + partBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public Builder addPart(com.google.spanner.v1.KeyRecipe.Part.Builder builderForValue) { + if (partBuilder_ == null) { + ensurePartIsMutable(); + part_.add(builderForValue.build()); + onChanged(); + } else { + partBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public Builder addPart( + int index, com.google.spanner.v1.KeyRecipe.Part.Builder builderForValue) { + if (partBuilder_ == null) { + ensurePartIsMutable(); + part_.add(index, builderForValue.build()); + onChanged(); + } else { + partBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public Builder addAllPart( + java.lang.Iterable values) { + if (partBuilder_ == null) { + ensurePartIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, part_); + onChanged(); + } else { + partBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public Builder clearPart() { + if (partBuilder_ == null) { + part_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + partBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public Builder removePart(int index) { + if (partBuilder_ == null) { + ensurePartIsMutable(); + part_.remove(index); + onChanged(); + } else { + partBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public com.google.spanner.v1.KeyRecipe.Part.Builder getPartBuilder(int index) { + return internalGetPartFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public com.google.spanner.v1.KeyRecipe.PartOrBuilder getPartOrBuilder(int index) { + if (partBuilder_ == null) { + return part_.get(index); + } else { + return partBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public java.util.List + getPartOrBuilderList() { + if (partBuilder_ != null) { + return partBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(part_); + } + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public com.google.spanner.v1.KeyRecipe.Part.Builder addPartBuilder() { + return internalGetPartFieldBuilder() + .addBuilder(com.google.spanner.v1.KeyRecipe.Part.getDefaultInstance()); + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public com.google.spanner.v1.KeyRecipe.Part.Builder addPartBuilder(int index) { + return internalGetPartFieldBuilder() + .addBuilder(index, com.google.spanner.v1.KeyRecipe.Part.getDefaultInstance()); + } + + /** + * + * + *
+     * Parts are in the order they should appear in the encoded key.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + public java.util.List getPartBuilderList() { + return internalGetPartFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.KeyRecipe.Part, + com.google.spanner.v1.KeyRecipe.Part.Builder, + com.google.spanner.v1.KeyRecipe.PartOrBuilder> + internalGetPartFieldBuilder() { + if (partBuilder_ == null) { + partBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.KeyRecipe.Part, + com.google.spanner.v1.KeyRecipe.Part.Builder, + com.google.spanner.v1.KeyRecipe.PartOrBuilder>( + part_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + part_ = null; + } + return partBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.KeyRecipe) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.KeyRecipe) + private static final com.google.spanner.v1.KeyRecipe DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.KeyRecipe(); + } + + public static com.google.spanner.v1.KeyRecipe getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyRecipe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.KeyRecipe getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRecipeOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRecipeOrBuilder.java new file mode 100644 index 00000000000..4f8f4bfae9b --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeyRecipeOrBuilder.java @@ -0,0 +1,189 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +@com.google.protobuf.Generated +public interface KeyRecipeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.KeyRecipe) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A table name, matching the name from the database schema.
+   * 
+ * + * string table_name = 1; + * + * @return Whether the tableName field is set. + */ + boolean hasTableName(); + + /** + * + * + *
+   * A table name, matching the name from the database schema.
+   * 
+ * + * string table_name = 1; + * + * @return The tableName. + */ + java.lang.String getTableName(); + + /** + * + * + *
+   * A table name, matching the name from the database schema.
+   * 
+ * + * string table_name = 1; + * + * @return The bytes for tableName. + */ + com.google.protobuf.ByteString getTableNameBytes(); + + /** + * + * + *
+   * An index name, matching the name from the database schema.
+   * 
+ * + * string index_name = 2; + * + * @return Whether the indexName field is set. + */ + boolean hasIndexName(); + + /** + * + * + *
+   * An index name, matching the name from the database schema.
+   * 
+ * + * string index_name = 2; + * + * @return The indexName. + */ + java.lang.String getIndexName(); + + /** + * + * + *
+   * An index name, matching the name from the database schema.
+   * 
+ * + * string index_name = 2; + * + * @return The bytes for indexName. + */ + com.google.protobuf.ByteString getIndexNameBytes(); + + /** + * + * + *
+   * The UID of a query, matching the UID from `RoutingHint`.
+   * 
+ * + * uint64 operation_uid = 3; + * + * @return Whether the operationUid field is set. + */ + boolean hasOperationUid(); + + /** + * + * + *
+   * The UID of a query, matching the UID from `RoutingHint`.
+   * 
+ * + * uint64 operation_uid = 3; + * + * @return The operationUid. + */ + long getOperationUid(); + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + java.util.List getPartList(); + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + com.google.spanner.v1.KeyRecipe.Part getPart(int index); + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + int getPartCount(); + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + java.util.List getPartOrBuilderList(); + + /** + * + * + *
+   * Parts are in the order they should appear in the encoded key.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe.Part part = 4; + */ + com.google.spanner.v1.KeyRecipe.PartOrBuilder getPartOrBuilder(int index); + + com.google.spanner.v1.KeyRecipe.TargetCase getTargetCase(); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySet.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySet.java index c40e2bbbe87..f49b67163bf 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySet.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySet.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/keys.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -34,14 +35,25 @@ * * Protobuf type {@code google.spanner.v1.KeySet} */ -public final class KeySet extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class KeySet extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.KeySet) KeySetOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "KeySet"); + } + // Use KeySet.newBuilder() to construct. - private KeySet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private KeySet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -50,18 +62,12 @@ private KeySet() { ranges_ = 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.v1.KeysProto.internal_static_google_spanner_v1_KeySet_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.KeysProto .internal_static_google_spanner_v1_KeySet_fieldAccessorTable @@ -382,38 +388,38 @@ public static com.google.spanner.v1.KeySet parseFrom( public static com.google.spanner.v1.KeySet parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.KeySet parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.KeySet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.KeySet parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.KeySet parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.KeySet parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -436,7 +442,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -456,7 +462,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.KeySet} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.KeySet) com.google.spanner.v1.KeySetOrBuilder { @@ -465,7 +471,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.KeysProto .internal_static_google_spanner_v1_KeySet_fieldAccessorTable @@ -476,7 +482,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.KeySet.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -560,39 +566,6 @@ private void buildPartial0(com.google.spanner.v1.KeySet result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.KeySet) { @@ -624,8 +597,8 @@ public Builder mergeFrom(com.google.spanner.v1.KeySet other) { keys_ = other.keys_; bitField0_ = (bitField0_ & ~0x00000001); keysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getKeysFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetKeysFieldBuilder() : null; } else { keysBuilder_.addAllMessages(other.keys_); @@ -651,8 +624,8 @@ public Builder mergeFrom(com.google.spanner.v1.KeySet other) { ranges_ = other.ranges_; bitField0_ = (bitField0_ & ~0x00000002); rangesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRangesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRangesFieldBuilder() : null; } else { rangesBuilder_.addAllMessages(other.ranges_); @@ -746,7 +719,7 @@ private void ensureKeysIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> @@ -1041,7 +1014,7 @@ public Builder removeKeys(int index) { * repeated .google.protobuf.ListValue keys = 1; */ public com.google.protobuf.ListValue.Builder getKeysBuilder(int index) { - return getKeysFieldBuilder().getBuilder(index); + return internalGetKeysFieldBuilder().getBuilder(index); } /** @@ -1097,7 +1070,8 @@ public java.util.List getKeysO * repeated .google.protobuf.ListValue keys = 1; */ public com.google.protobuf.ListValue.Builder addKeysBuilder() { - return getKeysFieldBuilder().addBuilder(com.google.protobuf.ListValue.getDefaultInstance()); + return internalGetKeysFieldBuilder() + .addBuilder(com.google.protobuf.ListValue.getDefaultInstance()); } /** @@ -1113,7 +1087,7 @@ public com.google.protobuf.ListValue.Builder addKeysBuilder() { * repeated .google.protobuf.ListValue keys = 1; */ public com.google.protobuf.ListValue.Builder addKeysBuilder(int index) { - return getKeysFieldBuilder() + return internalGetKeysFieldBuilder() .addBuilder(index, com.google.protobuf.ListValue.getDefaultInstance()); } @@ -1130,17 +1104,17 @@ public com.google.protobuf.ListValue.Builder addKeysBuilder(int index) { * repeated .google.protobuf.ListValue keys = 1; */ public java.util.List getKeysBuilderList() { - return getKeysFieldBuilder().getBuilderList(); + return internalGetKeysFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> - getKeysFieldBuilder() { + internalGetKeysFieldBuilder() { if (keysBuilder_ == null) { keysBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder>( @@ -1160,7 +1134,7 @@ private void ensureRangesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.KeyRange, com.google.spanner.v1.KeyRange.Builder, com.google.spanner.v1.KeyRangeOrBuilder> @@ -1430,7 +1404,7 @@ public Builder removeRanges(int index) { * repeated .google.spanner.v1.KeyRange ranges = 2; */ public com.google.spanner.v1.KeyRange.Builder getRangesBuilder(int index) { - return getRangesFieldBuilder().getBuilder(index); + return internalGetRangesFieldBuilder().getBuilder(index); } /** @@ -1481,7 +1455,7 @@ public com.google.spanner.v1.KeyRangeOrBuilder getRangesOrBuilder(int index) { * repeated .google.spanner.v1.KeyRange ranges = 2; */ public com.google.spanner.v1.KeyRange.Builder addRangesBuilder() { - return getRangesFieldBuilder() + return internalGetRangesFieldBuilder() .addBuilder(com.google.spanner.v1.KeyRange.getDefaultInstance()); } @@ -1496,7 +1470,7 @@ public com.google.spanner.v1.KeyRange.Builder addRangesBuilder() { * repeated .google.spanner.v1.KeyRange ranges = 2; */ public com.google.spanner.v1.KeyRange.Builder addRangesBuilder(int index) { - return getRangesFieldBuilder() + return internalGetRangesFieldBuilder() .addBuilder(index, com.google.spanner.v1.KeyRange.getDefaultInstance()); } @@ -1511,17 +1485,17 @@ public com.google.spanner.v1.KeyRange.Builder addRangesBuilder(int index) { * repeated .google.spanner.v1.KeyRange ranges = 2; */ public java.util.List getRangesBuilderList() { - return getRangesFieldBuilder().getBuilderList(); + return internalGetRangesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.KeyRange, com.google.spanner.v1.KeyRange.Builder, com.google.spanner.v1.KeyRangeOrBuilder> - getRangesFieldBuilder() { + internalGetRangesFieldBuilder() { if (rangesBuilder_ == null) { rangesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.KeyRange, com.google.spanner.v1.KeyRange.Builder, com.google.spanner.v1.KeyRangeOrBuilder>( @@ -1593,17 +1567,6 @@ public Builder clearAll() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.KeySet) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySetOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySetOrBuilder.java index 7e0eb34bc73..77a31c506c7 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySetOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeySetOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/keys.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface KeySetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.KeySet) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java index d15ec6a2792..a1e368ba365 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/KeysProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/keys.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; -public final class KeysProto { +@com.google.protobuf.Generated +public final class KeysProto extends com.google.protobuf.GeneratedFile { private KeysProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "KeysProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,11 +42,11 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_KeyRange_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_KeyRange_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_KeySet_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_KeySet_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -68,21 +80,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.StructProto.getDescriptor(), }); - internal_static_google_spanner_v1_KeyRange_descriptor = - getDescriptor().getMessageTypes().get(0); + internal_static_google_spanner_v1_KeyRange_descriptor = getDescriptor().getMessageType(0); internal_static_google_spanner_v1_KeyRange_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_KeyRange_descriptor, new java.lang.String[] { "StartClosed", "StartOpen", "EndClosed", "EndOpen", "StartKeyType", "EndKeyType", }); - internal_static_google_spanner_v1_KeySet_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_spanner_v1_KeySet_descriptor = getDescriptor().getMessageType(1); internal_static_google_spanner_v1_KeySet_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_KeySet_descriptor, new java.lang.String[] { "Keys", "Ranges", "All", }); + descriptor.resolveAllFeaturesImmutable(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequest.java index 77b18f3b134..6413acdc191 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.ListSessionsRequest} */ -public final class ListSessionsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSessionsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ListSessionsRequest) ListSessionsRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSessionsRequest"); + } + // Use ListSessionsRequest.newBuilder() to construct. - private ListSessionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSessionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private ListSessionsRequest() { filter_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSessionsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ListSessionsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ListSessionsRequest_fieldAccessorTable @@ -214,13 +220,13 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `labels.key` where key is the name of a label + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `labels.env:*` --> The session has the label "env". - * * `labels.env:dev` --> The session has the label "env" and the value of - * the label contains the string "dev". + * * `labels.env:*` --> The session has the label "env". + * * `labels.env:dev` --> The session has the label "env" and the value of + * the label contains the string "dev". * * * string filter = 4; @@ -247,13 +253,13 @@ public java.lang.String getFilter() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `labels.key` where key is the name of a label + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `labels.env:*` --> The session has the label "env". - * * `labels.env:dev` --> The session has the label "env" and the value of - * the label contains the string "dev". + * * `labels.env:*` --> The session has the label "env". + * * `labels.env:dev` --> The session has the label "env" and the value of + * the label contains the string "dev". * * * string filter = 4; @@ -287,17 +293,17 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, database_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); } getUnknownFields().writeTo(output); } @@ -308,17 +314,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, database_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -401,38 +407,38 @@ public static com.google.spanner.v1.ListSessionsRequest parseFrom( public static com.google.spanner.v1.ListSessionsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ListSessionsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ListSessionsRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ListSessionsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ListSessionsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ListSessionsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -455,7 +461,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -469,7 +475,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.ListSessionsRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ListSessionsRequest) com.google.spanner.v1.ListSessionsRequestOrBuilder { @@ -479,7 +485,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ListSessionsRequest_fieldAccessorTable @@ -491,7 +497,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.ListSessionsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -553,39 +559,6 @@ private void buildPartial0(com.google.spanner.v1.ListSessionsRequest result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.ListSessionsRequest) { @@ -1000,13 +973,13 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `labels.key` where key is the name of a label + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `labels.env:*` --> The session has the label "env". - * * `labels.env:dev` --> The session has the label "env" and the value of - * the label contains the string "dev". + * * `labels.env:*` --> The session has the label "env". + * * `labels.env:dev` --> The session has the label "env" and the value of + * the label contains the string "dev". * * * string filter = 4; @@ -1032,13 +1005,13 @@ public java.lang.String getFilter() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `labels.key` where key is the name of a label + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `labels.env:*` --> The session has the label "env". - * * `labels.env:dev` --> The session has the label "env" and the value of - * the label contains the string "dev". + * * `labels.env:*` --> The session has the label "env". + * * `labels.env:dev` --> The session has the label "env" and the value of + * the label contains the string "dev". * * * string filter = 4; @@ -1064,13 +1037,13 @@ public com.google.protobuf.ByteString getFilterBytes() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `labels.key` where key is the name of a label + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `labels.env:*` --> The session has the label "env". - * * `labels.env:dev` --> The session has the label "env" and the value of - * the label contains the string "dev". + * * `labels.env:*` --> The session has the label "env". + * * `labels.env:dev` --> The session has the label "env" and the value of + * the label contains the string "dev". * * * string filter = 4; @@ -1095,13 +1068,13 @@ public Builder setFilter(java.lang.String value) { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `labels.key` where key is the name of a label + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `labels.env:*` --> The session has the label "env". - * * `labels.env:dev` --> The session has the label "env" and the value of - * the label contains the string "dev". + * * `labels.env:*` --> The session has the label "env". + * * `labels.env:dev` --> The session has the label "env" and the value of + * the label contains the string "dev". * * * string filter = 4; @@ -1122,13 +1095,13 @@ public Builder clearFilter() { * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `labels.key` where key is the name of a label + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `labels.env:*` --> The session has the label "env". - * * `labels.env:dev` --> The session has the label "env" and the value of - * the label contains the string "dev". + * * `labels.env:*` --> The session has the label "env". + * * `labels.env:dev` --> The session has the label "env" and the value of + * the label contains the string "dev". * * * string filter = 4; @@ -1147,17 +1120,6 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ListSessionsRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequestOrBuilder.java index a054b5e70c0..ce34b437d20 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ListSessionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ListSessionsRequest) @@ -107,13 +109,13 @@ public interface ListSessionsRequestOrBuilder * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `labels.key` where key is the name of a label + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `labels.env:*` --> The session has the label "env". - * * `labels.env:dev` --> The session has the label "env" and the value of - * the label contains the string "dev". + * * `labels.env:*` --> The session has the label "env". + * * `labels.env:dev` --> The session has the label "env" and the value of + * the label contains the string "dev". * * * string filter = 4; @@ -129,13 +131,13 @@ public interface ListSessionsRequestOrBuilder * An expression for filtering the results of the request. Filter rules are * case insensitive. The fields eligible for filtering are: * - * * `labels.key` where key is the name of a label + * * `labels.key` where key is the name of a label * * Some examples of using filters are: * - * * `labels.env:*` --> The session has the label "env". - * * `labels.env:dev` --> The session has the label "env" and the value of - * the label contains the string "dev". + * * `labels.env:*` --> The session has the label "env". + * * `labels.env:dev` --> The session has the label "env" and the value of + * the label contains the string "dev". * * * string filter = 4; diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponse.java index 84cf5b11307..1f2ccda7c22 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.ListSessionsResponse} */ -public final class ListSessionsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSessionsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ListSessionsResponse) ListSessionsResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSessionsResponse"); + } + // Use ListSessionsResponse.newBuilder() to construct. - private ListSessionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSessionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private ListSessionsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSessionsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ListSessionsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ListSessionsResponse_fieldAccessorTable @@ -215,8 +221,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < sessions_.size(); i++) { output.writeMessage(1, sessions_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); } getUnknownFields().writeTo(output); } @@ -230,8 +236,8 @@ public int getSerializedSize() { for (int i = 0; i < sessions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sessions_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -310,38 +316,38 @@ public static com.google.spanner.v1.ListSessionsResponse parseFrom( public static com.google.spanner.v1.ListSessionsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ListSessionsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ListSessionsResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ListSessionsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ListSessionsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ListSessionsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -364,7 +370,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -378,7 +384,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.ListSessionsResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ListSessionsResponse) com.google.spanner.v1.ListSessionsResponseOrBuilder { @@ -388,7 +394,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ListSessionsResponse_fieldAccessorTable @@ -400,7 +406,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.ListSessionsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -470,39 +476,6 @@ private void buildPartial0(com.google.spanner.v1.ListSessionsResponse result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.ListSessionsResponse) { @@ -534,8 +507,8 @@ public Builder mergeFrom(com.google.spanner.v1.ListSessionsResponse other) { sessions_ = other.sessions_; bitField0_ = (bitField0_ & ~0x00000001); sessionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSessionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSessionsFieldBuilder() : null; } else { sessionsBuilder_.addAllMessages(other.sessions_); @@ -620,7 +593,7 @@ private void ensureSessionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder> @@ -877,7 +850,7 @@ public Builder removeSessions(int index) { * repeated .google.spanner.v1.Session sessions = 1; */ public com.google.spanner.v1.Session.Builder getSessionsBuilder(int index) { - return getSessionsFieldBuilder().getBuilder(index); + return internalGetSessionsFieldBuilder().getBuilder(index); } /** @@ -925,7 +898,7 @@ public com.google.spanner.v1.SessionOrBuilder getSessionsOrBuilder(int index) { * repeated .google.spanner.v1.Session sessions = 1; */ public com.google.spanner.v1.Session.Builder addSessionsBuilder() { - return getSessionsFieldBuilder() + return internalGetSessionsFieldBuilder() .addBuilder(com.google.spanner.v1.Session.getDefaultInstance()); } @@ -939,7 +912,7 @@ public com.google.spanner.v1.Session.Builder addSessionsBuilder() { * repeated .google.spanner.v1.Session sessions = 1; */ public com.google.spanner.v1.Session.Builder addSessionsBuilder(int index) { - return getSessionsFieldBuilder() + return internalGetSessionsFieldBuilder() .addBuilder(index, com.google.spanner.v1.Session.getDefaultInstance()); } @@ -953,17 +926,17 @@ public com.google.spanner.v1.Session.Builder addSessionsBuilder(int index) { * repeated .google.spanner.v1.Session sessions = 1; */ public java.util.List getSessionsBuilderList() { - return getSessionsFieldBuilder().getBuilderList(); + return internalGetSessionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder> - getSessionsFieldBuilder() { + internalGetSessionsFieldBuilder() { if (sessionsBuilder_ == null) { sessionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Session, com.google.spanner.v1.Session.Builder, com.google.spanner.v1.SessionOrBuilder>( @@ -1094,17 +1067,6 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ListSessionsResponse) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponseOrBuilder.java index 410a805beda..8a30f2f9997 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ListSessionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ListSessionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ListSessionsResponse) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/LocationProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/LocationProto.java new file mode 100644 index 00000000000..e5c3bee3958 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/LocationProto.java @@ -0,0 +1,266 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +@com.google.protobuf.Generated +public final class LocationProto extends com.google.protobuf.GeneratedFile { + private LocationProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LocationProto"); + } + + 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_v1_Range_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_Range_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_Tablet_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_Tablet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_Group_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_Group_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_KeyRecipe_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_KeyRecipe_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_KeyRecipe_Part_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_KeyRecipe_Part_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_RecipeList_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_RecipeList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_CacheUpdate_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_CacheUpdate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_RoutingHint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_RoutingHint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_RoutingHint_SkippedTablet_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_RoutingHint_SkippedTablet_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/v1/location.proto\022\021goog" + + "le.spanner.v1\032\034google/protobuf/struct.proto\032\034google/spanner/v1/type.proto\"f\n" + + "\005Range\022\021\n" + + "\tstart_key\030\001 \001(\014\022\021\n" + + "\tlimit_key\030\002 \001(\014\022\021\n" + + "\tgroup_uid\030\003 \001(\004\022\020\n" + + "\010split_id\030\004 \001(\004\022\022\n" + + "\n" + + "generation\030\005 \001(\014\"\346\001\n" + + "\006Tablet\022\022\n\n" + + "tablet_uid\030\001 \001(\004\022\026\n" + + "\016server_address\030\002 \001(\t\022\020\n" + + "\010location\030\003 \001(\t\022,\n" + + "\004role\030\004 \001(\0162\036.google.spanner.v1.Tablet.Role\022\023\n" + + "\013incarnation\030\005 \001(\014\022\020\n" + + "\010distance\030\006 \001(\r" + + "\022\014\n" + + "\004skip\030\007 \001(\010\";\n" + + "\004Role\022\024\n" + + "\020ROLE_UNSPECIFIED\020\000\022\016\n\n" + + "READ_WRITE\020\001\022\r\n" + + "\tREAD_ONLY\020\002\"p\n" + + "\005Group\022\021\n" + + "\tgroup_uid\030\001 \001(\004\022*\n" + + "\007tablets\030\002 \003(\0132\031.google.spanner.v1.Tablet\022\024\n" + + "\014leader_index\030\003 \001(\005\022\022\n\n" + + "generation\030\004 \001(\014\"\323\004\n" + + "\tKeyRecipe\022\024\n\n" + + "table_name\030\001 \001(\tH\000\022\024\n\n" + + "index_name\030\002 \001(\tH\000\022\027\n\r" + + "operation_uid\030\003 \001(\004H\000\022/\n" + + "\004part\030\004 \003(\0132!.google.spanner.v1.KeyRecipe.Part\032\305\003\n" + + "\004Part\022\013\n" + + "\003tag\030\001 \001(\r" + + "\0226\n" + + "\005order\030\002 \001(\0162\'.google.spanner.v1.KeyRecipe.Part.Order\022?\n\n" + + "null_order\030\003 \001(\0162+.google.spanner.v1.KeyRecipe.Part.NullOrder\022%\n" + + "\004type\030\004 \001(\0132\027.google.spanner.v1.Type\022\024\n\n" + + "identifier\030\005 \001(\tH\000\022\'\n" + + "\005value\030\006 \001(\0132\026.google.protobuf.ValueH\000\022\020\n" + + "\006random\030\010 \001(\010H\000\022\032\n" + + "\022struct_identifiers\030\007 \003(\005\"=\n" + + "\005Order\022\025\n" + + "\021ORDER_UNSPECIFIED\020\000\022\r\n" + + "\tASCENDING\020\001\022\016\n\n" + + "DESCENDING\020\002\"V\n" + + "\tNullOrder\022\032\n" + + "\026NULL_ORDER_UNSPECIFIED\020\000\022\017\n" + + "\013NULLS_FIRST\020\001\022\016\n\n" + + "NULLS_LAST\020\002\022\014\n" + + "\010NOT_NULL\020\003B\014\n\n" + + "value_typeB\010\n" + + "\006target\"U\n\n" + + "RecipeList\022\031\n" + + "\021schema_generation\030\001 \001(\014\022,\n" + + "\006recipe\030\003 \003(\0132\034.google.spanner.v1.KeyRecipe\"\250\001\n" + + "\013CacheUpdate\022\023\n" + + "\013database_id\030\001 \001(\004\022\'\n" + + "\005range\030\002 \003(\0132\030.google.spanner.v1.Range\022\'\n" + + "\005group\030\003 \003(\0132\030.google.spanner.v1.Group\0222\n" + + "\013key_recipes\030\005 \001(\0132\035.google.spanner.v1.RecipeList\"\312\002\n" + + "\013RoutingHint\022\025\n\r" + + "operation_uid\030\001 \001(\004\022\023\n" + + "\013database_id\030\002 \001(\004\022\031\n" + + "\021schema_generation\030\003 \001(\014\022\013\n" + + "\003key\030\004 \001(\014\022\021\n" + + "\tlimit_key\030\005 \001(\014\022\021\n" + + "\tgroup_uid\030\006 \001(\004\022\020\n" + + "\010split_id\030\007 \001(\004\022\022\n\n" + + "tablet_uid\030\010 \001(\004\022H\n" + + "\022skipped_tablet_uid\030\t" + + " \003(\0132,.google.spanner.v1.RoutingHint.SkippedTablet\022\027\n" + + "\017client_location\030\n" + + " \001(\t\0328\n\r" + + "SkippedTablet\022\022\n\n" + + "tablet_uid\030\001 \001(\004\022\023\n" + + "\013incarnation\030\002 \001(\014B\260\001\n" + + "\025com.google.spanner.v1B\r" + + "LocationProtoP\001Z5cloud.google.com/go/spanner/apiv1/spannerp" + + "b;spannerpb\252\002\027Google.Cloud.Spanner.V1\312\002\027" + + "Google\\Cloud\\Spanner\\V1\352\002\032Google::Cloud::Spanner::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.spanner.v1.TypeProto.getDescriptor(), + }); + internal_static_google_spanner_v1_Range_descriptor = getDescriptor().getMessageType(0); + internal_static_google_spanner_v1_Range_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_Range_descriptor, + new java.lang.String[] { + "StartKey", "LimitKey", "GroupUid", "SplitId", "Generation", + }); + internal_static_google_spanner_v1_Tablet_descriptor = getDescriptor().getMessageType(1); + internal_static_google_spanner_v1_Tablet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_Tablet_descriptor, + new java.lang.String[] { + "TabletUid", "ServerAddress", "Location", "Role", "Incarnation", "Distance", "Skip", + }); + internal_static_google_spanner_v1_Group_descriptor = getDescriptor().getMessageType(2); + internal_static_google_spanner_v1_Group_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_Group_descriptor, + new java.lang.String[] { + "GroupUid", "Tablets", "LeaderIndex", "Generation", + }); + internal_static_google_spanner_v1_KeyRecipe_descriptor = getDescriptor().getMessageType(3); + internal_static_google_spanner_v1_KeyRecipe_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_KeyRecipe_descriptor, + new java.lang.String[] { + "TableName", "IndexName", "OperationUid", "Part", "Target", + }); + internal_static_google_spanner_v1_KeyRecipe_Part_descriptor = + internal_static_google_spanner_v1_KeyRecipe_descriptor.getNestedType(0); + internal_static_google_spanner_v1_KeyRecipe_Part_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_KeyRecipe_Part_descriptor, + new java.lang.String[] { + "Tag", + "Order", + "NullOrder", + "Type", + "Identifier", + "Value", + "Random", + "StructIdentifiers", + "ValueType", + }); + internal_static_google_spanner_v1_RecipeList_descriptor = getDescriptor().getMessageType(4); + internal_static_google_spanner_v1_RecipeList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_RecipeList_descriptor, + new java.lang.String[] { + "SchemaGeneration", "Recipe", + }); + internal_static_google_spanner_v1_CacheUpdate_descriptor = getDescriptor().getMessageType(5); + internal_static_google_spanner_v1_CacheUpdate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_CacheUpdate_descriptor, + new java.lang.String[] { + "DatabaseId", "Range", "Group", "KeyRecipes", + }); + internal_static_google_spanner_v1_RoutingHint_descriptor = getDescriptor().getMessageType(6); + internal_static_google_spanner_v1_RoutingHint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_RoutingHint_descriptor, + new java.lang.String[] { + "OperationUid", + "DatabaseId", + "SchemaGeneration", + "Key", + "LimitKey", + "GroupUid", + "SplitId", + "TabletUid", + "SkippedTabletUid", + "ClientLocation", + }); + internal_static_google_spanner_v1_RoutingHint_SkippedTablet_descriptor = + internal_static_google_spanner_v1_RoutingHint_descriptor.getNestedType(0); + internal_static_google_spanner_v1_RoutingHint_SkippedTablet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_RoutingHint_SkippedTablet_descriptor, + new java.lang.String[] { + "TabletUid", "Incarnation", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.spanner.v1.TypeProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MultiplexedSessionPrecommitToken.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MultiplexedSessionPrecommitToken.java index cafcfb50614..f6e18f0307c 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MultiplexedSessionPrecommitToken.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MultiplexedSessionPrecommitToken.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/transaction.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -33,15 +34,26 @@ * * Protobuf type {@code google.spanner.v1.MultiplexedSessionPrecommitToken} */ -public final class MultiplexedSessionPrecommitToken extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MultiplexedSessionPrecommitToken extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.MultiplexedSessionPrecommitToken) MultiplexedSessionPrecommitTokenOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MultiplexedSessionPrecommitToken"); + } + // Use MultiplexedSessionPrecommitToken.newBuilder() to construct. private MultiplexedSessionPrecommitToken( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -49,19 +61,13 @@ private MultiplexedSessionPrecommitToken() { precommitToken_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MultiplexedSessionPrecommitToken(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_MultiplexedSessionPrecommitToken_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_MultiplexedSessionPrecommitToken_fieldAccessorTable @@ -220,38 +226,38 @@ public static com.google.spanner.v1.MultiplexedSessionPrecommitToken parseFrom( public static com.google.spanner.v1.MultiplexedSessionPrecommitToken parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.MultiplexedSessionPrecommitToken parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.MultiplexedSessionPrecommitToken parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.MultiplexedSessionPrecommitToken parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.MultiplexedSessionPrecommitToken parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.MultiplexedSessionPrecommitToken parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -275,7 +281,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -294,7 +300,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.MultiplexedSessionPrecommitToken} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.MultiplexedSessionPrecommitToken) com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder { @@ -304,7 +310,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_MultiplexedSessionPrecommitToken_fieldAccessorTable @@ -316,7 +322,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.MultiplexedSessionPrecommitToken.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -370,39 +376,6 @@ private void buildPartial0(com.google.spanner.v1.MultiplexedSessionPrecommitToke } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.MultiplexedSessionPrecommitToken) { @@ -416,7 +389,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.spanner.v1.MultiplexedSessionPrecommitToken other) { if (other == com.google.spanner.v1.MultiplexedSessionPrecommitToken.getDefaultInstance()) return this; - if (other.getPrecommitToken() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getPrecommitToken().isEmpty()) { setPrecommitToken(other.getPrecommitToken()); } if (other.getSeqNum() != 0) { @@ -599,17 +572,6 @@ public Builder clearSeqNum() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.MultiplexedSessionPrecommitToken) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MultiplexedSessionPrecommitTokenOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MultiplexedSessionPrecommitTokenOrBuilder.java index 108138be840..30cdf3b0d5e 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MultiplexedSessionPrecommitTokenOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MultiplexedSessionPrecommitTokenOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/transaction.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface MultiplexedSessionPrecommitTokenOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.MultiplexedSessionPrecommitToken) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Mutation.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Mutation.java index 47adefcfa87..d357769157f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Mutation.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Mutation.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/mutation.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -30,32 +31,37 @@ * * Protobuf type {@code google.spanner.v1.Mutation} */ -public final class Mutation extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Mutation extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.Mutation) MutationOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Mutation"); + } + // Use Mutation.newBuilder() to construct. - private Mutation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Mutation(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Mutation() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Mutation(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.MutationProto .internal_static_google_spanner_v1_Mutation_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.MutationProto .internal_static_google_spanner_v1_Mutation_fieldAccessorTable @@ -281,14 +287,24 @@ public interface WriteOrBuilder * * Protobuf type {@code google.spanner.v1.Mutation.Write} */ - public static final class Write extends com.google.protobuf.GeneratedMessageV3 + public static final class Write extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.Mutation.Write) WriteOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Write"); + } + // Use Write.newBuilder() to construct. - private Write(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Write(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -298,19 +314,13 @@ private Write() { values_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Write(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.MutationProto .internal_static_google_spanner_v1_Mutation_Write_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.MutationProto .internal_static_google_spanner_v1_Mutation_Write_fieldAccessorTable @@ -595,11 +605,11 @@ public final boolean isInitialized() { @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, table_); } for (int i = 0; i < columns_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, columns_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, columns_.getRaw(i)); } for (int i = 0; i < values_.size(); i++) { output.writeMessage(3, values_.get(i)); @@ -613,8 +623,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, table_); } { int dataSize = 0; @@ -708,38 +718,38 @@ public static com.google.spanner.v1.Mutation.Write parseFrom( public static com.google.spanner.v1.Mutation.Write parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Mutation.Write parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Mutation.Write parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.Mutation.Write parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Mutation.Write parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Mutation.Write parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -762,8 +772,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -780,8 +789,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.Mutation.Write} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.Mutation.Write) com.google.spanner.v1.Mutation.WriteOrBuilder { @@ -791,7 +799,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.MutationProto .internal_static_google_spanner_v1_Mutation_Write_fieldAccessorTable @@ -803,7 +811,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.Mutation.Write.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -878,41 +886,6 @@ private void buildPartial0(com.google.spanner.v1.Mutation.Write result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.Mutation.Write) { @@ -959,8 +932,8 @@ public Builder mergeFrom(com.google.spanner.v1.Mutation.Write other) { values_ = other.values_; bitField0_ = (bitField0_ & ~0x00000004); valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getValuesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetValuesFieldBuilder() : null; } else { valuesBuilder_.addAllMessages(other.values_); @@ -1386,7 +1359,7 @@ private void ensureValuesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> @@ -1760,7 +1733,7 @@ public Builder removeValues(int index) { * repeated .google.protobuf.ListValue values = 3; */ public com.google.protobuf.ListValue.Builder getValuesBuilder(int index) { - return getValuesFieldBuilder().getBuilder(index); + return internalGetValuesFieldBuilder().getBuilder(index); } /** @@ -1835,7 +1808,7 @@ public com.google.protobuf.ListValueOrBuilder getValuesOrBuilder(int index) { * repeated .google.protobuf.ListValue values = 3; */ public com.google.protobuf.ListValue.Builder addValuesBuilder() { - return getValuesFieldBuilder() + return internalGetValuesFieldBuilder() .addBuilder(com.google.protobuf.ListValue.getDefaultInstance()); } @@ -1858,7 +1831,7 @@ public com.google.protobuf.ListValue.Builder addValuesBuilder() { * repeated .google.protobuf.ListValue values = 3; */ public com.google.protobuf.ListValue.Builder addValuesBuilder(int index) { - return getValuesFieldBuilder() + return internalGetValuesFieldBuilder() .addBuilder(index, com.google.protobuf.ListValue.getDefaultInstance()); } @@ -1881,17 +1854,17 @@ public com.google.protobuf.ListValue.Builder addValuesBuilder(int index) { * repeated .google.protobuf.ListValue values = 3; */ public java.util.List getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); + return internalGetValuesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> - getValuesFieldBuilder() { + internalGetValuesFieldBuilder() { if (valuesBuilder_ == null) { valuesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder>( @@ -1901,18 +1874,6 @@ public java.util.List getValuesBuilderLis 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.v1.Mutation.Write) } @@ -2058,14 +2019,24 @@ public interface DeleteOrBuilder * * Protobuf type {@code google.spanner.v1.Mutation.Delete} */ - public static final class Delete extends com.google.protobuf.GeneratedMessageV3 + public static final class Delete extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.Mutation.Delete) DeleteOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Delete"); + } + // Use Delete.newBuilder() to construct. - private Delete(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Delete(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -2073,19 +2044,13 @@ private Delete() { table_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Delete(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.MutationProto .internal_static_google_spanner_v1_Mutation_Delete_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.MutationProto .internal_static_google_spanner_v1_Mutation_Delete_fieldAccessorTable @@ -2226,8 +2191,8 @@ public final boolean isInitialized() { @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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, table_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getKeySet()); @@ -2241,8 +2206,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, table_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKeySet()); @@ -2326,38 +2291,38 @@ public static com.google.spanner.v1.Mutation.Delete parseFrom( public static com.google.spanner.v1.Mutation.Delete parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Mutation.Delete parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Mutation.Delete parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.Mutation.Delete parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Mutation.Delete parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Mutation.Delete parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2380,8 +2345,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2395,8 +2359,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.Mutation.Delete} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.Mutation.Delete) com.google.spanner.v1.Mutation.DeleteOrBuilder { @@ -2406,7 +2369,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.MutationProto .internal_static_google_spanner_v1_Mutation_Delete_fieldAccessorTable @@ -2420,14 +2383,14 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getKeySetFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeySetFieldBuilder(); } } @@ -2488,41 +2451,6 @@ private void buildPartial0(com.google.spanner.v1.Mutation.Delete result) { 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.v1.Mutation.Delete) { @@ -2577,7 +2505,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getKeySetFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetKeySetFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -2712,7 +2641,7 @@ public Builder setTableBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.KeySet keySet_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.KeySet, com.google.spanner.v1.KeySet.Builder, com.google.spanner.v1.KeySetOrBuilder> @@ -2897,7 +2826,7 @@ public Builder clearKeySet() { public com.google.spanner.v1.KeySet.Builder getKeySetBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getKeySetFieldBuilder().getBuilder(); + return internalGetKeySetFieldBuilder().getBuilder(); } /** @@ -2938,14 +2867,14 @@ public com.google.spanner.v1.KeySetOrBuilder getKeySetOrBuilder() { * .google.spanner.v1.KeySet key_set = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.KeySet, com.google.spanner.v1.KeySet.Builder, com.google.spanner.v1.KeySetOrBuilder> - getKeySetFieldBuilder() { + internalGetKeySetFieldBuilder() { if (keySetBuilder_ == null) { keySetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.KeySet, com.google.spanner.v1.KeySet.Builder, com.google.spanner.v1.KeySetOrBuilder>( @@ -2955,18 +2884,6 @@ public com.google.spanner.v1.KeySetOrBuilder getKeySetOrBuilder() { return keySetBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.Mutation.Delete) } @@ -3019,128 +2936,2784 @@ public com.google.spanner.v1.Mutation.Delete getDefaultInstanceForType() { } } - private int operationCase_ = 0; + public interface SendOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.Mutation.Send) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private java.lang.Object operation_; + /** + * + * + *
+     * Required. The queue to which the message will be sent.
+     * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The queue. + */ + java.lang.String getQueue(); - public enum OperationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INSERT(1), - UPDATE(2), - INSERT_OR_UPDATE(3), - REPLACE(4), - DELETE(5), - OPERATION_NOT_SET(0); - private final int value; + /** + * + * + *
+     * Required. The queue to which the message will be sent.
+     * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for queue. + */ + com.google.protobuf.ByteString getQueueBytes(); - private OperationCase(int value) { - this.value = value; - } + /** + * + * + *
+     * Required. The primary key of the message to be sent.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the key field is set. + */ + boolean hasKey(); /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. + * + * + *
+     * Required. The primary key of the message to be sent.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. */ - @java.lang.Deprecated - public static OperationCase valueOf(int value) { - return forNumber(value); - } + com.google.protobuf.ListValue getKey(); - public static OperationCase forNumber(int value) { - switch (value) { - case 1: - return INSERT; - case 2: - return UPDATE; - case 3: - return INSERT_OR_UPDATE; - case 4: - return REPLACE; - case 5: - return DELETE; - case 0: - return OPERATION_NOT_SET; - default: - return null; - } - } + /** + * + * + *
+     * Required. The primary key of the message to be sent.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.ListValueOrBuilder getKeyOrBuilder(); - public int getNumber() { - return this.value; - } - }; + /** + * + * + *
+     * The time at which Spanner will begin attempting to deliver the message.
+     * If `deliver_time` is not set, Spanner will deliver the message
+     * immediately. If `deliver_time` is in the past, Spanner will replace it
+     * with a value closer to the current time.
+     * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + * + * @return Whether the deliverTime field is set. + */ + boolean hasDeliverTime(); - public OperationCase getOperationCase() { - return OperationCase.forNumber(operationCase_); - } + /** + * + * + *
+     * The time at which Spanner will begin attempting to deliver the message.
+     * If `deliver_time` is not set, Spanner will deliver the message
+     * immediately. If `deliver_time` is in the past, Spanner will replace it
+     * with a value closer to the current time.
+     * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + * + * @return The deliverTime. + */ + com.google.protobuf.Timestamp getDeliverTime(); - public static final int INSERT_FIELD_NUMBER = 1; + /** + * + * + *
+     * The time at which Spanner will begin attempting to deliver the message.
+     * If `deliver_time` is not set, Spanner will deliver the message
+     * immediately. If `deliver_time` is in the past, Spanner will replace it
+     * with a value closer to the current time.
+     * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getDeliverTimeOrBuilder(); - /** - * - * - *
-   * Insert new rows in a table. If any of the rows already exist,
-   * the write or transaction fails with error `ALREADY_EXISTS`.
-   * 
- * - * .google.spanner.v1.Mutation.Write insert = 1; - * - * @return Whether the insert field is set. - */ - @java.lang.Override - public boolean hasInsert() { - return operationCase_ == 1; + /** + * + * + *
+     * The payload of the message.
+     * 
+ * + * .google.protobuf.Value payload = 4; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + + /** + * + * + *
+     * The payload of the message.
+     * 
+ * + * .google.protobuf.Value payload = 4; + * + * @return The payload. + */ + com.google.protobuf.Value getPayload(); + + /** + * + * + *
+     * The payload of the message.
+     * 
+ * + * .google.protobuf.Value payload = 4; + */ + com.google.protobuf.ValueOrBuilder getPayloadOrBuilder(); } /** * * *
-   * Insert new rows in a table. If any of the rows already exist,
-   * the write or transaction fails with error `ALREADY_EXISTS`.
+   * Arguments to [send][google.spanner.v1.Mutation.send] operations.
    * 
* - * .google.spanner.v1.Mutation.Write insert = 1; - * - * @return The insert. + * Protobuf type {@code google.spanner.v1.Mutation.Send} */ - @java.lang.Override - public com.google.spanner.v1.Mutation.Write getInsert() { - if (operationCase_ == 1) { - return (com.google.spanner.v1.Mutation.Write) operation_; + public static final class Send extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.Mutation.Send) + SendOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Send"); } - return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); - } - /** - * - * - *
-   * Insert new rows in a table. If any of the rows already exist,
-   * the write or transaction fails with error `ALREADY_EXISTS`.
-   * 
- * - * .google.spanner.v1.Mutation.Write insert = 1; - */ - @java.lang.Override - public com.google.spanner.v1.Mutation.WriteOrBuilder getInsertOrBuilder() { - if (operationCase_ == 1) { - return (com.google.spanner.v1.Mutation.Write) operation_; + // Use Send.newBuilder() to construct. + private Send(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); - } - public static final int UPDATE_FIELD_NUMBER = 2; + private Send() { + queue_ = ""; + } - /** - * - * - *
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+      return com.google.spanner.v1.MutationProto
+          .internal_static_google_spanner_v1_Mutation_Send_descriptor;
+    }
+
+    @java.lang.Override
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return com.google.spanner.v1.MutationProto
+          .internal_static_google_spanner_v1_Mutation_Send_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              com.google.spanner.v1.Mutation.Send.class,
+              com.google.spanner.v1.Mutation.Send.Builder.class);
+    }
+
+    private int bitField0_;
+    public static final int QUEUE_FIELD_NUMBER = 1;
+
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object queue_ = "";
+
+    /**
+     *
+     *
+     * 
+     * Required. The queue to which the message will be sent.
+     * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The queue. + */ + @java.lang.Override + public java.lang.String getQueue() { + java.lang.Object ref = queue_; + 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(); + queue_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The queue to which the message will be sent.
+     * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for queue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueueBytes() { + java.lang.Object ref = queue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + private com.google.protobuf.ListValue key_; + + /** + * + * + *
+     * Required. The primary key of the message to be sent.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The primary key of the message to be sent.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ListValue getKey() { + return key_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : key_; + } + + /** + * + * + *
+     * Required. The primary key of the message to be sent.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.ListValueOrBuilder getKeyOrBuilder() { + return key_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : key_; + } + + public static final int DELIVER_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp deliverTime_; + + /** + * + * + *
+     * The time at which Spanner will begin attempting to deliver the message.
+     * If `deliver_time` is not set, Spanner will deliver the message
+     * immediately. If `deliver_time` is in the past, Spanner will replace it
+     * with a value closer to the current time.
+     * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + * + * @return Whether the deliverTime field is set. + */ + @java.lang.Override + public boolean hasDeliverTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The time at which Spanner will begin attempting to deliver the message.
+     * If `deliver_time` is not set, Spanner will deliver the message
+     * immediately. If `deliver_time` is in the past, Spanner will replace it
+     * with a value closer to the current time.
+     * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + * + * @return The deliverTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeliverTime() { + return deliverTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deliverTime_; + } + + /** + * + * + *
+     * The time at which Spanner will begin attempting to deliver the message.
+     * If `deliver_time` is not set, Spanner will deliver the message
+     * immediately. If `deliver_time` is in the past, Spanner will replace it
+     * with a value closer to the current time.
+     * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeliverTimeOrBuilder() { + return deliverTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deliverTime_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 4; + private com.google.protobuf.Value payload_; + + /** + * + * + *
+     * The payload of the message.
+     * 
+ * + * .google.protobuf.Value payload = 4; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The payload of the message.
+     * 
+ * + * .google.protobuf.Value payload = 4; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.Value getPayload() { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } + + /** + * + * + *
+     * The payload of the message.
+     * 
+ * + * .google.protobuf.Value payload = 4; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getPayloadOrBuilder() { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } + + 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.GeneratedMessage.isStringEmpty(queue_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, queue_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getKey()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getDeliverTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getPayload()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queue_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, queue_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKey()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeliverTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPayload()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.Mutation.Send)) { + return super.equals(obj); + } + com.google.spanner.v1.Mutation.Send other = (com.google.spanner.v1.Mutation.Send) obj; + + if (!getQueue().equals(other.getQueue())) return false; + if (hasKey() != other.hasKey()) return false; + if (hasKey()) { + if (!getKey().equals(other.getKey())) return false; + } + if (hasDeliverTime() != other.hasDeliverTime()) return false; + if (hasDeliverTime()) { + if (!getDeliverTime().equals(other.getDeliverTime())) return false; + } + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) 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) + QUEUE_FIELD_NUMBER; + hash = (53 * hash) + getQueue().hashCode(); + if (hasKey()) { + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + } + if (hasDeliverTime()) { + hash = (37 * hash) + DELIVER_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeliverTime().hashCode(); + } + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.Mutation.Send parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Mutation.Send parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Send parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Mutation.Send parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Send parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Mutation.Send parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Send parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Mutation.Send parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Send parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Mutation.Send parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Send parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Mutation.Send parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.Mutation.Send 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Arguments to [send][google.spanner.v1.Mutation.send] operations.
+     * 
+ * + * Protobuf type {@code google.spanner.v1.Mutation.Send} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.Mutation.Send) + com.google.spanner.v1.Mutation.SendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_Send_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_Send_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Mutation.Send.class, + com.google.spanner.v1.Mutation.Send.Builder.class); + } + + // Construct using com.google.spanner.v1.Mutation.Send.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeyFieldBuilder(); + internalGetDeliverTimeFieldBuilder(); + internalGetPayloadFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queue_ = ""; + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + deliverTime_ = null; + if (deliverTimeBuilder_ != null) { + deliverTimeBuilder_.dispose(); + deliverTimeBuilder_ = null; + } + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_Send_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.Mutation.Send getDefaultInstanceForType() { + return com.google.spanner.v1.Mutation.Send.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.Mutation.Send build() { + com.google.spanner.v1.Mutation.Send result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.Mutation.Send buildPartial() { + com.google.spanner.v1.Mutation.Send result = new com.google.spanner.v1.Mutation.Send(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.v1.Mutation.Send result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.queue_ = queue_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = keyBuilder_ == null ? key_ : keyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deliverTime_ = + deliverTimeBuilder_ == null ? deliverTime_ : deliverTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.payload_ = payloadBuilder_ == null ? payload_ : payloadBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.Mutation.Send) { + return mergeFrom((com.google.spanner.v1.Mutation.Send) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.Mutation.Send other) { + if (other == com.google.spanner.v1.Mutation.Send.getDefaultInstance()) return this; + if (!other.getQueue().isEmpty()) { + queue_ = other.queue_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasKey()) { + mergeKey(other.getKey()); + } + if (other.hasDeliverTime()) { + mergeDeliverTime(other.getDeliverTime()); + } + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + 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: + { + queue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetDeliverTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetPayloadFieldBuilder().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 queue_ = ""; + + /** + * + * + *
+       * Required. The queue to which the message will be sent.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The queue. + */ + public java.lang.String getQueue() { + java.lang.Object ref = queue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The queue to which the message will be sent.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for queue. + */ + public com.google.protobuf.ByteString getQueueBytes() { + java.lang.Object ref = queue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The queue to which the message will be sent.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The queue to set. + * @return This builder for chaining. + */ + public Builder setQueue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The queue to which the message will be sent.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearQueue() { + queue_ = getDefaultInstance().getQueue(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The queue to which the message will be sent.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for queue to set. + * @return This builder for chaining. + */ + public Builder setQueueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ListValue key_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + keyBuilder_; + + /** + * + * + *
+       * Required. The primary key of the message to be sent.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the key field is set. + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Required. The primary key of the message to be sent.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + public com.google.protobuf.ListValue getKey() { + if (keyBuilder_ == null) { + return key_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : key_; + } else { + return keyBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The primary key of the message to be sent.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setKey(com.google.protobuf.ListValue value) { + if (keyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + } else { + keyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The primary key of the message to be sent.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setKey(com.google.protobuf.ListValue.Builder builderForValue) { + if (keyBuilder_ == null) { + key_ = builderForValue.build(); + } else { + keyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The primary key of the message to be sent.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeKey(com.google.protobuf.ListValue value) { + if (keyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && key_ != null + && key_ != com.google.protobuf.ListValue.getDefaultInstance()) { + getKeyBuilder().mergeFrom(value); + } else { + key_ = value; + } + } else { + keyBuilder_.mergeFrom(value); + } + if (key_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The primary key of the message to be sent.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000002); + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The primary key of the message to be sent.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ListValue.Builder getKeyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetKeyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The primary key of the message to be sent.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ListValueOrBuilder getKeyOrBuilder() { + if (keyBuilder_ != null) { + return keyBuilder_.getMessageOrBuilder(); + } else { + return key_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : key_; + } + } + + /** + * + * + *
+       * Required. The primary key of the message to be sent.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + internalGetKeyFieldBuilder() { + if (keyBuilder_ == null) { + keyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder>( + getKey(), getParentForChildren(), isClean()); + key_ = null; + } + return keyBuilder_; + } + + private com.google.protobuf.Timestamp deliverTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deliverTimeBuilder_; + + /** + * + * + *
+       * The time at which Spanner will begin attempting to deliver the message.
+       * If `deliver_time` is not set, Spanner will deliver the message
+       * immediately. If `deliver_time` is in the past, Spanner will replace it
+       * with a value closer to the current time.
+       * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + * + * @return Whether the deliverTime field is set. + */ + public boolean hasDeliverTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * The time at which Spanner will begin attempting to deliver the message.
+       * If `deliver_time` is not set, Spanner will deliver the message
+       * immediately. If `deliver_time` is in the past, Spanner will replace it
+       * with a value closer to the current time.
+       * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + * + * @return The deliverTime. + */ + public com.google.protobuf.Timestamp getDeliverTime() { + if (deliverTimeBuilder_ == null) { + return deliverTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deliverTime_; + } else { + return deliverTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * The time at which Spanner will begin attempting to deliver the message.
+       * If `deliver_time` is not set, Spanner will deliver the message
+       * immediately. If `deliver_time` is in the past, Spanner will replace it
+       * with a value closer to the current time.
+       * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + */ + public Builder setDeliverTime(com.google.protobuf.Timestamp value) { + if (deliverTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deliverTime_ = value; + } else { + deliverTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * The time at which Spanner will begin attempting to deliver the message.
+       * If `deliver_time` is not set, Spanner will deliver the message
+       * immediately. If `deliver_time` is in the past, Spanner will replace it
+       * with a value closer to the current time.
+       * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + */ + public Builder setDeliverTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deliverTimeBuilder_ == null) { + deliverTime_ = builderForValue.build(); + } else { + deliverTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * The time at which Spanner will begin attempting to deliver the message.
+       * If `deliver_time` is not set, Spanner will deliver the message
+       * immediately. If `deliver_time` is in the past, Spanner will replace it
+       * with a value closer to the current time.
+       * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + */ + public Builder mergeDeliverTime(com.google.protobuf.Timestamp value) { + if (deliverTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && deliverTime_ != null + && deliverTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeliverTimeBuilder().mergeFrom(value); + } else { + deliverTime_ = value; + } + } else { + deliverTimeBuilder_.mergeFrom(value); + } + if (deliverTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The time at which Spanner will begin attempting to deliver the message.
+       * If `deliver_time` is not set, Spanner will deliver the message
+       * immediately. If `deliver_time` is in the past, Spanner will replace it
+       * with a value closer to the current time.
+       * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + */ + public Builder clearDeliverTime() { + bitField0_ = (bitField0_ & ~0x00000004); + deliverTime_ = null; + if (deliverTimeBuilder_ != null) { + deliverTimeBuilder_.dispose(); + deliverTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * The time at which Spanner will begin attempting to deliver the message.
+       * If `deliver_time` is not set, Spanner will deliver the message
+       * immediately. If `deliver_time` is in the past, Spanner will replace it
+       * with a value closer to the current time.
+       * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getDeliverTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetDeliverTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * The time at which Spanner will begin attempting to deliver the message.
+       * If `deliver_time` is not set, Spanner will deliver the message
+       * immediately. If `deliver_time` is in the past, Spanner will replace it
+       * with a value closer to the current time.
+       * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getDeliverTimeOrBuilder() { + if (deliverTimeBuilder_ != null) { + return deliverTimeBuilder_.getMessageOrBuilder(); + } else { + return deliverTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deliverTime_; + } + } + + /** + * + * + *
+       * The time at which Spanner will begin attempting to deliver the message.
+       * If `deliver_time` is not set, Spanner will deliver the message
+       * immediately. If `deliver_time` is in the past, Spanner will replace it
+       * with a value closer to the current time.
+       * 
+ * + * .google.protobuf.Timestamp deliver_time = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetDeliverTimeFieldBuilder() { + if (deliverTimeBuilder_ == null) { + deliverTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeliverTime(), getParentForChildren(), isClean()); + deliverTime_ = null; + } + return deliverTimeBuilder_; + } + + private com.google.protobuf.Value payload_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + payloadBuilder_; + + /** + * + * + *
+       * The payload of the message.
+       * 
+ * + * .google.protobuf.Value payload = 4; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * The payload of the message.
+       * 
+ * + * .google.protobuf.Value payload = 4; + * + * @return The payload. + */ + public com.google.protobuf.Value getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * The payload of the message.
+       * 
+ * + * .google.protobuf.Value payload = 4; + */ + public Builder setPayload(com.google.protobuf.Value value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * The payload of the message.
+       * 
+ * + * .google.protobuf.Value payload = 4; + */ + public Builder setPayload(com.google.protobuf.Value.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * The payload of the message.
+       * 
+ * + * .google.protobuf.Value payload = 4; + */ + public Builder mergePayload(com.google.protobuf.Value value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && payload_ != null + && payload_ != com.google.protobuf.Value.getDefaultInstance()) { + getPayloadBuilder().mergeFrom(value); + } else { + payload_ = value; + } + } else { + payloadBuilder_.mergeFrom(value); + } + if (payload_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The payload of the message.
+       * 
+ * + * .google.protobuf.Value payload = 4; + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000008); + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * The payload of the message.
+       * 
+ * + * .google.protobuf.Value payload = 4; + */ + public com.google.protobuf.Value.Builder getPayloadBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetPayloadFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * The payload of the message.
+       * 
+ * + * .google.protobuf.Value payload = 4; + */ + public com.google.protobuf.ValueOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null ? com.google.protobuf.Value.getDefaultInstance() : payload_; + } + } + + /** + * + * + *
+       * The payload of the message.
+       * 
+ * + * .google.protobuf.Value payload = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + internalGetPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.Mutation.Send) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.Mutation.Send) + private static final com.google.spanner.v1.Mutation.Send DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.Mutation.Send(); + } + + public static com.google.spanner.v1.Mutation.Send getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Send parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.Mutation.Send getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AckOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.Mutation.Ack) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The queue where the message to be acked is stored.
+     * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The queue. + */ + java.lang.String getQueue(); + + /** + * + * + *
+     * Required. The queue where the message to be acked is stored.
+     * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for queue. + */ + com.google.protobuf.ByteString getQueueBytes(); + + /** + * + * + *
+     * Required. The primary key of the message to be acked.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the key field is set. + */ + boolean hasKey(); + + /** + * + * + *
+     * Required. The primary key of the message to be acked.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + com.google.protobuf.ListValue getKey(); + + /** + * + * + *
+     * Required. The primary key of the message to be acked.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.ListValueOrBuilder getKeyOrBuilder(); + + /** + * + * + *
+     * By default, an attempt to ack a message that does not exist will fail
+     * with a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack
+     * will succeed even if the message does not exist. This is useful for
+     * unconditionally acking a message, even if it is missing or has already
+     * been acked.
+     * 
+ * + * bool ignore_not_found = 3; + * + * @return The ignoreNotFound. + */ + boolean getIgnoreNotFound(); + } + + /** + * + * + *
+   * Arguments to [ack][google.spanner.v1.Mutation.ack] operations.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.Mutation.Ack} + */ + public static final class Ack extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.Mutation.Ack) + AckOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Ack"); + } + + // Use Ack.newBuilder() to construct. + private Ack(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Ack() { + queue_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_Ack_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_Ack_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Mutation.Ack.class, + com.google.spanner.v1.Mutation.Ack.Builder.class); + } + + private int bitField0_; + public static final int QUEUE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object queue_ = ""; + + /** + * + * + *
+     * Required. The queue where the message to be acked is stored.
+     * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The queue. + */ + @java.lang.Override + public java.lang.String getQueue() { + java.lang.Object ref = queue_; + 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(); + queue_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The queue where the message to be acked is stored.
+     * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for queue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueueBytes() { + java.lang.Object ref = queue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + private com.google.protobuf.ListValue key_; + + /** + * + * + *
+     * Required. The primary key of the message to be acked.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The primary key of the message to be acked.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ListValue getKey() { + return key_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : key_; + } + + /** + * + * + *
+     * Required. The primary key of the message to be acked.
+     * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.ListValueOrBuilder getKeyOrBuilder() { + return key_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : key_; + } + + public static final int IGNORE_NOT_FOUND_FIELD_NUMBER = 3; + private boolean ignoreNotFound_ = false; + + /** + * + * + *
+     * By default, an attempt to ack a message that does not exist will fail
+     * with a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack
+     * will succeed even if the message does not exist. This is useful for
+     * unconditionally acking a message, even if it is missing or has already
+     * been acked.
+     * 
+ * + * bool ignore_not_found = 3; + * + * @return The ignoreNotFound. + */ + @java.lang.Override + public boolean getIgnoreNotFound() { + return ignoreNotFound_; + } + + 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.GeneratedMessage.isStringEmpty(queue_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, queue_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getKey()); + } + if (ignoreNotFound_ != false) { + output.writeBool(3, ignoreNotFound_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queue_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, queue_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKey()); + } + if (ignoreNotFound_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreNotFound_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.Mutation.Ack)) { + return super.equals(obj); + } + com.google.spanner.v1.Mutation.Ack other = (com.google.spanner.v1.Mutation.Ack) obj; + + if (!getQueue().equals(other.getQueue())) return false; + if (hasKey() != other.hasKey()) return false; + if (hasKey()) { + if (!getKey().equals(other.getKey())) return false; + } + if (getIgnoreNotFound() != other.getIgnoreNotFound()) 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) + QUEUE_FIELD_NUMBER; + hash = (53 * hash) + getQueue().hashCode(); + if (hasKey()) { + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + } + hash = (37 * hash) + IGNORE_NOT_FOUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreNotFound()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Ack parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Mutation.Ack parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Mutation.Ack parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.Mutation.Ack 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Arguments to [ack][google.spanner.v1.Mutation.ack] operations.
+     * 
+ * + * Protobuf type {@code google.spanner.v1.Mutation.Ack} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.Mutation.Ack) + com.google.spanner.v1.Mutation.AckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_Ack_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_Ack_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Mutation.Ack.class, + com.google.spanner.v1.Mutation.Ack.Builder.class); + } + + // Construct using com.google.spanner.v1.Mutation.Ack.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queue_ = ""; + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + ignoreNotFound_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_Ack_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.Mutation.Ack getDefaultInstanceForType() { + return com.google.spanner.v1.Mutation.Ack.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.Mutation.Ack build() { + com.google.spanner.v1.Mutation.Ack result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.Mutation.Ack buildPartial() { + com.google.spanner.v1.Mutation.Ack result = new com.google.spanner.v1.Mutation.Ack(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.v1.Mutation.Ack result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.queue_ = queue_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = keyBuilder_ == null ? key_ : keyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ignoreNotFound_ = ignoreNotFound_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.Mutation.Ack) { + return mergeFrom((com.google.spanner.v1.Mutation.Ack) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.Mutation.Ack other) { + if (other == com.google.spanner.v1.Mutation.Ack.getDefaultInstance()) return this; + if (!other.getQueue().isEmpty()) { + queue_ = other.queue_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasKey()) { + mergeKey(other.getKey()); + } + if (other.getIgnoreNotFound() != false) { + setIgnoreNotFound(other.getIgnoreNotFound()); + } + 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: + { + queue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + ignoreNotFound_ = 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.lang.Object queue_ = ""; + + /** + * + * + *
+       * Required. The queue where the message to be acked is stored.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The queue. + */ + public java.lang.String getQueue() { + java.lang.Object ref = queue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The queue where the message to be acked is stored.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for queue. + */ + public com.google.protobuf.ByteString getQueueBytes() { + java.lang.Object ref = queue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The queue where the message to be acked is stored.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The queue to set. + * @return This builder for chaining. + */ + public Builder setQueue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The queue where the message to be acked is stored.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearQueue() { + queue_ = getDefaultInstance().getQueue(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The queue where the message to be acked is stored.
+       * 
+ * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for queue to set. + * @return This builder for chaining. + */ + public Builder setQueueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ListValue key_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + keyBuilder_; + + /** + * + * + *
+       * Required. The primary key of the message to be acked.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the key field is set. + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Required. The primary key of the message to be acked.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + public com.google.protobuf.ListValue getKey() { + if (keyBuilder_ == null) { + return key_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : key_; + } else { + return keyBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The primary key of the message to be acked.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setKey(com.google.protobuf.ListValue value) { + if (keyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + } else { + keyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The primary key of the message to be acked.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setKey(com.google.protobuf.ListValue.Builder builderForValue) { + if (keyBuilder_ == null) { + key_ = builderForValue.build(); + } else { + keyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The primary key of the message to be acked.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeKey(com.google.protobuf.ListValue value) { + if (keyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && key_ != null + && key_ != com.google.protobuf.ListValue.getDefaultInstance()) { + getKeyBuilder().mergeFrom(value); + } else { + key_ = value; + } + } else { + keyBuilder_.mergeFrom(value); + } + if (key_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The primary key of the message to be acked.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000002); + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The primary key of the message to be acked.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ListValue.Builder getKeyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetKeyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The primary key of the message to be acked.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ListValueOrBuilder getKeyOrBuilder() { + if (keyBuilder_ != null) { + return keyBuilder_.getMessageOrBuilder(); + } else { + return key_ == null ? com.google.protobuf.ListValue.getDefaultInstance() : key_; + } + } + + /** + * + * + *
+       * Required. The primary key of the message to be acked.
+       * 
+ * + * .google.protobuf.ListValue key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + internalGetKeyFieldBuilder() { + if (keyBuilder_ == null) { + keyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder>( + getKey(), getParentForChildren(), isClean()); + key_ = null; + } + return keyBuilder_; + } + + private boolean ignoreNotFound_; + + /** + * + * + *
+       * By default, an attempt to ack a message that does not exist will fail
+       * with a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack
+       * will succeed even if the message does not exist. This is useful for
+       * unconditionally acking a message, even if it is missing or has already
+       * been acked.
+       * 
+ * + * bool ignore_not_found = 3; + * + * @return The ignoreNotFound. + */ + @java.lang.Override + public boolean getIgnoreNotFound() { + return ignoreNotFound_; + } + + /** + * + * + *
+       * By default, an attempt to ack a message that does not exist will fail
+       * with a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack
+       * will succeed even if the message does not exist. This is useful for
+       * unconditionally acking a message, even if it is missing or has already
+       * been acked.
+       * 
+ * + * bool ignore_not_found = 3; + * + * @param value The ignoreNotFound to set. + * @return This builder for chaining. + */ + public Builder setIgnoreNotFound(boolean value) { + + ignoreNotFound_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * By default, an attempt to ack a message that does not exist will fail
+       * with a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack
+       * will succeed even if the message does not exist. This is useful for
+       * unconditionally acking a message, even if it is missing or has already
+       * been acked.
+       * 
+ * + * bool ignore_not_found = 3; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreNotFound() { + bitField0_ = (bitField0_ & ~0x00000004); + ignoreNotFound_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.Mutation.Ack) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.Mutation.Ack) + private static final com.google.spanner.v1.Mutation.Ack DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.Mutation.Ack(); + } + + public static com.google.spanner.v1.Mutation.Ack getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Ack parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.Mutation.Ack getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int operationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object operation_; + + public enum OperationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSERT(1), + UPDATE(2), + INSERT_OR_UPDATE(3), + REPLACE(4), + DELETE(5), + SEND(6), + ACK(7), + OPERATION_NOT_SET(0); + private final int value; + + private OperationCase(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 OperationCase valueOf(int value) { + return forNumber(value); + } + + public static OperationCase forNumber(int value) { + switch (value) { + case 1: + return INSERT; + case 2: + return UPDATE; + case 3: + return INSERT_OR_UPDATE; + case 4: + return REPLACE; + case 5: + return DELETE; + case 6: + return SEND; + case 7: + return ACK; + case 0: + return OPERATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OperationCase getOperationCase() { + return OperationCase.forNumber(operationCase_); + } + + public static final int INSERT_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Insert new rows in a table. If any of the rows already exist,
+   * the write or transaction fails with error `ALREADY_EXISTS`.
+   * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + * + * @return Whether the insert field is set. + */ + @java.lang.Override + public boolean hasInsert() { + return operationCase_ == 1; + } + + /** + * + * + *
+   * Insert new rows in a table. If any of the rows already exist,
+   * the write or transaction fails with error `ALREADY_EXISTS`.
+   * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + * + * @return The insert. + */ + @java.lang.Override + public com.google.spanner.v1.Mutation.Write getInsert() { + if (operationCase_ == 1) { + return (com.google.spanner.v1.Mutation.Write) operation_; + } + return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + } + + /** + * + * + *
+   * Insert new rows in a table. If any of the rows already exist,
+   * the write or transaction fails with error `ALREADY_EXISTS`.
+   * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + */ + @java.lang.Override + public com.google.spanner.v1.Mutation.WriteOrBuilder getInsertOrBuilder() { + if (operationCase_ == 1) { + return (com.google.spanner.v1.Mutation.Write) operation_; + } + return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + } + + public static final int UPDATE_FIELD_NUMBER = 2; + + /** + * + * + *
    * Update existing rows in a table. If any of the rows does not
    * already exist, the transaction fails with error `NOT_FOUND`.
    * 
@@ -3408,6 +5981,114 @@ public com.google.spanner.v1.Mutation.DeleteOrBuilder getDeleteOrBuilder() { return com.google.spanner.v1.Mutation.Delete.getDefaultInstance(); } + public static final int SEND_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Send a message to a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Send send = 6; + * + * @return Whether the send field is set. + */ + @java.lang.Override + public boolean hasSend() { + return operationCase_ == 6; + } + + /** + * + * + *
+   * Send a message to a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Send send = 6; + * + * @return The send. + */ + @java.lang.Override + public com.google.spanner.v1.Mutation.Send getSend() { + if (operationCase_ == 6) { + return (com.google.spanner.v1.Mutation.Send) operation_; + } + return com.google.spanner.v1.Mutation.Send.getDefaultInstance(); + } + + /** + * + * + *
+   * Send a message to a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Send send = 6; + */ + @java.lang.Override + public com.google.spanner.v1.Mutation.SendOrBuilder getSendOrBuilder() { + if (operationCase_ == 6) { + return (com.google.spanner.v1.Mutation.Send) operation_; + } + return com.google.spanner.v1.Mutation.Send.getDefaultInstance(); + } + + public static final int ACK_FIELD_NUMBER = 7; + + /** + * + * + *
+   * Ack a message from a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Ack ack = 7; + * + * @return Whether the ack field is set. + */ + @java.lang.Override + public boolean hasAck() { + return operationCase_ == 7; + } + + /** + * + * + *
+   * Ack a message from a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Ack ack = 7; + * + * @return The ack. + */ + @java.lang.Override + public com.google.spanner.v1.Mutation.Ack getAck() { + if (operationCase_ == 7) { + return (com.google.spanner.v1.Mutation.Ack) operation_; + } + return com.google.spanner.v1.Mutation.Ack.getDefaultInstance(); + } + + /** + * + * + *
+   * Ack a message from a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Ack ack = 7; + */ + @java.lang.Override + public com.google.spanner.v1.Mutation.AckOrBuilder getAckOrBuilder() { + if (operationCase_ == 7) { + return (com.google.spanner.v1.Mutation.Ack) operation_; + } + return com.google.spanner.v1.Mutation.Ack.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3437,6 +6118,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (operationCase_ == 5) { output.writeMessage(5, (com.google.spanner.v1.Mutation.Delete) operation_); } + if (operationCase_ == 6) { + output.writeMessage(6, (com.google.spanner.v1.Mutation.Send) operation_); + } + if (operationCase_ == 7) { + output.writeMessage(7, (com.google.spanner.v1.Mutation.Ack) operation_); + } getUnknownFields().writeTo(output); } @@ -3471,6 +6158,16 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 5, (com.google.spanner.v1.Mutation.Delete) operation_); } + if (operationCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.spanner.v1.Mutation.Send) operation_); + } + if (operationCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.spanner.v1.Mutation.Ack) operation_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3503,6 +6200,12 @@ public boolean equals(final java.lang.Object obj) { case 5: if (!getDelete().equals(other.getDelete())) return false; break; + case 6: + if (!getSend().equals(other.getSend())) return false; + break; + case 7: + if (!getAck().equals(other.getAck())) return false; + break; case 0: default: } @@ -3538,6 +6241,14 @@ public int hashCode() { hash = (37 * hash) + DELETE_FIELD_NUMBER; hash = (53 * hash) + getDelete().hashCode(); break; + case 6: + hash = (37 * hash) + SEND_FIELD_NUMBER; + hash = (53 * hash) + getSend().hashCode(); + break; + case 7: + hash = (37 * hash) + ACK_FIELD_NUMBER; + hash = (53 * hash) + getAck().hashCode(); + break; case 0: default: } @@ -3582,38 +6293,38 @@ public static com.google.spanner.v1.Mutation parseFrom( public static com.google.spanner.v1.Mutation parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Mutation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Mutation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.Mutation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Mutation parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Mutation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -3636,7 +6347,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3652,7 +6363,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.Mutation} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.Mutation) com.google.spanner.v1.MutationOrBuilder { @@ -3662,310 +6373,778 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.spanner.v1.MutationProto - .internal_static_google_spanner_v1_Mutation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.spanner.v1.Mutation.class, com.google.spanner.v1.Mutation.Builder.class); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Mutation.class, com.google.spanner.v1.Mutation.Builder.class); + } + + // Construct using com.google.spanner.v1.Mutation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (insertBuilder_ != null) { + insertBuilder_.clear(); + } + if (updateBuilder_ != null) { + updateBuilder_.clear(); + } + if (insertOrUpdateBuilder_ != null) { + insertOrUpdateBuilder_.clear(); + } + if (replaceBuilder_ != null) { + replaceBuilder_.clear(); + } + if (deleteBuilder_ != null) { + deleteBuilder_.clear(); + } + if (sendBuilder_ != null) { + sendBuilder_.clear(); + } + if (ackBuilder_ != null) { + ackBuilder_.clear(); + } + operationCase_ = 0; + operation_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.MutationProto + .internal_static_google_spanner_v1_Mutation_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.Mutation getDefaultInstanceForType() { + return com.google.spanner.v1.Mutation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.Mutation build() { + com.google.spanner.v1.Mutation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.Mutation buildPartial() { + com.google.spanner.v1.Mutation result = new com.google.spanner.v1.Mutation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.v1.Mutation result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.spanner.v1.Mutation result) { + result.operationCase_ = operationCase_; + result.operation_ = this.operation_; + if (operationCase_ == 1 && insertBuilder_ != null) { + result.operation_ = insertBuilder_.build(); + } + if (operationCase_ == 2 && updateBuilder_ != null) { + result.operation_ = updateBuilder_.build(); + } + if (operationCase_ == 3 && insertOrUpdateBuilder_ != null) { + result.operation_ = insertOrUpdateBuilder_.build(); + } + if (operationCase_ == 4 && replaceBuilder_ != null) { + result.operation_ = replaceBuilder_.build(); + } + if (operationCase_ == 5 && deleteBuilder_ != null) { + result.operation_ = deleteBuilder_.build(); + } + if (operationCase_ == 6 && sendBuilder_ != null) { + result.operation_ = sendBuilder_.build(); + } + if (operationCase_ == 7 && ackBuilder_ != null) { + result.operation_ = ackBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.Mutation) { + return mergeFrom((com.google.spanner.v1.Mutation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.Mutation other) { + if (other == com.google.spanner.v1.Mutation.getDefaultInstance()) return this; + switch (other.getOperationCase()) { + case INSERT: + { + mergeInsert(other.getInsert()); + break; + } + case UPDATE: + { + mergeUpdate(other.getUpdate()); + break; + } + case INSERT_OR_UPDATE: + { + mergeInsertOrUpdate(other.getInsertOrUpdate()); + break; + } + case REPLACE: + { + mergeReplace(other.getReplace()); + break; + } + case DELETE: + { + mergeDelete(other.getDelete()); + break; + } + case SEND: + { + mergeSend(other.getSend()); + break; + } + case ACK: + { + mergeAck(other.getAck()); + break; + } + case OPERATION_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(internalGetInsertFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetUpdateFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetInsertOrUpdateFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetReplaceFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(internalGetDeleteFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetSendFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(internalGetAckFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 7; + 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; } - // Construct using com.google.spanner.v1.Mutation.newBuilder() - private Builder() {} + private int operationCase_ = 0; + private java.lang.Object operation_; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + public OperationCase getOperationCase() { + return OperationCase.forNumber(operationCase_); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (insertBuilder_ != null) { - insertBuilder_.clear(); - } - if (updateBuilder_ != null) { - updateBuilder_.clear(); - } - if (insertOrUpdateBuilder_ != null) { - insertOrUpdateBuilder_.clear(); - } - if (replaceBuilder_ != null) { - replaceBuilder_.clear(); - } - if (deleteBuilder_ != null) { - deleteBuilder_.clear(); - } + public Builder clearOperation() { operationCase_ = 0; operation_ = null; + onChanged(); return this; } + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Write, + com.google.spanner.v1.Mutation.Write.Builder, + com.google.spanner.v1.Mutation.WriteOrBuilder> + insertBuilder_; + + /** + * + * + *
+     * Insert new rows in a table. If any of the rows already exist,
+     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + * + * @return Whether the insert field is set. + */ @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.spanner.v1.MutationProto - .internal_static_google_spanner_v1_Mutation_descriptor; + public boolean hasInsert() { + return operationCase_ == 1; } + /** + * + * + *
+     * Insert new rows in a table. If any of the rows already exist,
+     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + * + * @return The insert. + */ @java.lang.Override - public com.google.spanner.v1.Mutation getDefaultInstanceForType() { - return com.google.spanner.v1.Mutation.getDefaultInstance(); + public com.google.spanner.v1.Mutation.Write getInsert() { + if (insertBuilder_ == null) { + if (operationCase_ == 1) { + return (com.google.spanner.v1.Mutation.Write) operation_; + } + return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + } else { + if (operationCase_ == 1) { + return insertBuilder_.getMessage(); + } + return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + } } - @java.lang.Override - public com.google.spanner.v1.Mutation build() { - com.google.spanner.v1.Mutation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
+     * Insert new rows in a table. If any of the rows already exist,
+     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + */ + public Builder setInsert(com.google.spanner.v1.Mutation.Write value) { + if (insertBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + onChanged(); + } else { + insertBuilder_.setMessage(value); } - return result; + operationCase_ = 1; + return this; } - @java.lang.Override - public com.google.spanner.v1.Mutation buildPartial() { - com.google.spanner.v1.Mutation result = new com.google.spanner.v1.Mutation(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
+     * Insert new rows in a table. If any of the rows already exist,
+     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + */ + public Builder setInsert(com.google.spanner.v1.Mutation.Write.Builder builderForValue) { + if (insertBuilder_ == null) { + operation_ = builderForValue.build(); + onChanged(); + } else { + insertBuilder_.setMessage(builderForValue.build()); + } + operationCase_ = 1; + return this; + } + + /** + * + * + *
+     * Insert new rows in a table. If any of the rows already exist,
+     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + */ + public Builder mergeInsert(com.google.spanner.v1.Mutation.Write value) { + if (insertBuilder_ == null) { + if (operationCase_ == 1 + && operation_ != com.google.spanner.v1.Mutation.Write.getDefaultInstance()) { + operation_ = + com.google.spanner.v1.Mutation.Write.newBuilder( + (com.google.spanner.v1.Mutation.Write) operation_) + .mergeFrom(value) + .buildPartial(); + } else { + operation_ = value; + } + onChanged(); + } else { + if (operationCase_ == 1) { + insertBuilder_.mergeFrom(value); + } else { + insertBuilder_.setMessage(value); + } + } + operationCase_ = 1; + return this; + } + + /** + * + * + *
+     * Insert new rows in a table. If any of the rows already exist,
+     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + */ + public Builder clearInsert() { + if (insertBuilder_ == null) { + if (operationCase_ == 1) { + operationCase_ = 0; + operation_ = null; + onChanged(); + } + } else { + if (operationCase_ == 1) { + operationCase_ = 0; + operation_ = null; + } + insertBuilder_.clear(); } - buildPartialOneofs(result); - onBuilt(); - return result; + return this; } - private void buildPartial0(com.google.spanner.v1.Mutation result) { - int from_bitField0_ = bitField0_; + /** + * + * + *
+     * Insert new rows in a table. If any of the rows already exist,
+     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + */ + public com.google.spanner.v1.Mutation.Write.Builder getInsertBuilder() { + return internalGetInsertFieldBuilder().getBuilder(); } - private void buildPartialOneofs(com.google.spanner.v1.Mutation result) { - result.operationCase_ = operationCase_; - result.operation_ = this.operation_; - if (operationCase_ == 1 && insertBuilder_ != null) { - result.operation_ = insertBuilder_.build(); - } - if (operationCase_ == 2 && updateBuilder_ != null) { - result.operation_ = updateBuilder_.build(); - } - if (operationCase_ == 3 && insertOrUpdateBuilder_ != null) { - result.operation_ = insertOrUpdateBuilder_.build(); - } - if (operationCase_ == 4 && replaceBuilder_ != null) { - result.operation_ = replaceBuilder_.build(); - } - if (operationCase_ == 5 && deleteBuilder_ != null) { - result.operation_ = deleteBuilder_.build(); + /** + * + * + *
+     * Insert new rows in a table. If any of the rows already exist,
+     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + */ + @java.lang.Override + public com.google.spanner.v1.Mutation.WriteOrBuilder getInsertOrBuilder() { + if ((operationCase_ == 1) && (insertBuilder_ != null)) { + return insertBuilder_.getMessageOrBuilder(); + } else { + if (operationCase_ == 1) { + return (com.google.spanner.v1.Mutation.Write) operation_; + } + return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); } } - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
+     * Insert new rows in a table. If any of the rows already exist,
+     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write insert = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Write, + com.google.spanner.v1.Mutation.Write.Builder, + com.google.spanner.v1.Mutation.WriteOrBuilder> + internalGetInsertFieldBuilder() { + if (insertBuilder_ == null) { + if (!(operationCase_ == 1)) { + operation_ = com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + } + insertBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Write, + com.google.spanner.v1.Mutation.Write.Builder, + com.google.spanner.v1.Mutation.WriteOrBuilder>( + (com.google.spanner.v1.Mutation.Write) operation_, + getParentForChildren(), + isClean()); + operation_ = null; + } + operationCase_ = 1; + onChanged(); + return insertBuilder_; } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Write, + com.google.spanner.v1.Mutation.Write.Builder, + com.google.spanner.v1.Mutation.WriteOrBuilder> + updateBuilder_; + /** + * + * + *
+     * Update existing rows in a table. If any of the rows does not
+     * already exist, the transaction fails with error `NOT_FOUND`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write update = 2; + * + * @return Whether the update field is set. + */ @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public boolean hasUpdate() { + return operationCase_ == 2; } + /** + * + * + *
+     * Update existing rows in a table. If any of the rows does not
+     * already exist, the transaction fails with error `NOT_FOUND`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write update = 2; + * + * @return The update. + */ @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public com.google.spanner.v1.Mutation.Write getUpdate() { + if (updateBuilder_ == null) { + if (operationCase_ == 2) { + return (com.google.spanner.v1.Mutation.Write) operation_; + } + return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + } else { + if (operationCase_ == 2) { + return updateBuilder_.getMessage(); + } + return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + } } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+     * Update existing rows in a table. If any of the rows does not
+     * already exist, the transaction fails with error `NOT_FOUND`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write update = 2; + */ + public Builder setUpdate(com.google.spanner.v1.Mutation.Write value) { + if (updateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + onChanged(); + } else { + updateBuilder_.setMessage(value); + } + operationCase_ = 2; + return this; } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * Update existing rows in a table. If any of the rows does not
+     * already exist, the transaction fails with error `NOT_FOUND`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write update = 2; + */ + public Builder setUpdate(com.google.spanner.v1.Mutation.Write.Builder builderForValue) { + if (updateBuilder_ == null) { + operation_ = builderForValue.build(); + onChanged(); + } else { + updateBuilder_.setMessage(builderForValue.build()); + } + operationCase_ = 2; + return this; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.spanner.v1.Mutation) { - return mergeFrom((com.google.spanner.v1.Mutation) other); + /** + * + * + *
+     * Update existing rows in a table. If any of the rows does not
+     * already exist, the transaction fails with error `NOT_FOUND`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write update = 2; + */ + public Builder mergeUpdate(com.google.spanner.v1.Mutation.Write value) { + if (updateBuilder_ == null) { + if (operationCase_ == 2 + && operation_ != com.google.spanner.v1.Mutation.Write.getDefaultInstance()) { + operation_ = + com.google.spanner.v1.Mutation.Write.newBuilder( + (com.google.spanner.v1.Mutation.Write) operation_) + .mergeFrom(value) + .buildPartial(); + } else { + operation_ = value; + } + onChanged(); } else { - super.mergeFrom(other); - return this; + if (operationCase_ == 2) { + updateBuilder_.mergeFrom(value); + } else { + updateBuilder_.setMessage(value); + } } + operationCase_ = 2; + return this; } - public Builder mergeFrom(com.google.spanner.v1.Mutation other) { - if (other == com.google.spanner.v1.Mutation.getDefaultInstance()) return this; - switch (other.getOperationCase()) { - case INSERT: - { - mergeInsert(other.getInsert()); - break; - } - case UPDATE: - { - mergeUpdate(other.getUpdate()); - break; - } - case INSERT_OR_UPDATE: - { - mergeInsertOrUpdate(other.getInsertOrUpdate()); - break; - } - case REPLACE: - { - mergeReplace(other.getReplace()); - break; - } - case DELETE: - { - mergeDelete(other.getDelete()); - break; - } - case OPERATION_NOT_SET: - { - break; - } + /** + * + * + *
+     * Update existing rows in a table. If any of the rows does not
+     * already exist, the transaction fails with error `NOT_FOUND`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write update = 2; + */ + public Builder clearUpdate() { + if (updateBuilder_ == null) { + if (operationCase_ == 2) { + operationCase_ = 0; + operation_ = null; + onChanged(); + } + } else { + if (operationCase_ == 2) { + operationCase_ = 0; + operation_ = null; + } + updateBuilder_.clear(); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+     * Update existing rows in a table. If any of the rows does not
+     * already exist, the transaction fails with error `NOT_FOUND`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write update = 2; + */ + public com.google.spanner.v1.Mutation.Write.Builder getUpdateBuilder() { + return internalGetUpdateFieldBuilder().getBuilder(); } + /** + * + * + *
+     * Update existing rows in a table. If any of the rows does not
+     * already exist, the transaction fails with error `NOT_FOUND`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write update = 2; + */ @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(); + public com.google.spanner.v1.Mutation.WriteOrBuilder getUpdateOrBuilder() { + if ((operationCase_ == 2) && (updateBuilder_ != null)) { + return updateBuilder_.getMessageOrBuilder(); + } else { + if (operationCase_ == 2) { + return (com.google.spanner.v1.Mutation.Write) operation_; + } + return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getInsertFieldBuilder().getBuilder(), extensionRegistry); - operationCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage(getUpdateFieldBuilder().getBuilder(), extensionRegistry); - operationCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage(getInsertOrUpdateFieldBuilder().getBuilder(), extensionRegistry); - operationCase_ = 3; - break; - } // case 26 - case 34: - { - input.readMessage(getReplaceFieldBuilder().getBuilder(), extensionRegistry); - operationCase_ = 4; - break; - } // case 34 - case 42: - { - input.readMessage(getDeleteFieldBuilder().getBuilder(), extensionRegistry); - operationCase_ = 5; - 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 operationCase_ = 0; - private java.lang.Object operation_; - - public OperationCase getOperationCase() { - return OperationCase.forNumber(operationCase_); } - public Builder clearOperation() { - operationCase_ = 0; - operation_ = null; + /** + * + * + *
+     * Update existing rows in a table. If any of the rows does not
+     * already exist, the transaction fails with error `NOT_FOUND`.
+     * 
+ * + * .google.spanner.v1.Mutation.Write update = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Write, + com.google.spanner.v1.Mutation.Write.Builder, + com.google.spanner.v1.Mutation.WriteOrBuilder> + internalGetUpdateFieldBuilder() { + if (updateBuilder_ == null) { + if (!(operationCase_ == 2)) { + operation_ = com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + } + updateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Write, + com.google.spanner.v1.Mutation.Write.Builder, + com.google.spanner.v1.Mutation.WriteOrBuilder>( + (com.google.spanner.v1.Mutation.Write) operation_, + getParentForChildren(), + isClean()); + operation_ = null; + } + operationCase_ = 2; onChanged(); - return this; + return updateBuilder_; } - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Mutation.Write, com.google.spanner.v1.Mutation.Write.Builder, com.google.spanner.v1.Mutation.WriteOrBuilder> - insertBuilder_; + insertOrUpdateBuilder_; /** * * *
-     * Insert new rows in a table. If any of the rows already exist,
-     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, then its column values are overwritten with the ones
+     * provided. Any column values not explicitly written are preserved.
+     *
+     * When using
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
+     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
+     * columns in the table must be given a value. This holds true even when the
+     * row already exists and will therefore actually be updated.
      * 
* - * .google.spanner.v1.Mutation.Write insert = 1; + * .google.spanner.v1.Mutation.Write insert_or_update = 3; * - * @return Whether the insert field is set. + * @return Whether the insertOrUpdate field is set. */ @java.lang.Override - public boolean hasInsert() { - return operationCase_ == 1; + public boolean hasInsertOrUpdate() { + return operationCase_ == 3; } /** * * *
-     * Insert new rows in a table. If any of the rows already exist,
-     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, then its column values are overwritten with the ones
+     * provided. Any column values not explicitly written are preserved.
+     *
+     * When using
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
+     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
+     * columns in the table must be given a value. This holds true even when the
+     * row already exists and will therefore actually be updated.
      * 
* - * .google.spanner.v1.Mutation.Write insert = 1; + * .google.spanner.v1.Mutation.Write insert_or_update = 3; * - * @return The insert. + * @return The insertOrUpdate. */ @java.lang.Override - public com.google.spanner.v1.Mutation.Write getInsert() { - if (insertBuilder_ == null) { - if (operationCase_ == 1) { + public com.google.spanner.v1.Mutation.Write getInsertOrUpdate() { + if (insertOrUpdateBuilder_ == null) { + if (operationCase_ == 3) { return (com.google.spanner.v1.Mutation.Write) operation_; } return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); } else { - if (operationCase_ == 1) { - return insertBuilder_.getMessage(); + if (operationCase_ == 3) { + return insertOrUpdateBuilder_.getMessage(); } return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); } @@ -3975,23 +7154,30 @@ public com.google.spanner.v1.Mutation.Write getInsert() { * * *
-     * Insert new rows in a table. If any of the rows already exist,
-     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, then its column values are overwritten with the ones
+     * provided. Any column values not explicitly written are preserved.
+     *
+     * When using
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
+     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
+     * columns in the table must be given a value. This holds true even when the
+     * row already exists and will therefore actually be updated.
      * 
* - * .google.spanner.v1.Mutation.Write insert = 1; + * .google.spanner.v1.Mutation.Write insert_or_update = 3; */ - public Builder setInsert(com.google.spanner.v1.Mutation.Write value) { - if (insertBuilder_ == null) { + public Builder setInsertOrUpdate(com.google.spanner.v1.Mutation.Write value) { + if (insertOrUpdateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } operation_ = value; onChanged(); } else { - insertBuilder_.setMessage(value); + insertOrUpdateBuilder_.setMessage(value); } - operationCase_ = 1; + operationCase_ = 3; return this; } @@ -3999,20 +7185,27 @@ public Builder setInsert(com.google.spanner.v1.Mutation.Write value) { * * *
-     * Insert new rows in a table. If any of the rows already exist,
-     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, then its column values are overwritten with the ones
+     * provided. Any column values not explicitly written are preserved.
+     *
+     * When using
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
+     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
+     * columns in the table must be given a value. This holds true even when the
+     * row already exists and will therefore actually be updated.
      * 
* - * .google.spanner.v1.Mutation.Write insert = 1; + * .google.spanner.v1.Mutation.Write insert_or_update = 3; */ - public Builder setInsert(com.google.spanner.v1.Mutation.Write.Builder builderForValue) { - if (insertBuilder_ == null) { + public Builder setInsertOrUpdate(com.google.spanner.v1.Mutation.Write.Builder builderForValue) { + if (insertOrUpdateBuilder_ == null) { operation_ = builderForValue.build(); onChanged(); } else { - insertBuilder_.setMessage(builderForValue.build()); + insertOrUpdateBuilder_.setMessage(builderForValue.build()); } - operationCase_ = 1; + operationCase_ = 3; return this; } @@ -4020,15 +7213,22 @@ public Builder setInsert(com.google.spanner.v1.Mutation.Write.Builder builderFor * * *
-     * Insert new rows in a table. If any of the rows already exist,
-     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, then its column values are overwritten with the ones
+     * provided. Any column values not explicitly written are preserved.
+     *
+     * When using
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
+     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
+     * columns in the table must be given a value. This holds true even when the
+     * row already exists and will therefore actually be updated.
      * 
* - * .google.spanner.v1.Mutation.Write insert = 1; + * .google.spanner.v1.Mutation.Write insert_or_update = 3; */ - public Builder mergeInsert(com.google.spanner.v1.Mutation.Write value) { - if (insertBuilder_ == null) { - if (operationCase_ == 1 + public Builder mergeInsertOrUpdate(com.google.spanner.v1.Mutation.Write value) { + if (insertOrUpdateBuilder_ == null) { + if (operationCase_ == 3 && operation_ != com.google.spanner.v1.Mutation.Write.getDefaultInstance()) { operation_ = com.google.spanner.v1.Mutation.Write.newBuilder( @@ -4040,13 +7240,13 @@ public Builder mergeInsert(com.google.spanner.v1.Mutation.Write value) { } onChanged(); } else { - if (operationCase_ == 1) { - insertBuilder_.mergeFrom(value); + if (operationCase_ == 3) { + insertOrUpdateBuilder_.mergeFrom(value); } else { - insertBuilder_.setMessage(value); + insertOrUpdateBuilder_.setMessage(value); } } - operationCase_ = 1; + operationCase_ = 3; return this; } @@ -4054,25 +7254,32 @@ public Builder mergeInsert(com.google.spanner.v1.Mutation.Write value) { * * *
-     * Insert new rows in a table. If any of the rows already exist,
-     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, then its column values are overwritten with the ones
+     * provided. Any column values not explicitly written are preserved.
+     *
+     * When using
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
+     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
+     * columns in the table must be given a value. This holds true even when the
+     * row already exists and will therefore actually be updated.
      * 
* - * .google.spanner.v1.Mutation.Write insert = 1; + * .google.spanner.v1.Mutation.Write insert_or_update = 3; */ - public Builder clearInsert() { - if (insertBuilder_ == null) { - if (operationCase_ == 1) { + public Builder clearInsertOrUpdate() { + if (insertOrUpdateBuilder_ == null) { + if (operationCase_ == 3) { operationCase_ = 0; operation_ = null; onChanged(); } } else { - if (operationCase_ == 1) { + if (operationCase_ == 3) { operationCase_ = 0; operation_ = null; } - insertBuilder_.clear(); + insertOrUpdateBuilder_.clear(); } return this; } @@ -4081,32 +7288,46 @@ public Builder clearInsert() { * * *
-     * Insert new rows in a table. If any of the rows already exist,
-     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, then its column values are overwritten with the ones
+     * provided. Any column values not explicitly written are preserved.
+     *
+     * When using
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
+     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
+     * columns in the table must be given a value. This holds true even when the
+     * row already exists and will therefore actually be updated.
      * 
* - * .google.spanner.v1.Mutation.Write insert = 1; + * .google.spanner.v1.Mutation.Write insert_or_update = 3; */ - public com.google.spanner.v1.Mutation.Write.Builder getInsertBuilder() { - return getInsertFieldBuilder().getBuilder(); + public com.google.spanner.v1.Mutation.Write.Builder getInsertOrUpdateBuilder() { + return internalGetInsertOrUpdateFieldBuilder().getBuilder(); } /** * * *
-     * Insert new rows in a table. If any of the rows already exist,
-     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, then its column values are overwritten with the ones
+     * provided. Any column values not explicitly written are preserved.
+     *
+     * When using
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
+     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
+     * columns in the table must be given a value. This holds true even when the
+     * row already exists and will therefore actually be updated.
      * 
* - * .google.spanner.v1.Mutation.Write insert = 1; + * .google.spanner.v1.Mutation.Write insert_or_update = 3; */ @java.lang.Override - public com.google.spanner.v1.Mutation.WriteOrBuilder getInsertOrBuilder() { - if ((operationCase_ == 1) && (insertBuilder_ != null)) { - return insertBuilder_.getMessageOrBuilder(); + public com.google.spanner.v1.Mutation.WriteOrBuilder getInsertOrUpdateOrBuilder() { + if ((operationCase_ == 3) && (insertOrUpdateBuilder_ != null)) { + return insertOrUpdateBuilder_.getMessageOrBuilder(); } else { - if (operationCase_ == 1) { + if (operationCase_ == 3) { return (com.google.spanner.v1.Mutation.Write) operation_; } return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); @@ -4117,23 +7338,30 @@ public com.google.spanner.v1.Mutation.WriteOrBuilder getInsertOrBuilder() { * * *
-     * Insert new rows in a table. If any of the rows already exist,
-     * the write or transaction fails with error `ALREADY_EXISTS`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, then its column values are overwritten with the ones
+     * provided. Any column values not explicitly written are preserved.
+     *
+     * When using
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
+     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
+     * columns in the table must be given a value. This holds true even when the
+     * row already exists and will therefore actually be updated.
      * 
* - * .google.spanner.v1.Mutation.Write insert = 1; + * .google.spanner.v1.Mutation.Write insert_or_update = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Mutation.Write, com.google.spanner.v1.Mutation.Write.Builder, com.google.spanner.v1.Mutation.WriteOrBuilder> - getInsertFieldBuilder() { - if (insertBuilder_ == null) { - if (!(operationCase_ == 1)) { + internalGetInsertOrUpdateFieldBuilder() { + if (insertOrUpdateBuilder_ == null) { + if (!(operationCase_ == 3)) { operation_ = com.google.spanner.v1.Mutation.Write.getDefaultInstance(); } - insertBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + insertOrUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Mutation.Write, com.google.spanner.v1.Mutation.Write.Builder, com.google.spanner.v1.Mutation.WriteOrBuilder>( @@ -4142,56 +7370,72 @@ public com.google.spanner.v1.Mutation.WriteOrBuilder getInsertOrBuilder() { isClean()); operation_ = null; } - operationCase_ = 1; + operationCase_ = 3; onChanged(); - return insertBuilder_; + return insertOrUpdateBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Mutation.Write, com.google.spanner.v1.Mutation.Write.Builder, com.google.spanner.v1.Mutation.WriteOrBuilder> - updateBuilder_; + replaceBuilder_; /** * * *
-     * Update existing rows in a table. If any of the rows does not
-     * already exist, the transaction fails with error `NOT_FOUND`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, it is deleted, and the column values provided are
+     * inserted instead. Unlike
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+     * means any values not explicitly written become `NULL`.
+     *
+     * In an interleaved table, if you create the child table with the
+     * `ON DELETE CASCADE` annotation, then replacing a parent row
+     * also deletes the child rows. Otherwise, you must delete the
+     * child rows before you replace the parent row.
      * 
* - * .google.spanner.v1.Mutation.Write update = 2; + * .google.spanner.v1.Mutation.Write replace = 4; * - * @return Whether the update field is set. + * @return Whether the replace field is set. */ @java.lang.Override - public boolean hasUpdate() { - return operationCase_ == 2; + public boolean hasReplace() { + return operationCase_ == 4; } /** * * *
-     * Update existing rows in a table. If any of the rows does not
-     * already exist, the transaction fails with error `NOT_FOUND`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, it is deleted, and the column values provided are
+     * inserted instead. Unlike
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+     * means any values not explicitly written become `NULL`.
+     *
+     * In an interleaved table, if you create the child table with the
+     * `ON DELETE CASCADE` annotation, then replacing a parent row
+     * also deletes the child rows. Otherwise, you must delete the
+     * child rows before you replace the parent row.
      * 
* - * .google.spanner.v1.Mutation.Write update = 2; + * .google.spanner.v1.Mutation.Write replace = 4; * - * @return The update. + * @return The replace. */ @java.lang.Override - public com.google.spanner.v1.Mutation.Write getUpdate() { - if (updateBuilder_ == null) { - if (operationCase_ == 2) { + public com.google.spanner.v1.Mutation.Write getReplace() { + if (replaceBuilder_ == null) { + if (operationCase_ == 4) { return (com.google.spanner.v1.Mutation.Write) operation_; } return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); } else { - if (operationCase_ == 2) { - return updateBuilder_.getMessage(); + if (operationCase_ == 4) { + return replaceBuilder_.getMessage(); } return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); } @@ -4201,23 +7445,31 @@ public com.google.spanner.v1.Mutation.Write getUpdate() { * * *
-     * Update existing rows in a table. If any of the rows does not
-     * already exist, the transaction fails with error `NOT_FOUND`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, it is deleted, and the column values provided are
+     * inserted instead. Unlike
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+     * means any values not explicitly written become `NULL`.
+     *
+     * In an interleaved table, if you create the child table with the
+     * `ON DELETE CASCADE` annotation, then replacing a parent row
+     * also deletes the child rows. Otherwise, you must delete the
+     * child rows before you replace the parent row.
      * 
* - * .google.spanner.v1.Mutation.Write update = 2; + * .google.spanner.v1.Mutation.Write replace = 4; */ - public Builder setUpdate(com.google.spanner.v1.Mutation.Write value) { - if (updateBuilder_ == null) { + public Builder setReplace(com.google.spanner.v1.Mutation.Write value) { + if (replaceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } operation_ = value; onChanged(); } else { - updateBuilder_.setMessage(value); + replaceBuilder_.setMessage(value); } - operationCase_ = 2; + operationCase_ = 4; return this; } @@ -4225,20 +7477,28 @@ public Builder setUpdate(com.google.spanner.v1.Mutation.Write value) { * * *
-     * Update existing rows in a table. If any of the rows does not
-     * already exist, the transaction fails with error `NOT_FOUND`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, it is deleted, and the column values provided are
+     * inserted instead. Unlike
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+     * means any values not explicitly written become `NULL`.
+     *
+     * In an interleaved table, if you create the child table with the
+     * `ON DELETE CASCADE` annotation, then replacing a parent row
+     * also deletes the child rows. Otherwise, you must delete the
+     * child rows before you replace the parent row.
      * 
* - * .google.spanner.v1.Mutation.Write update = 2; + * .google.spanner.v1.Mutation.Write replace = 4; */ - public Builder setUpdate(com.google.spanner.v1.Mutation.Write.Builder builderForValue) { - if (updateBuilder_ == null) { + public Builder setReplace(com.google.spanner.v1.Mutation.Write.Builder builderForValue) { + if (replaceBuilder_ == null) { operation_ = builderForValue.build(); onChanged(); } else { - updateBuilder_.setMessage(builderForValue.build()); + replaceBuilder_.setMessage(builderForValue.build()); } - operationCase_ = 2; + operationCase_ = 4; return this; } @@ -4246,15 +7506,23 @@ public Builder setUpdate(com.google.spanner.v1.Mutation.Write.Builder builderFor * * *
-     * Update existing rows in a table. If any of the rows does not
-     * already exist, the transaction fails with error `NOT_FOUND`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, it is deleted, and the column values provided are
+     * inserted instead. Unlike
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+     * means any values not explicitly written become `NULL`.
+     *
+     * In an interleaved table, if you create the child table with the
+     * `ON DELETE CASCADE` annotation, then replacing a parent row
+     * also deletes the child rows. Otherwise, you must delete the
+     * child rows before you replace the parent row.
      * 
* - * .google.spanner.v1.Mutation.Write update = 2; + * .google.spanner.v1.Mutation.Write replace = 4; */ - public Builder mergeUpdate(com.google.spanner.v1.Mutation.Write value) { - if (updateBuilder_ == null) { - if (operationCase_ == 2 + public Builder mergeReplace(com.google.spanner.v1.Mutation.Write value) { + if (replaceBuilder_ == null) { + if (operationCase_ == 4 && operation_ != com.google.spanner.v1.Mutation.Write.getDefaultInstance()) { operation_ = com.google.spanner.v1.Mutation.Write.newBuilder( @@ -4266,13 +7534,13 @@ public Builder mergeUpdate(com.google.spanner.v1.Mutation.Write value) { } onChanged(); } else { - if (operationCase_ == 2) { - updateBuilder_.mergeFrom(value); + if (operationCase_ == 4) { + replaceBuilder_.mergeFrom(value); } else { - updateBuilder_.setMessage(value); + replaceBuilder_.setMessage(value); } } - operationCase_ = 2; + operationCase_ = 4; return this; } @@ -4280,25 +7548,33 @@ public Builder mergeUpdate(com.google.spanner.v1.Mutation.Write value) { * * *
-     * Update existing rows in a table. If any of the rows does not
-     * already exist, the transaction fails with error `NOT_FOUND`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, it is deleted, and the column values provided are
+     * inserted instead. Unlike
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+     * means any values not explicitly written become `NULL`.
+     *
+     * In an interleaved table, if you create the child table with the
+     * `ON DELETE CASCADE` annotation, then replacing a parent row
+     * also deletes the child rows. Otherwise, you must delete the
+     * child rows before you replace the parent row.
      * 
* - * .google.spanner.v1.Mutation.Write update = 2; + * .google.spanner.v1.Mutation.Write replace = 4; */ - public Builder clearUpdate() { - if (updateBuilder_ == null) { - if (operationCase_ == 2) { + public Builder clearReplace() { + if (replaceBuilder_ == null) { + if (operationCase_ == 4) { operationCase_ = 0; operation_ = null; onChanged(); } } else { - if (operationCase_ == 2) { + if (operationCase_ == 4) { operationCase_ = 0; operation_ = null; } - updateBuilder_.clear(); + replaceBuilder_.clear(); } return this; } @@ -4307,32 +7583,48 @@ public Builder clearUpdate() { * * *
-     * Update existing rows in a table. If any of the rows does not
-     * already exist, the transaction fails with error `NOT_FOUND`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, it is deleted, and the column values provided are
+     * inserted instead. Unlike
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+     * means any values not explicitly written become `NULL`.
+     *
+     * In an interleaved table, if you create the child table with the
+     * `ON DELETE CASCADE` annotation, then replacing a parent row
+     * also deletes the child rows. Otherwise, you must delete the
+     * child rows before you replace the parent row.
      * 
* - * .google.spanner.v1.Mutation.Write update = 2; + * .google.spanner.v1.Mutation.Write replace = 4; */ - public com.google.spanner.v1.Mutation.Write.Builder getUpdateBuilder() { - return getUpdateFieldBuilder().getBuilder(); + public com.google.spanner.v1.Mutation.Write.Builder getReplaceBuilder() { + return internalGetReplaceFieldBuilder().getBuilder(); } /** * * *
-     * Update existing rows in a table. If any of the rows does not
-     * already exist, the transaction fails with error `NOT_FOUND`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, it is deleted, and the column values provided are
+     * inserted instead. Unlike
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+     * means any values not explicitly written become `NULL`.
+     *
+     * In an interleaved table, if you create the child table with the
+     * `ON DELETE CASCADE` annotation, then replacing a parent row
+     * also deletes the child rows. Otherwise, you must delete the
+     * child rows before you replace the parent row.
      * 
* - * .google.spanner.v1.Mutation.Write update = 2; + * .google.spanner.v1.Mutation.Write replace = 4; */ @java.lang.Override - public com.google.spanner.v1.Mutation.WriteOrBuilder getUpdateOrBuilder() { - if ((operationCase_ == 2) && (updateBuilder_ != null)) { - return updateBuilder_.getMessageOrBuilder(); + public com.google.spanner.v1.Mutation.WriteOrBuilder getReplaceOrBuilder() { + if ((operationCase_ == 4) && (replaceBuilder_ != null)) { + return replaceBuilder_.getMessageOrBuilder(); } else { - if (operationCase_ == 2) { + if (operationCase_ == 4) { return (com.google.spanner.v1.Mutation.Write) operation_; } return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); @@ -4343,23 +7635,31 @@ public com.google.spanner.v1.Mutation.WriteOrBuilder getUpdateOrBuilder() { * * *
-     * Update existing rows in a table. If any of the rows does not
-     * already exist, the transaction fails with error `NOT_FOUND`.
+     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
+     * already exists, it is deleted, and the column values provided are
+     * inserted instead. Unlike
+     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
+     * means any values not explicitly written become `NULL`.
+     *
+     * In an interleaved table, if you create the child table with the
+     * `ON DELETE CASCADE` annotation, then replacing a parent row
+     * also deletes the child rows. Otherwise, you must delete the
+     * child rows before you replace the parent row.
      * 
* - * .google.spanner.v1.Mutation.Write update = 2; + * .google.spanner.v1.Mutation.Write replace = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Mutation.Write, com.google.spanner.v1.Mutation.Write.Builder, com.google.spanner.v1.Mutation.WriteOrBuilder> - getUpdateFieldBuilder() { - if (updateBuilder_ == null) { - if (!(operationCase_ == 2)) { + internalGetReplaceFieldBuilder() { + if (replaceBuilder_ == null) { + if (!(operationCase_ == 4)) { operation_ = com.google.spanner.v1.Mutation.Write.getDefaultInstance(); } - updateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + replaceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Mutation.Write, com.google.spanner.v1.Mutation.Write.Builder, com.google.spanner.v1.Mutation.WriteOrBuilder>( @@ -4368,72 +7668,58 @@ public com.google.spanner.v1.Mutation.WriteOrBuilder getUpdateOrBuilder() { isClean()); operation_ = null; } - operationCase_ = 2; + operationCase_ = 4; onChanged(); - return updateBuilder_; + return replaceBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.v1.Mutation.Write, - com.google.spanner.v1.Mutation.Write.Builder, - com.google.spanner.v1.Mutation.WriteOrBuilder> - insertOrUpdateBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Delete, + com.google.spanner.v1.Mutation.Delete.Builder, + com.google.spanner.v1.Mutation.DeleteOrBuilder> + deleteBuilder_; /** * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, then its column values are overwritten with the ones
-     * provided. Any column values not explicitly written are preserved.
-     *
-     * When using
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
-     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
-     * columns in the table must be given a value. This holds true even when the
-     * row already exists and will therefore actually be updated.
+     * Delete rows from a table. Succeeds whether or not the named
+     * rows were present.
      * 
* - * .google.spanner.v1.Mutation.Write insert_or_update = 3; + * .google.spanner.v1.Mutation.Delete delete = 5; * - * @return Whether the insertOrUpdate field is set. + * @return Whether the delete field is set. */ @java.lang.Override - public boolean hasInsertOrUpdate() { - return operationCase_ == 3; + public boolean hasDelete() { + return operationCase_ == 5; } /** * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, then its column values are overwritten with the ones
-     * provided. Any column values not explicitly written are preserved.
-     *
-     * When using
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
-     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
-     * columns in the table must be given a value. This holds true even when the
-     * row already exists and will therefore actually be updated.
+     * Delete rows from a table. Succeeds whether or not the named
+     * rows were present.
      * 
* - * .google.spanner.v1.Mutation.Write insert_or_update = 3; + * .google.spanner.v1.Mutation.Delete delete = 5; * - * @return The insertOrUpdate. + * @return The delete. */ @java.lang.Override - public com.google.spanner.v1.Mutation.Write getInsertOrUpdate() { - if (insertOrUpdateBuilder_ == null) { - if (operationCase_ == 3) { - return (com.google.spanner.v1.Mutation.Write) operation_; + public com.google.spanner.v1.Mutation.Delete getDelete() { + if (deleteBuilder_ == null) { + if (operationCase_ == 5) { + return (com.google.spanner.v1.Mutation.Delete) operation_; } - return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + return com.google.spanner.v1.Mutation.Delete.getDefaultInstance(); } else { - if (operationCase_ == 3) { - return insertOrUpdateBuilder_.getMessage(); + if (operationCase_ == 5) { + return deleteBuilder_.getMessage(); } - return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + return com.google.spanner.v1.Mutation.Delete.getDefaultInstance(); } } @@ -4441,30 +7727,23 @@ public com.google.spanner.v1.Mutation.Write getInsertOrUpdate() { * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, then its column values are overwritten with the ones
-     * provided. Any column values not explicitly written are preserved.
-     *
-     * When using
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
-     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
-     * columns in the table must be given a value. This holds true even when the
-     * row already exists and will therefore actually be updated.
+     * Delete rows from a table. Succeeds whether or not the named
+     * rows were present.
      * 
* - * .google.spanner.v1.Mutation.Write insert_or_update = 3; + * .google.spanner.v1.Mutation.Delete delete = 5; */ - public Builder setInsertOrUpdate(com.google.spanner.v1.Mutation.Write value) { - if (insertOrUpdateBuilder_ == null) { + public Builder setDelete(com.google.spanner.v1.Mutation.Delete value) { + if (deleteBuilder_ == null) { if (value == null) { throw new NullPointerException(); } operation_ = value; onChanged(); } else { - insertOrUpdateBuilder_.setMessage(value); + deleteBuilder_.setMessage(value); } - operationCase_ = 3; + operationCase_ = 5; return this; } @@ -4472,27 +7751,20 @@ public Builder setInsertOrUpdate(com.google.spanner.v1.Mutation.Write value) { * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, then its column values are overwritten with the ones
-     * provided. Any column values not explicitly written are preserved.
-     *
-     * When using
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
-     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
-     * columns in the table must be given a value. This holds true even when the
-     * row already exists and will therefore actually be updated.
+     * Delete rows from a table. Succeeds whether or not the named
+     * rows were present.
      * 
* - * .google.spanner.v1.Mutation.Write insert_or_update = 3; + * .google.spanner.v1.Mutation.Delete delete = 5; */ - public Builder setInsertOrUpdate(com.google.spanner.v1.Mutation.Write.Builder builderForValue) { - if (insertOrUpdateBuilder_ == null) { + public Builder setDelete(com.google.spanner.v1.Mutation.Delete.Builder builderForValue) { + if (deleteBuilder_ == null) { operation_ = builderForValue.build(); onChanged(); } else { - insertOrUpdateBuilder_.setMessage(builderForValue.build()); + deleteBuilder_.setMessage(builderForValue.build()); } - operationCase_ = 3; + operationCase_ = 5; return this; } @@ -4500,26 +7772,19 @@ public Builder setInsertOrUpdate(com.google.spanner.v1.Mutation.Write.Builder bu * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, then its column values are overwritten with the ones
-     * provided. Any column values not explicitly written are preserved.
-     *
-     * When using
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
-     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
-     * columns in the table must be given a value. This holds true even when the
-     * row already exists and will therefore actually be updated.
+     * Delete rows from a table. Succeeds whether or not the named
+     * rows were present.
      * 
* - * .google.spanner.v1.Mutation.Write insert_or_update = 3; + * .google.spanner.v1.Mutation.Delete delete = 5; */ - public Builder mergeInsertOrUpdate(com.google.spanner.v1.Mutation.Write value) { - if (insertOrUpdateBuilder_ == null) { - if (operationCase_ == 3 - && operation_ != com.google.spanner.v1.Mutation.Write.getDefaultInstance()) { + public Builder mergeDelete(com.google.spanner.v1.Mutation.Delete value) { + if (deleteBuilder_ == null) { + if (operationCase_ == 5 + && operation_ != com.google.spanner.v1.Mutation.Delete.getDefaultInstance()) { operation_ = - com.google.spanner.v1.Mutation.Write.newBuilder( - (com.google.spanner.v1.Mutation.Write) operation_) + com.google.spanner.v1.Mutation.Delete.newBuilder( + (com.google.spanner.v1.Mutation.Delete) operation_) .mergeFrom(value) .buildPartial(); } else { @@ -4527,13 +7792,13 @@ public Builder mergeInsertOrUpdate(com.google.spanner.v1.Mutation.Write value) { } onChanged(); } else { - if (operationCase_ == 3) { - insertOrUpdateBuilder_.mergeFrom(value); + if (operationCase_ == 5) { + deleteBuilder_.mergeFrom(value); } else { - insertOrUpdateBuilder_.setMessage(value); + deleteBuilder_.setMessage(value); } } - operationCase_ = 3; + operationCase_ = 5; return this; } @@ -4541,32 +7806,25 @@ public Builder mergeInsertOrUpdate(com.google.spanner.v1.Mutation.Write value) { * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, then its column values are overwritten with the ones
-     * provided. Any column values not explicitly written are preserved.
-     *
-     * When using
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
-     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
-     * columns in the table must be given a value. This holds true even when the
-     * row already exists and will therefore actually be updated.
+     * Delete rows from a table. Succeeds whether or not the named
+     * rows were present.
      * 
* - * .google.spanner.v1.Mutation.Write insert_or_update = 3; + * .google.spanner.v1.Mutation.Delete delete = 5; */ - public Builder clearInsertOrUpdate() { - if (insertOrUpdateBuilder_ == null) { - if (operationCase_ == 3) { + public Builder clearDelete() { + if (deleteBuilder_ == null) { + if (operationCase_ == 5) { operationCase_ = 0; operation_ = null; onChanged(); } } else { - if (operationCase_ == 3) { + if (operationCase_ == 5) { operationCase_ = 0; operation_ = null; } - insertOrUpdateBuilder_.clear(); + deleteBuilder_.clear(); } return this; } @@ -4575,49 +7833,35 @@ public Builder clearInsertOrUpdate() { * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, then its column values are overwritten with the ones
-     * provided. Any column values not explicitly written are preserved.
-     *
-     * When using
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
-     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
-     * columns in the table must be given a value. This holds true even when the
-     * row already exists and will therefore actually be updated.
+     * Delete rows from a table. Succeeds whether or not the named
+     * rows were present.
      * 
* - * .google.spanner.v1.Mutation.Write insert_or_update = 3; + * .google.spanner.v1.Mutation.Delete delete = 5; */ - public com.google.spanner.v1.Mutation.Write.Builder getInsertOrUpdateBuilder() { - return getInsertOrUpdateFieldBuilder().getBuilder(); + public com.google.spanner.v1.Mutation.Delete.Builder getDeleteBuilder() { + return internalGetDeleteFieldBuilder().getBuilder(); } /** * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, then its column values are overwritten with the ones
-     * provided. Any column values not explicitly written are preserved.
-     *
-     * When using
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
-     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
-     * columns in the table must be given a value. This holds true even when the
-     * row already exists and will therefore actually be updated.
+     * Delete rows from a table. Succeeds whether or not the named
+     * rows were present.
      * 
* - * .google.spanner.v1.Mutation.Write insert_or_update = 3; + * .google.spanner.v1.Mutation.Delete delete = 5; */ @java.lang.Override - public com.google.spanner.v1.Mutation.WriteOrBuilder getInsertOrUpdateOrBuilder() { - if ((operationCase_ == 3) && (insertOrUpdateBuilder_ != null)) { - return insertOrUpdateBuilder_.getMessageOrBuilder(); + public com.google.spanner.v1.Mutation.DeleteOrBuilder getDeleteOrBuilder() { + if ((operationCase_ == 5) && (deleteBuilder_ != null)) { + return deleteBuilder_.getMessageOrBuilder(); } else { - if (operationCase_ == 3) { - return (com.google.spanner.v1.Mutation.Write) operation_; + if (operationCase_ == 5) { + return (com.google.spanner.v1.Mutation.Delete) operation_; } - return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + return com.google.spanner.v1.Mutation.Delete.getDefaultInstance(); } } @@ -4625,106 +7869,81 @@ public com.google.spanner.v1.Mutation.WriteOrBuilder getInsertOrUpdateOrBuilder( * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, then its column values are overwritten with the ones
-     * provided. Any column values not explicitly written are preserved.
-     *
-     * When using
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as
-     * when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL`
-     * columns in the table must be given a value. This holds true even when the
-     * row already exists and will therefore actually be updated.
+     * Delete rows from a table. Succeeds whether or not the named
+     * rows were present.
      * 
* - * .google.spanner.v1.Mutation.Write insert_or_update = 3; + * .google.spanner.v1.Mutation.Delete delete = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.v1.Mutation.Write, - com.google.spanner.v1.Mutation.Write.Builder, - com.google.spanner.v1.Mutation.WriteOrBuilder> - getInsertOrUpdateFieldBuilder() { - if (insertOrUpdateBuilder_ == null) { - if (!(operationCase_ == 3)) { - operation_ = com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Delete, + com.google.spanner.v1.Mutation.Delete.Builder, + com.google.spanner.v1.Mutation.DeleteOrBuilder> + internalGetDeleteFieldBuilder() { + if (deleteBuilder_ == null) { + if (!(operationCase_ == 5)) { + operation_ = com.google.spanner.v1.Mutation.Delete.getDefaultInstance(); } - insertOrUpdateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.v1.Mutation.Write, - com.google.spanner.v1.Mutation.Write.Builder, - com.google.spanner.v1.Mutation.WriteOrBuilder>( - (com.google.spanner.v1.Mutation.Write) operation_, + deleteBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Delete, + com.google.spanner.v1.Mutation.Delete.Builder, + com.google.spanner.v1.Mutation.DeleteOrBuilder>( + (com.google.spanner.v1.Mutation.Delete) operation_, getParentForChildren(), isClean()); operation_ = null; } - operationCase_ = 3; + operationCase_ = 5; onChanged(); - return insertOrUpdateBuilder_; + return deleteBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.v1.Mutation.Write, - com.google.spanner.v1.Mutation.Write.Builder, - com.google.spanner.v1.Mutation.WriteOrBuilder> - replaceBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Send, + com.google.spanner.v1.Mutation.Send.Builder, + com.google.spanner.v1.Mutation.SendOrBuilder> + sendBuilder_; /** * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, it is deleted, and the column values provided are
-     * inserted instead. Unlike
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
-     * means any values not explicitly written become `NULL`.
-     *
-     * In an interleaved table, if you create the child table with the
-     * `ON DELETE CASCADE` annotation, then replacing a parent row
-     * also deletes the child rows. Otherwise, you must delete the
-     * child rows before you replace the parent row.
+     * Send a message to a queue.
      * 
* - * .google.spanner.v1.Mutation.Write replace = 4; + * .google.spanner.v1.Mutation.Send send = 6; * - * @return Whether the replace field is set. + * @return Whether the send field is set. */ @java.lang.Override - public boolean hasReplace() { - return operationCase_ == 4; + public boolean hasSend() { + return operationCase_ == 6; } /** * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, it is deleted, and the column values provided are
-     * inserted instead. Unlike
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
-     * means any values not explicitly written become `NULL`.
-     *
-     * In an interleaved table, if you create the child table with the
-     * `ON DELETE CASCADE` annotation, then replacing a parent row
-     * also deletes the child rows. Otherwise, you must delete the
-     * child rows before you replace the parent row.
+     * Send a message to a queue.
      * 
* - * .google.spanner.v1.Mutation.Write replace = 4; + * .google.spanner.v1.Mutation.Send send = 6; * - * @return The replace. + * @return The send. */ @java.lang.Override - public com.google.spanner.v1.Mutation.Write getReplace() { - if (replaceBuilder_ == null) { - if (operationCase_ == 4) { - return (com.google.spanner.v1.Mutation.Write) operation_; + public com.google.spanner.v1.Mutation.Send getSend() { + if (sendBuilder_ == null) { + if (operationCase_ == 6) { + return (com.google.spanner.v1.Mutation.Send) operation_; } - return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + return com.google.spanner.v1.Mutation.Send.getDefaultInstance(); } else { - if (operationCase_ == 4) { - return replaceBuilder_.getMessage(); + if (operationCase_ == 6) { + return sendBuilder_.getMessage(); } - return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + return com.google.spanner.v1.Mutation.Send.getDefaultInstance(); } } @@ -4732,31 +7951,22 @@ public com.google.spanner.v1.Mutation.Write getReplace() { * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, it is deleted, and the column values provided are
-     * inserted instead. Unlike
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
-     * means any values not explicitly written become `NULL`.
-     *
-     * In an interleaved table, if you create the child table with the
-     * `ON DELETE CASCADE` annotation, then replacing a parent row
-     * also deletes the child rows. Otherwise, you must delete the
-     * child rows before you replace the parent row.
+     * Send a message to a queue.
      * 
* - * .google.spanner.v1.Mutation.Write replace = 4; + * .google.spanner.v1.Mutation.Send send = 6; */ - public Builder setReplace(com.google.spanner.v1.Mutation.Write value) { - if (replaceBuilder_ == null) { + public Builder setSend(com.google.spanner.v1.Mutation.Send value) { + if (sendBuilder_ == null) { if (value == null) { throw new NullPointerException(); } operation_ = value; onChanged(); } else { - replaceBuilder_.setMessage(value); + sendBuilder_.setMessage(value); } - operationCase_ = 4; + operationCase_ = 6; return this; } @@ -4764,28 +7974,19 @@ public Builder setReplace(com.google.spanner.v1.Mutation.Write value) { * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, it is deleted, and the column values provided are
-     * inserted instead. Unlike
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
-     * means any values not explicitly written become `NULL`.
-     *
-     * In an interleaved table, if you create the child table with the
-     * `ON DELETE CASCADE` annotation, then replacing a parent row
-     * also deletes the child rows. Otherwise, you must delete the
-     * child rows before you replace the parent row.
+     * Send a message to a queue.
      * 
* - * .google.spanner.v1.Mutation.Write replace = 4; + * .google.spanner.v1.Mutation.Send send = 6; */ - public Builder setReplace(com.google.spanner.v1.Mutation.Write.Builder builderForValue) { - if (replaceBuilder_ == null) { + public Builder setSend(com.google.spanner.v1.Mutation.Send.Builder builderForValue) { + if (sendBuilder_ == null) { operation_ = builderForValue.build(); onChanged(); } else { - replaceBuilder_.setMessage(builderForValue.build()); + sendBuilder_.setMessage(builderForValue.build()); } - operationCase_ = 4; + operationCase_ = 6; return this; } @@ -4793,27 +7994,18 @@ public Builder setReplace(com.google.spanner.v1.Mutation.Write.Builder builderFo * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, it is deleted, and the column values provided are
-     * inserted instead. Unlike
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
-     * means any values not explicitly written become `NULL`.
-     *
-     * In an interleaved table, if you create the child table with the
-     * `ON DELETE CASCADE` annotation, then replacing a parent row
-     * also deletes the child rows. Otherwise, you must delete the
-     * child rows before you replace the parent row.
+     * Send a message to a queue.
      * 
* - * .google.spanner.v1.Mutation.Write replace = 4; + * .google.spanner.v1.Mutation.Send send = 6; */ - public Builder mergeReplace(com.google.spanner.v1.Mutation.Write value) { - if (replaceBuilder_ == null) { - if (operationCase_ == 4 - && operation_ != com.google.spanner.v1.Mutation.Write.getDefaultInstance()) { + public Builder mergeSend(com.google.spanner.v1.Mutation.Send value) { + if (sendBuilder_ == null) { + if (operationCase_ == 6 + && operation_ != com.google.spanner.v1.Mutation.Send.getDefaultInstance()) { operation_ = - com.google.spanner.v1.Mutation.Write.newBuilder( - (com.google.spanner.v1.Mutation.Write) operation_) + com.google.spanner.v1.Mutation.Send.newBuilder( + (com.google.spanner.v1.Mutation.Send) operation_) .mergeFrom(value) .buildPartial(); } else { @@ -4821,13 +8013,13 @@ public Builder mergeReplace(com.google.spanner.v1.Mutation.Write value) { } onChanged(); } else { - if (operationCase_ == 4) { - replaceBuilder_.mergeFrom(value); + if (operationCase_ == 6) { + sendBuilder_.mergeFrom(value); } else { - replaceBuilder_.setMessage(value); + sendBuilder_.setMessage(value); } } - operationCase_ = 4; + operationCase_ = 6; return this; } @@ -4835,33 +8027,24 @@ public Builder mergeReplace(com.google.spanner.v1.Mutation.Write value) { * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, it is deleted, and the column values provided are
-     * inserted instead. Unlike
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
-     * means any values not explicitly written become `NULL`.
-     *
-     * In an interleaved table, if you create the child table with the
-     * `ON DELETE CASCADE` annotation, then replacing a parent row
-     * also deletes the child rows. Otherwise, you must delete the
-     * child rows before you replace the parent row.
+     * Send a message to a queue.
      * 
* - * .google.spanner.v1.Mutation.Write replace = 4; + * .google.spanner.v1.Mutation.Send send = 6; */ - public Builder clearReplace() { - if (replaceBuilder_ == null) { - if (operationCase_ == 4) { + public Builder clearSend() { + if (sendBuilder_ == null) { + if (operationCase_ == 6) { operationCase_ = 0; operation_ = null; onChanged(); } } else { - if (operationCase_ == 4) { + if (operationCase_ == 6) { operationCase_ = 0; operation_ = null; } - replaceBuilder_.clear(); + sendBuilder_.clear(); } return this; } @@ -4870,51 +8053,33 @@ public Builder clearReplace() { * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, it is deleted, and the column values provided are
-     * inserted instead. Unlike
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
-     * means any values not explicitly written become `NULL`.
-     *
-     * In an interleaved table, if you create the child table with the
-     * `ON DELETE CASCADE` annotation, then replacing a parent row
-     * also deletes the child rows. Otherwise, you must delete the
-     * child rows before you replace the parent row.
+     * Send a message to a queue.
      * 
* - * .google.spanner.v1.Mutation.Write replace = 4; + * .google.spanner.v1.Mutation.Send send = 6; */ - public com.google.spanner.v1.Mutation.Write.Builder getReplaceBuilder() { - return getReplaceFieldBuilder().getBuilder(); + public com.google.spanner.v1.Mutation.Send.Builder getSendBuilder() { + return internalGetSendFieldBuilder().getBuilder(); } /** * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, it is deleted, and the column values provided are
-     * inserted instead. Unlike
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
-     * means any values not explicitly written become `NULL`.
-     *
-     * In an interleaved table, if you create the child table with the
-     * `ON DELETE CASCADE` annotation, then replacing a parent row
-     * also deletes the child rows. Otherwise, you must delete the
-     * child rows before you replace the parent row.
+     * Send a message to a queue.
      * 
* - * .google.spanner.v1.Mutation.Write replace = 4; + * .google.spanner.v1.Mutation.Send send = 6; */ @java.lang.Override - public com.google.spanner.v1.Mutation.WriteOrBuilder getReplaceOrBuilder() { - if ((operationCase_ == 4) && (replaceBuilder_ != null)) { - return replaceBuilder_.getMessageOrBuilder(); + public com.google.spanner.v1.Mutation.SendOrBuilder getSendOrBuilder() { + if ((operationCase_ == 6) && (sendBuilder_ != null)) { + return sendBuilder_.getMessageOrBuilder(); } else { - if (operationCase_ == 4) { - return (com.google.spanner.v1.Mutation.Write) operation_; + if (operationCase_ == 6) { + return (com.google.spanner.v1.Mutation.Send) operation_; } - return com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + return com.google.spanner.v1.Mutation.Send.getDefaultInstance(); } } @@ -4922,91 +8087,80 @@ public com.google.spanner.v1.Mutation.WriteOrBuilder getReplaceOrBuilder() { * * *
-     * Like [insert][google.spanner.v1.Mutation.insert], except that if the row
-     * already exists, it is deleted, and the column values provided are
-     * inserted instead. Unlike
-     * [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this
-     * means any values not explicitly written become `NULL`.
-     *
-     * In an interleaved table, if you create the child table with the
-     * `ON DELETE CASCADE` annotation, then replacing a parent row
-     * also deletes the child rows. Otherwise, you must delete the
-     * child rows before you replace the parent row.
+     * Send a message to a queue.
      * 
* - * .google.spanner.v1.Mutation.Write replace = 4; + * .google.spanner.v1.Mutation.Send send = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.v1.Mutation.Write, - com.google.spanner.v1.Mutation.Write.Builder, - com.google.spanner.v1.Mutation.WriteOrBuilder> - getReplaceFieldBuilder() { - if (replaceBuilder_ == null) { - if (!(operationCase_ == 4)) { - operation_ = com.google.spanner.v1.Mutation.Write.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Send, + com.google.spanner.v1.Mutation.Send.Builder, + com.google.spanner.v1.Mutation.SendOrBuilder> + internalGetSendFieldBuilder() { + if (sendBuilder_ == null) { + if (!(operationCase_ == 6)) { + operation_ = com.google.spanner.v1.Mutation.Send.getDefaultInstance(); } - replaceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.v1.Mutation.Write, - com.google.spanner.v1.Mutation.Write.Builder, - com.google.spanner.v1.Mutation.WriteOrBuilder>( - (com.google.spanner.v1.Mutation.Write) operation_, + sendBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Send, + com.google.spanner.v1.Mutation.Send.Builder, + com.google.spanner.v1.Mutation.SendOrBuilder>( + (com.google.spanner.v1.Mutation.Send) operation_, getParentForChildren(), isClean()); operation_ = null; } - operationCase_ = 4; + operationCase_ = 6; onChanged(); - return replaceBuilder_; + return sendBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.v1.Mutation.Delete, - com.google.spanner.v1.Mutation.Delete.Builder, - com.google.spanner.v1.Mutation.DeleteOrBuilder> - deleteBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Ack, + com.google.spanner.v1.Mutation.Ack.Builder, + com.google.spanner.v1.Mutation.AckOrBuilder> + ackBuilder_; /** * * *
-     * Delete rows from a table. Succeeds whether or not the named
-     * rows were present.
+     * Ack a message from a queue.
      * 
* - * .google.spanner.v1.Mutation.Delete delete = 5; + * .google.spanner.v1.Mutation.Ack ack = 7; * - * @return Whether the delete field is set. + * @return Whether the ack field is set. */ @java.lang.Override - public boolean hasDelete() { - return operationCase_ == 5; + public boolean hasAck() { + return operationCase_ == 7; } /** * * *
-     * Delete rows from a table. Succeeds whether or not the named
-     * rows were present.
+     * Ack a message from a queue.
      * 
* - * .google.spanner.v1.Mutation.Delete delete = 5; + * .google.spanner.v1.Mutation.Ack ack = 7; * - * @return The delete. + * @return The ack. */ @java.lang.Override - public com.google.spanner.v1.Mutation.Delete getDelete() { - if (deleteBuilder_ == null) { - if (operationCase_ == 5) { - return (com.google.spanner.v1.Mutation.Delete) operation_; + public com.google.spanner.v1.Mutation.Ack getAck() { + if (ackBuilder_ == null) { + if (operationCase_ == 7) { + return (com.google.spanner.v1.Mutation.Ack) operation_; } - return com.google.spanner.v1.Mutation.Delete.getDefaultInstance(); + return com.google.spanner.v1.Mutation.Ack.getDefaultInstance(); } else { - if (operationCase_ == 5) { - return deleteBuilder_.getMessage(); + if (operationCase_ == 7) { + return ackBuilder_.getMessage(); } - return com.google.spanner.v1.Mutation.Delete.getDefaultInstance(); + return com.google.spanner.v1.Mutation.Ack.getDefaultInstance(); } } @@ -5014,23 +8168,22 @@ public com.google.spanner.v1.Mutation.Delete getDelete() { * * *
-     * Delete rows from a table. Succeeds whether or not the named
-     * rows were present.
+     * Ack a message from a queue.
      * 
* - * .google.spanner.v1.Mutation.Delete delete = 5; + * .google.spanner.v1.Mutation.Ack ack = 7; */ - public Builder setDelete(com.google.spanner.v1.Mutation.Delete value) { - if (deleteBuilder_ == null) { + public Builder setAck(com.google.spanner.v1.Mutation.Ack value) { + if (ackBuilder_ == null) { if (value == null) { throw new NullPointerException(); } operation_ = value; onChanged(); } else { - deleteBuilder_.setMessage(value); + ackBuilder_.setMessage(value); } - operationCase_ = 5; + operationCase_ = 7; return this; } @@ -5038,20 +8191,19 @@ public Builder setDelete(com.google.spanner.v1.Mutation.Delete value) { * * *
-     * Delete rows from a table. Succeeds whether or not the named
-     * rows were present.
+     * Ack a message from a queue.
      * 
* - * .google.spanner.v1.Mutation.Delete delete = 5; + * .google.spanner.v1.Mutation.Ack ack = 7; */ - public Builder setDelete(com.google.spanner.v1.Mutation.Delete.Builder builderForValue) { - if (deleteBuilder_ == null) { + public Builder setAck(com.google.spanner.v1.Mutation.Ack.Builder builderForValue) { + if (ackBuilder_ == null) { operation_ = builderForValue.build(); onChanged(); } else { - deleteBuilder_.setMessage(builderForValue.build()); + ackBuilder_.setMessage(builderForValue.build()); } - operationCase_ = 5; + operationCase_ = 7; return this; } @@ -5059,19 +8211,18 @@ public Builder setDelete(com.google.spanner.v1.Mutation.Delete.Builder builderFo * * *
-     * Delete rows from a table. Succeeds whether or not the named
-     * rows were present.
+     * Ack a message from a queue.
      * 
* - * .google.spanner.v1.Mutation.Delete delete = 5; + * .google.spanner.v1.Mutation.Ack ack = 7; */ - public Builder mergeDelete(com.google.spanner.v1.Mutation.Delete value) { - if (deleteBuilder_ == null) { - if (operationCase_ == 5 - && operation_ != com.google.spanner.v1.Mutation.Delete.getDefaultInstance()) { + public Builder mergeAck(com.google.spanner.v1.Mutation.Ack value) { + if (ackBuilder_ == null) { + if (operationCase_ == 7 + && operation_ != com.google.spanner.v1.Mutation.Ack.getDefaultInstance()) { operation_ = - com.google.spanner.v1.Mutation.Delete.newBuilder( - (com.google.spanner.v1.Mutation.Delete) operation_) + com.google.spanner.v1.Mutation.Ack.newBuilder( + (com.google.spanner.v1.Mutation.Ack) operation_) .mergeFrom(value) .buildPartial(); } else { @@ -5079,13 +8230,13 @@ public Builder mergeDelete(com.google.spanner.v1.Mutation.Delete value) { } onChanged(); } else { - if (operationCase_ == 5) { - deleteBuilder_.mergeFrom(value); + if (operationCase_ == 7) { + ackBuilder_.mergeFrom(value); } else { - deleteBuilder_.setMessage(value); + ackBuilder_.setMessage(value); } } - operationCase_ = 5; + operationCase_ = 7; return this; } @@ -5093,25 +8244,24 @@ public Builder mergeDelete(com.google.spanner.v1.Mutation.Delete value) { * * *
-     * Delete rows from a table. Succeeds whether or not the named
-     * rows were present.
+     * Ack a message from a queue.
      * 
* - * .google.spanner.v1.Mutation.Delete delete = 5; + * .google.spanner.v1.Mutation.Ack ack = 7; */ - public Builder clearDelete() { - if (deleteBuilder_ == null) { - if (operationCase_ == 5) { + public Builder clearAck() { + if (ackBuilder_ == null) { + if (operationCase_ == 7) { operationCase_ = 0; operation_ = null; onChanged(); } } else { - if (operationCase_ == 5) { + if (operationCase_ == 7) { operationCase_ = 0; operation_ = null; } - deleteBuilder_.clear(); + ackBuilder_.clear(); } return this; } @@ -5120,35 +8270,33 @@ public Builder clearDelete() { * * *
-     * Delete rows from a table. Succeeds whether or not the named
-     * rows were present.
+     * Ack a message from a queue.
      * 
* - * .google.spanner.v1.Mutation.Delete delete = 5; + * .google.spanner.v1.Mutation.Ack ack = 7; */ - public com.google.spanner.v1.Mutation.Delete.Builder getDeleteBuilder() { - return getDeleteFieldBuilder().getBuilder(); + public com.google.spanner.v1.Mutation.Ack.Builder getAckBuilder() { + return internalGetAckFieldBuilder().getBuilder(); } /** * * *
-     * Delete rows from a table. Succeeds whether or not the named
-     * rows were present.
+     * Ack a message from a queue.
      * 
* - * .google.spanner.v1.Mutation.Delete delete = 5; + * .google.spanner.v1.Mutation.Ack ack = 7; */ @java.lang.Override - public com.google.spanner.v1.Mutation.DeleteOrBuilder getDeleteOrBuilder() { - if ((operationCase_ == 5) && (deleteBuilder_ != null)) { - return deleteBuilder_.getMessageOrBuilder(); + public com.google.spanner.v1.Mutation.AckOrBuilder getAckOrBuilder() { + if ((operationCase_ == 7) && (ackBuilder_ != null)) { + return ackBuilder_.getMessageOrBuilder(); } else { - if (operationCase_ == 5) { - return (com.google.spanner.v1.Mutation.Delete) operation_; + if (operationCase_ == 7) { + return (com.google.spanner.v1.Mutation.Ack) operation_; } - return com.google.spanner.v1.Mutation.Delete.getDefaultInstance(); + return com.google.spanner.v1.Mutation.Ack.getDefaultInstance(); } } @@ -5156,45 +8304,31 @@ public com.google.spanner.v1.Mutation.DeleteOrBuilder getDeleteOrBuilder() { * * *
-     * Delete rows from a table. Succeeds whether or not the named
-     * rows were present.
+     * Ack a message from a queue.
      * 
* - * .google.spanner.v1.Mutation.Delete delete = 5; + * .google.spanner.v1.Mutation.Ack ack = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.v1.Mutation.Delete, - com.google.spanner.v1.Mutation.Delete.Builder, - com.google.spanner.v1.Mutation.DeleteOrBuilder> - getDeleteFieldBuilder() { - if (deleteBuilder_ == null) { - if (!(operationCase_ == 5)) { - operation_ = com.google.spanner.v1.Mutation.Delete.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Ack, + com.google.spanner.v1.Mutation.Ack.Builder, + com.google.spanner.v1.Mutation.AckOrBuilder> + internalGetAckFieldBuilder() { + if (ackBuilder_ == null) { + if (!(operationCase_ == 7)) { + operation_ = com.google.spanner.v1.Mutation.Ack.getDefaultInstance(); } - deleteBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.spanner.v1.Mutation.Delete, - com.google.spanner.v1.Mutation.Delete.Builder, - com.google.spanner.v1.Mutation.DeleteOrBuilder>( - (com.google.spanner.v1.Mutation.Delete) operation_, - getParentForChildren(), - isClean()); + ackBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.Mutation.Ack, + com.google.spanner.v1.Mutation.Ack.Builder, + com.google.spanner.v1.Mutation.AckOrBuilder>( + (com.google.spanner.v1.Mutation.Ack) operation_, getParentForChildren(), isClean()); operation_ = null; } - operationCase_ = 5; + operationCase_ = 7; onChanged(); - return deleteBuilder_; - } - - @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); + return ackBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.Mutation) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationOrBuilder.java index 4b4d088fe26..b0bd8d72816 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/mutation.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface MutationOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.Mutation) @@ -269,5 +271,79 @@ public interface MutationOrBuilder */ com.google.spanner.v1.Mutation.DeleteOrBuilder getDeleteOrBuilder(); + /** + * + * + *
+   * Send a message to a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Send send = 6; + * + * @return Whether the send field is set. + */ + boolean hasSend(); + + /** + * + * + *
+   * Send a message to a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Send send = 6; + * + * @return The send. + */ + com.google.spanner.v1.Mutation.Send getSend(); + + /** + * + * + *
+   * Send a message to a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Send send = 6; + */ + com.google.spanner.v1.Mutation.SendOrBuilder getSendOrBuilder(); + + /** + * + * + *
+   * Ack a message from a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Ack ack = 7; + * + * @return Whether the ack field is set. + */ + boolean hasAck(); + + /** + * + * + *
+   * Ack a message from a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Ack ack = 7; + * + * @return The ack. + */ + com.google.spanner.v1.Mutation.Ack getAck(); + + /** + * + * + *
+   * Ack a message from a queue.
+   * 
+ * + * .google.spanner.v1.Mutation.Ack ack = 7; + */ + com.google.spanner.v1.Mutation.AckOrBuilder getAckOrBuilder(); + com.google.spanner.v1.Mutation.OperationCase getOperationCase(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java index 9af035418c0..48bf250009d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/MutationProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/mutation.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; -public final class MutationProto { +@com.google.protobuf.Generated +public final class MutationProto extends com.google.protobuf.GeneratedFile { private MutationProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MutationProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,16 +42,24 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_Mutation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_Mutation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_Mutation_Write_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_Mutation_Write_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_Mutation_Delete_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_Mutation_Delete_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_Mutation_Send_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_Mutation_Send_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_Mutation_Ack_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_Mutation_Ack_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -52,25 +72,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n" + " google/spanner/v1/mutation.proto\022\021goog" + "le.spanner.v1\032\037google/api/field_behavior" - + ".proto\032\034google/protobuf/struct.proto\032\034google/spanner/v1/keys.proto\"\325\003\n" + + ".proto\032\034google/protobuf/struct.proto\032\037go" + + "ogle/protobuf/timestamp.proto\032\034google/spanner/v1/keys.proto\"\300\006\n" + "\010Mutation\0223\n" + "\006insert\030\001 \001(\0132!.google.spanner.v1.Mutation.WriteH\000\0223\n" + "\006update\030\002 \001(\0132!.google.spanner.v1.Mutation.WriteH\000\022=\n" + "\020insert_or_update\030\003 \001(\0132!.google.spanner.v1.Mutation.WriteH\000\0224\n" + "\007replace\030\004 \001(\0132!.google.spanner.v1.Mutation.WriteH\000\0224\n" - + "\006delete\030\005 \001(\0132\".google.spanner.v1.Mutation.DeleteH\000\032X\n" + + "\006delete\030\005 \001(\0132\".google.spanner.v1.Mutation.DeleteH\000\0220\n" + + "\004send\030\006 \001(\0132 .google.spanner.v1.Mutation.SendH\000\022.\n" + + "\003ack\030\007 \001(\0132\037.google.spanner.v1.Mutation.AckH\000\032X\n" + "\005Write\022\022\n" + "\005table\030\001 \001(\tB\003\340A\002\022\017\n" + "\007columns\030\002 \003(\t\022*\n" + "\006values\030\003 \003(\0132\032.google.protobuf.ListValue\032M\n" + "\006Delete\022\022\n" + "\005table\030\001 \001(\tB\003\340A\002\022/\n" - + "\007key_set\030\002 \001(\0132\031.google.spanner.v1.KeySetB\003\340A\002B\013\n" + + "\007key_set\030\002" + + " \001(\0132\031.google.spanner.v1.KeySetB\003\340A\002\032\243\001\n" + + "\004Send\022\022\n" + + "\005queue\030\001 \001(\tB\003\340A\002\022,\n" + + "\003key\030\002 \001(\0132\032.google.protobuf.ListValueB\003\340A\002\0220\n" + + "\014deliver_time\030\003 \001(\0132\032.google.protobuf.Timestamp\022\'\n" + + "\007payload\030\004 \001(\0132\026.google.protobuf.Value\032a\n" + + "\003Ack\022\022\n" + + "\005queue\030\001 \001(\tB\003\340A\002\022,\n" + + "\003key\030\002 \001(\0132\032.google.protobuf.ListValueB\003\340A\002\022\030\n" + + "\020ignore_not_found\030\003 \001(\010B\013\n" + "\toperationB\260\001\n" + "\025com.google.spanner.v1B\r" - + "MutationProtoP\001Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\252\002\027G" - + "oogle.Cloud.Spanner.V1\312\002\027Google\\Cloud\\Sp" - + "anner\\V1\352\002\032Google::Cloud::Spanner::V1b\006proto3" + + "MutationProtoP\001Z5cloud.google.com/go/s" + + "panner/apiv1/spannerpb;spannerpb\252\002\027Googl" + + "e.Cloud.Spanner.V1\312\002\027Google\\Cloud\\Spanne" + + "r\\V1\352\002\032Google::Cloud::Spanner::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -78,40 +112,58 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), com.google.spanner.v1.KeysProto.getDescriptor(), }); - internal_static_google_spanner_v1_Mutation_descriptor = - getDescriptor().getMessageTypes().get(0); + internal_static_google_spanner_v1_Mutation_descriptor = getDescriptor().getMessageType(0); internal_static_google_spanner_v1_Mutation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_Mutation_descriptor, new java.lang.String[] { - "Insert", "Update", "InsertOrUpdate", "Replace", "Delete", "Operation", + "Insert", "Update", "InsertOrUpdate", "Replace", "Delete", "Send", "Ack", "Operation", }); internal_static_google_spanner_v1_Mutation_Write_descriptor = - internal_static_google_spanner_v1_Mutation_descriptor.getNestedTypes().get(0); + internal_static_google_spanner_v1_Mutation_descriptor.getNestedType(0); internal_static_google_spanner_v1_Mutation_Write_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_Mutation_Write_descriptor, new java.lang.String[] { "Table", "Columns", "Values", }); internal_static_google_spanner_v1_Mutation_Delete_descriptor = - internal_static_google_spanner_v1_Mutation_descriptor.getNestedTypes().get(1); + internal_static_google_spanner_v1_Mutation_descriptor.getNestedType(1); internal_static_google_spanner_v1_Mutation_Delete_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_Mutation_Delete_descriptor, new java.lang.String[] { "Table", "KeySet", }); + internal_static_google_spanner_v1_Mutation_Send_descriptor = + internal_static_google_spanner_v1_Mutation_descriptor.getNestedType(2); + internal_static_google_spanner_v1_Mutation_Send_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_Mutation_Send_descriptor, + new java.lang.String[] { + "Queue", "Key", "DeliverTime", "Payload", + }); + internal_static_google_spanner_v1_Mutation_Ack_descriptor = + internal_static_google_spanner_v1_Mutation_descriptor.getNestedType(3); + internal_static_google_spanner_v1_Mutation_Ack_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_Mutation_Ack_descriptor, + new java.lang.String[] { + "Queue", "Key", "IgnoreNotFound", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.spanner.v1.KeysProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.spanner.v1.KeysProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSet.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSet.java index 1f13ad6aeb5..28dd7cef022 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSet.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/result_set.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -30,14 +31,25 @@ * * Protobuf type {@code google.spanner.v1.PartialResultSet} */ -public final class PartialResultSet extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PartialResultSet extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.PartialResultSet) PartialResultSetOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartialResultSet"); + } + // Use PartialResultSet.newBuilder() to construct. - private PartialResultSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartialResultSet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private PartialResultSet() { resumeToken_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartialResultSet(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_PartialResultSet_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_PartialResultSet_fieldAccessorTable @@ -149,59 +155,59 @@ public com.google.spanner.v1.ResultSetMetadataOrBuilder getMetadataOrBuilder() { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -240,59 +246,59 @@ public java.util.List getValuesList() { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -331,59 +337,59 @@ public java.util.List getValuesOrB * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -422,59 +428,59 @@ public int getValuesCount() { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -513,59 +519,59 @@ public com.google.protobuf.Value getValues(int index) { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -780,6 +786,80 @@ public boolean getLast() { return last_; } + public static final int CACHE_UPDATE_FIELD_NUMBER = 10; + private com.google.spanner.v1.CacheUpdate cacheUpdate_; + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + @java.lang.Override + public boolean hasCacheUpdate() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + @java.lang.Override + public com.google.spanner.v1.CacheUpdate getCacheUpdate() { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder() { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -815,6 +895,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (last_ != false) { output.writeBool(9, last_); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getCacheUpdate()); + } getUnknownFields().writeTo(output); } @@ -845,6 +928,9 @@ public int getSerializedSize() { if (last_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, last_); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCacheUpdate()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -876,6 +962,10 @@ public boolean equals(final java.lang.Object obj) { if (!getPrecommitToken().equals(other.getPrecommitToken())) return false; } if (getLast() != other.getLast()) return false; + if (hasCacheUpdate() != other.hasCacheUpdate()) return false; + if (hasCacheUpdate()) { + if (!getCacheUpdate().equals(other.getCacheUpdate())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -909,6 +999,10 @@ public int hashCode() { } hash = (37 * hash) + LAST_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLast()); + if (hasCacheUpdate()) { + hash = (37 * hash) + CACHE_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getCacheUpdate().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -951,38 +1045,38 @@ public static com.google.spanner.v1.PartialResultSet parseFrom( public static com.google.spanner.v1.PartialResultSet parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartialResultSet parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartialResultSet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.PartialResultSet parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartialResultSet parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartialResultSet parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1005,7 +1099,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1021,7 +1115,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.PartialResultSet} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.PartialResultSet) com.google.spanner.v1.PartialResultSetOrBuilder { @@ -1031,7 +1125,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_PartialResultSet_fieldAccessorTable @@ -1045,17 +1139,18 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - getValuesFieldBuilder(); - getStatsFieldBuilder(); - getPrecommitTokenFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMetadataFieldBuilder(); + internalGetValuesFieldBuilder(); + internalGetStatsFieldBuilder(); + internalGetPrecommitTokenFieldBuilder(); + internalGetCacheUpdateFieldBuilder(); } } @@ -1088,6 +1183,11 @@ public Builder clear() { precommitTokenBuilder_ = null; } last_ = false; + cacheUpdate_ = null; + if (cacheUpdateBuilder_ != null) { + cacheUpdateBuilder_.dispose(); + cacheUpdateBuilder_ = null; + } return this; } @@ -1160,42 +1260,14 @@ private void buildPartial0(com.google.spanner.v1.PartialResultSet result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.last_ = last_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.cacheUpdate_ = + cacheUpdateBuilder_ == null ? cacheUpdate_ : cacheUpdateBuilder_.build(); + to_bitField0_ |= 0x00000008; + } 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.v1.PartialResultSet) { @@ -1230,8 +1302,8 @@ public Builder mergeFrom(com.google.spanner.v1.PartialResultSet other) { values_ = other.values_; bitField0_ = (bitField0_ & ~0x00000002); valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getValuesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetValuesFieldBuilder() : null; } else { valuesBuilder_.addAllMessages(other.values_); @@ -1241,7 +1313,7 @@ public Builder mergeFrom(com.google.spanner.v1.PartialResultSet other) { if (other.getChunkedValue() != false) { setChunkedValue(other.getChunkedValue()); } - if (other.getResumeToken() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getResumeToken().isEmpty()) { setResumeToken(other.getResumeToken()); } if (other.hasStats()) { @@ -1253,6 +1325,9 @@ public Builder mergeFrom(com.google.spanner.v1.PartialResultSet other) { if (other.getLast() != false) { setLast(other.getLast()); } + if (other.hasCacheUpdate()) { + mergeCacheUpdate(other.getCacheUpdate()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1281,7 +1356,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -1311,13 +1387,14 @@ public Builder mergeFrom( } // case 34 case 42: { - input.readMessage(getStatsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetStatsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 case 66: { - input.readMessage(getPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 66 @@ -1327,6 +1404,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 72 + case 82: + { + input.readMessage( + internalGetCacheUpdateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1347,7 +1431,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.v1.ResultSetMetadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetMetadata, com.google.spanner.v1.ResultSetMetadata.Builder, com.google.spanner.v1.ResultSetMetadataOrBuilder> @@ -1499,7 +1583,7 @@ public Builder clearMetadata() { public com.google.spanner.v1.ResultSetMetadata.Builder getMetadataBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getMetadataFieldBuilder().getBuilder(); + return internalGetMetadataFieldBuilder().getBuilder(); } /** @@ -1532,14 +1616,14 @@ public com.google.spanner.v1.ResultSetMetadataOrBuilder getMetadataOrBuilder() { * * .google.spanner.v1.ResultSetMetadata metadata = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetMetadata, com.google.spanner.v1.ResultSetMetadata.Builder, com.google.spanner.v1.ResultSetMetadataOrBuilder> - getMetadataFieldBuilder() { + internalGetMetadataFieldBuilder() { if (metadataBuilder_ == null) { metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetMetadata, com.google.spanner.v1.ResultSetMetadata.Builder, com.google.spanner.v1.ResultSetMetadataOrBuilder>( @@ -1558,7 +1642,7 @@ private void ensureValuesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> @@ -1584,59 +1668,59 @@ private void ensureValuesIsMutable() { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -1678,59 +1762,59 @@ public java.util.List getValuesList() { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -1772,59 +1856,59 @@ public int getValuesCount() { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -1866,59 +1950,59 @@ public com.google.protobuf.Value getValues(int index) { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -1966,59 +2050,59 @@ public Builder setValues(int index, com.google.protobuf.Value value) { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -2063,59 +2147,59 @@ public Builder setValues(int index, com.google.protobuf.Value.Builder builderFor * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -2163,59 +2247,59 @@ public Builder addValues(com.google.protobuf.Value value) { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -2263,59 +2347,59 @@ public Builder addValues(int index, com.google.protobuf.Value value) { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -2360,59 +2444,59 @@ public Builder addValues(com.google.protobuf.Value.Builder builderForValue) { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -2457,59 +2541,59 @@ public Builder addValues(int index, com.google.protobuf.Value.Builder builderFor * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -2554,59 +2638,59 @@ public Builder addAllValues(java.lang.Iterablerepeated .google.protobuf.Value values = 2; */ public com.google.protobuf.Value.Builder getValuesBuilder(int index) { - return getValuesFieldBuilder().getBuilder(index); + return internalGetValuesFieldBuilder().getBuilder(index); } /** @@ -2838,59 +2922,59 @@ public com.google.protobuf.Value.Builder getValuesBuilder(int index) { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -2932,59 +3016,59 @@ public com.google.protobuf.ValueOrBuilder getValuesOrBuilder(int index) { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -3026,59 +3110,59 @@ public java.util.List getValuesOrB * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -3093,7 +3177,8 @@ public java.util.List getValuesOrB * repeated .google.protobuf.Value values = 2; */ public com.google.protobuf.Value.Builder addValuesBuilder() { - return getValuesFieldBuilder().addBuilder(com.google.protobuf.Value.getDefaultInstance()); + return internalGetValuesFieldBuilder() + .addBuilder(com.google.protobuf.Value.getDefaultInstance()); } /** @@ -3116,59 +3201,59 @@ public com.google.protobuf.Value.Builder addValuesBuilder() { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -3183,7 +3268,7 @@ public com.google.protobuf.Value.Builder addValuesBuilder() { * repeated .google.protobuf.Value values = 2; */ public com.google.protobuf.Value.Builder addValuesBuilder(int index) { - return getValuesFieldBuilder() + return internalGetValuesFieldBuilder() .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); } @@ -3207,59 +3292,59 @@ public com.google.protobuf.Value.Builder addValuesBuilder(int index) { * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -3274,17 +3359,17 @@ public com.google.protobuf.Value.Builder addValuesBuilder(int index) { * repeated .google.protobuf.Value values = 2; */ public java.util.List getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); + return internalGetValuesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> - getValuesFieldBuilder() { + internalGetValuesFieldBuilder() { if (valuesBuilder_ == null) { valuesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder>( @@ -3430,7 +3515,7 @@ public Builder clearResumeToken() { } private com.google.spanner.v1.ResultSetStats stats_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetStats, com.google.spanner.v1.ResultSetStats.Builder, com.google.spanner.v1.ResultSetStatsOrBuilder> @@ -3601,7 +3686,7 @@ public Builder clearStats() { public com.google.spanner.v1.ResultSetStats.Builder getStatsBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getStatsFieldBuilder().getBuilder(); + return internalGetStatsFieldBuilder().getBuilder(); } /** @@ -3638,14 +3723,14 @@ public com.google.spanner.v1.ResultSetStatsOrBuilder getStatsOrBuilder() { * * .google.spanner.v1.ResultSetStats stats = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetStats, com.google.spanner.v1.ResultSetStats.Builder, com.google.spanner.v1.ResultSetStatsOrBuilder> - getStatsFieldBuilder() { + internalGetStatsFieldBuilder() { if (statsBuilder_ == null) { statsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetStats, com.google.spanner.v1.ResultSetStats.Builder, com.google.spanner.v1.ResultSetStatsOrBuilder>( @@ -3656,7 +3741,7 @@ public com.google.spanner.v1.ResultSetStatsOrBuilder getStatsOrBuilder() { } private com.google.spanner.v1.MultiplexedSessionPrecommitToken precommitToken_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> @@ -3840,7 +3925,7 @@ public Builder clearPrecommitToken() { getPrecommitTokenBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getPrecommitTokenFieldBuilder().getBuilder(); + return internalGetPrecommitTokenFieldBuilder().getBuilder(); } /** @@ -3882,14 +3967,14 @@ public Builder clearPrecommitToken() { * .google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> - getPrecommitTokenFieldBuilder() { + internalGetPrecommitTokenFieldBuilder() { if (precommitTokenBuilder_ == null) { precommitTokenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder>( @@ -3961,15 +4046,261 @@ public Builder clearLast() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.CacheUpdate cacheUpdate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder> + cacheUpdateBuilder_; + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + public boolean hasCacheUpdate() { + return ((bitField0_ & 0x00000080) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + public com.google.spanner.v1.CacheUpdate getCacheUpdate() { + if (cacheUpdateBuilder_ == null) { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } else { + return cacheUpdateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCacheUpdate(com.google.spanner.v1.CacheUpdate value) { + if (cacheUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cacheUpdate_ = value; + } else { + cacheUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCacheUpdate(com.google.spanner.v1.CacheUpdate.Builder builderForValue) { + if (cacheUpdateBuilder_ == null) { + cacheUpdate_ = builderForValue.build(); + } else { + cacheUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCacheUpdate(com.google.spanner.v1.CacheUpdate value) { + if (cacheUpdateBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && cacheUpdate_ != null + && cacheUpdate_ != com.google.spanner.v1.CacheUpdate.getDefaultInstance()) { + getCacheUpdateBuilder().mergeFrom(value); + } else { + cacheUpdate_ = value; + } + } else { + cacheUpdateBuilder_.mergeFrom(value); + } + if (cacheUpdate_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCacheUpdate() { + bitField0_ = (bitField0_ & ~0x00000080); + cacheUpdate_ = null; + if (cacheUpdateBuilder_ != null) { + cacheUpdateBuilder_.dispose(); + cacheUpdateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.CacheUpdate.Builder getCacheUpdateBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetCacheUpdateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder() { + if (cacheUpdateBuilder_ != null) { + return cacheUpdateBuilder_.getMessageOrBuilder(); + } else { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder> + internalGetCacheUpdateFieldBuilder() { + if (cacheUpdateBuilder_ == null) { + cacheUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder>( + getCacheUpdate(), getParentForChildren(), isClean()); + cacheUpdate_ = null; + } + return cacheUpdateBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.PartialResultSet) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSetOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSetOrBuilder.java index 547b2008ad1..4e33ea86022 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSetOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartialResultSetOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/result_set.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface PartialResultSetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.PartialResultSet) @@ -84,59 +86,59 @@ public interface PartialResultSetOrBuilder * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -172,59 +174,59 @@ public interface PartialResultSetOrBuilder * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -260,59 +262,59 @@ public interface PartialResultSetOrBuilder * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -348,59 +350,59 @@ public interface PartialResultSetOrBuilder * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -436,59 +438,59 @@ public interface PartialResultSetOrBuilder * Two or more chunked values can be merged to form a complete value as * follows: * - * * `bool/number/null`: can't be chunked - * * `string`: concatenate the strings - * * `list`: concatenate the lists. If the last element in a list is a - * `string`, `list`, or `object`, merge it with the first element in - * the next list by applying these rules recursively. - * * `object`: concatenate the (field name, field value) pairs. If a - * field name is duplicated, then apply these rules recursively - * to merge the field values. + * * `bool/number/null`: can't be chunked + * * `string`: concatenate the strings + * * `list`: concatenate the lists. If the last element in a list is a + * `string`, `list`, or `object`, merge it with the first element in + * the next list by applying these rules recursively. + * * `object`: concatenate the (field name, field value) pairs. If a + * field name is duplicated, then apply these rules recursively + * to merge the field values. * * Some examples of merging: * - * Strings are concatenated. - * "foo", "bar" => "foobar" + * Strings are concatenated. + * "foo", "bar" => "foobar" * - * Lists of non-strings are concatenated. - * [2, 3], [4] => [2, 3, 4] + * Lists of non-strings are concatenated. + * [2, 3], [4] => [2, 3, 4] * - * Lists are concatenated, but the last and first elements are merged - * because they are strings. - * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + * Lists are concatenated, but the last and first elements are merged + * because they are strings. + * ["a", "b"], ["c", "d"] => ["a", "bc", "d"] * - * Lists are concatenated, but the last and first elements are merged - * because they are lists. Recursively, the last and first elements - * of the inner lists are merged because they are strings. - * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + * Lists are concatenated, but the last and first elements are merged + * because they are lists. Recursively, the last and first elements + * of the inner lists are merged because they are strings. + * ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] * - * Non-overlapping object fields are combined. - * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + * Non-overlapping object fields are combined. + * {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} * - * Overlapping object fields are merged. - * {"a": "1"}, {"a": "2"} => {"a": "12"} + * Overlapping object fields are merged. + * {"a": "1"}, {"a": "2"} => {"a": "12"} * - * Examples of merging objects containing lists of strings. - * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + * Examples of merging objects containing lists of strings. + * {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} * * For a more complete example, suppose a streaming SQL query is * yielding a result set whose rows contain a single string * field. The following `PartialResultSet`s might be yielded: * - * { - * "metadata": { ... } - * "values": ["Hello", "W"] - * "chunked_value": true - * "resume_token": "Af65..." - * } - * { - * "values": ["orl"] - * "chunked_value": true - * } - * { - * "values": ["d"] - * "resume_token": "Zx1B..." - * } + * { + * "metadata": { ... } + * "values": ["Hello", "W"] + * "chunked_value": true + * "resume_token": "Af65..." + * } + * { + * "values": ["orl"] + * "chunked_value": true + * } + * { + * "values": ["d"] + * "resume_token": "Zx1B..." + * } * * This sequence of `PartialResultSet`s encodes two rows, one * containing the field value `"Hello"`, and a second containing the @@ -652,4 +654,62 @@ public interface PartialResultSetOrBuilder * @return The last. */ boolean getLast(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + boolean hasCacheUpdate(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + com.google.spanner.v1.CacheUpdate getCacheUpdate(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Partition.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Partition.java index eb79b78c800..9b8b36727be 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Partition.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Partition.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.Partition} */ -public final class Partition extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Partition extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.Partition) PartitionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Partition"); + } + // Use Partition.newBuilder() to construct. - private Partition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Partition(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private Partition() { partitionToken_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Partition(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_Partition_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_Partition_fieldAccessorTable @@ -184,38 +190,38 @@ public static com.google.spanner.v1.Partition parseFrom( public static com.google.spanner.v1.Partition parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Partition parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Partition parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.Partition parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Partition parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Partition parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -238,7 +244,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -253,7 +259,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.Partition} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.Partition) com.google.spanner.v1.PartitionOrBuilder { @@ -263,7 +269,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_Partition_fieldAccessorTable @@ -274,7 +280,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.Partition.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -323,39 +329,6 @@ private void buildPartial0(com.google.spanner.v1.Partition result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.Partition) { @@ -368,7 +341,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.spanner.v1.Partition other) { if (other == com.google.spanner.v1.Partition.getDefaultInstance()) return this; - if (other.getPartitionToken() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getPartitionToken().isEmpty()) { setPartitionToken(other.getPartitionToken()); } this.mergeUnknownFields(other.getUnknownFields()); @@ -486,17 +459,6 @@ public Builder clearPartitionToken() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.Partition) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptions.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptions.java index 749047b87a8..94447be37dc 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptions.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,32 +29,37 @@ * * Protobuf type {@code google.spanner.v1.PartitionOptions} */ -public final class PartitionOptions extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PartitionOptions extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.PartitionOptions) PartitionOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartitionOptions"); + } + // Use PartitionOptions.newBuilder() to construct. - private PartitionOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartitionOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private PartitionOptions() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartitionOptions(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionOptions_fieldAccessorTable @@ -221,38 +227,38 @@ public static com.google.spanner.v1.PartitionOptions parseFrom( public static com.google.spanner.v1.PartitionOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartitionOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartitionOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -275,7 +281,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -289,7 +295,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.PartitionOptions} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.PartitionOptions) com.google.spanner.v1.PartitionOptionsOrBuilder { @@ -299,7 +305,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionOptions_fieldAccessorTable @@ -311,7 +317,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.PartitionOptions.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -365,39 +371,6 @@ private void buildPartial0(com.google.spanner.v1.PartitionOptions result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.PartitionOptions) { @@ -621,17 +594,6 @@ public Builder clearMaxPartitions() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.PartitionOptions) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptionsOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptionsOrBuilder.java index 2d4eafb5c5a..94ae119aa28 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptionsOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOptionsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface PartitionOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.PartitionOptions) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOrBuilder.java index 118685bdf25..ff7d8444c17 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface PartitionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.Partition) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequest.java index 8fa4b7af4e2..591c068dc72 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.PartitionQueryRequest} */ -public final class PartitionQueryRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PartitionQueryRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.PartitionQueryRequest) PartitionQueryRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartitionQueryRequest"); + } + // Use PartitionQueryRequest.newBuilder() to construct. - private PartitionQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartitionQueryRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,12 +56,6 @@ private PartitionQueryRequest() { sql_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartitionQueryRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionQueryRequest_descriptor; @@ -68,7 +74,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionQueryRequest_fieldAccessorTable @@ -275,7 +281,8 @@ public com.google.protobuf.ByteString getSqlBytes() { * * *
-   * Parameter names and values that bind to placeholders in the SQL string.
+   * Optional. Parameter names and values that bind to placeholders in the SQL
+   * string.
    *
    * A parameter placeholder consists of the `@` character followed by the
    * parameter name (for example, `@firstName`). Parameter names can contain
@@ -289,7 +296,7 @@ public com.google.protobuf.ByteString getSqlBytes() {
    * It's an error to execute a SQL statement with unbound parameters.
    * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the params field is set. */ @@ -302,7 +309,8 @@ public boolean hasParams() { * * *
-   * Parameter names and values that bind to placeholders in the SQL string.
+   * Optional. Parameter names and values that bind to placeholders in the SQL
+   * string.
    *
    * A parameter placeholder consists of the `@` character followed by the
    * parameter name (for example, `@firstName`). Parameter names can contain
@@ -316,7 +324,7 @@ public boolean hasParams() {
    * It's an error to execute a SQL statement with unbound parameters.
    * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The params. */ @@ -329,7 +337,8 @@ public com.google.protobuf.Struct getParams() { * * *
-   * Parameter names and values that bind to placeholders in the SQL string.
+   * Optional. Parameter names and values that bind to placeholders in the SQL
+   * string.
    *
    * A parameter placeholder consists of the `@` character followed by the
    * parameter name (for example, `@firstName`). Parameter names can contain
@@ -343,7 +352,7 @@ public com.google.protobuf.Struct getParams() {
    * It's an error to execute a SQL statement with unbound parameters.
    * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getParamsOrBuilder() { @@ -384,9 +393,9 @@ public int getParamTypesCount() { * * *
-   * It isn't always possible for Cloud Spanner to infer the right SQL type
-   * from a JSON value. For example, values of type `BYTES` and values
-   * of type `STRING` both appear in
+   * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+   * type from a JSON value. For example, values of type `BYTES` and values of
+   * type `STRING` both appear in
    * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
    *
    * In these cases, `param_types` can be used to specify the exact
@@ -395,7 +404,9 @@ public int getParamTypesCount() {
    * about SQL types.
    * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public boolean containsParamTypes(java.lang.String key) { @@ -416,9 +427,9 @@ public java.util.Map getParamTypes * * *
-   * It isn't always possible for Cloud Spanner to infer the right SQL type
-   * from a JSON value. For example, values of type `BYTES` and values
-   * of type `STRING` both appear in
+   * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+   * type from a JSON value. For example, values of type `BYTES` and values of
+   * type `STRING` both appear in
    * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
    *
    * In these cases, `param_types` can be used to specify the exact
@@ -427,7 +438,9 @@ public java.util.Map getParamTypes
    * about SQL types.
    * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.Map getParamTypesMap() { @@ -438,9 +451,9 @@ public java.util.Map getParamTypes * * *
-   * It isn't always possible for Cloud Spanner to infer the right SQL type
-   * from a JSON value. For example, values of type `BYTES` and values
-   * of type `STRING` both appear in
+   * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+   * type from a JSON value. For example, values of type `BYTES` and values of
+   * type `STRING` both appear in
    * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
    *
    * In these cases, `param_types` can be used to specify the exact
@@ -449,7 +462,9 @@ public java.util.Map getParamTypes
    * about SQL types.
    * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public /* nullable */ com.google.spanner.v1.Type getParamTypesOrDefault( @@ -468,9 +483,9 @@ public java.util.Map getParamTypes * * *
-   * It isn't always possible for Cloud Spanner to infer the right SQL type
-   * from a JSON value. For example, values of type `BYTES` and values
-   * of type `STRING` both appear in
+   * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+   * type from a JSON value. For example, values of type `BYTES` and values of
+   * type `STRING` both appear in
    * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
    *
    * In these cases, `param_types` can be used to specify the exact
@@ -479,7 +494,9 @@ public java.util.Map getParamTypes
    * about SQL types.
    * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.spanner.v1.Type getParamTypesOrThrow(java.lang.String key) { @@ -561,19 +578,19 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getTransaction()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sql_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sql_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getParams()); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetParamTypes(), ParamTypesDefaultEntryHolder.defaultEntry, 5); if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(6, getPartitionOptions()); @@ -587,14 +604,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTransaction()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sql_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sql_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sql_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getParams()); @@ -716,38 +733,38 @@ public static com.google.spanner.v1.PartitionQueryRequest parseFrom( public static com.google.spanner.v1.PartitionQueryRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionQueryRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartitionQueryRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionQueryRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartitionQueryRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionQueryRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -770,7 +787,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -784,7 +801,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.PartitionQueryRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.PartitionQueryRequest) com.google.spanner.v1.PartitionQueryRequestOrBuilder { @@ -816,7 +833,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionQueryRequest_fieldAccessorTable @@ -830,16 +847,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTransactionFieldBuilder(); - getParamsFieldBuilder(); - getPartitionOptionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTransactionFieldBuilder(); + internalGetParamsFieldBuilder(); + internalGetPartitionOptionsFieldBuilder(); } } @@ -929,39 +946,6 @@ private void buildPartial0(com.google.spanner.v1.PartitionQueryRequest result) { 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.v1.PartitionQueryRequest) { @@ -1029,7 +1013,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTransactionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTransactionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -1041,7 +1026,7 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getParamsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetParamsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1061,7 +1046,7 @@ public Builder mergeFrom( case 50: { input.readMessage( - getPartitionOptionsFieldBuilder().getBuilder(), extensionRegistry); + internalGetPartitionOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 @@ -1206,7 +1191,7 @@ public Builder setSessionBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.TransactionSelector transaction_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> @@ -1359,7 +1344,7 @@ public Builder clearTransaction() { public com.google.spanner.v1.TransactionSelector.Builder getTransactionBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTransactionFieldBuilder().getBuilder(); + return internalGetTransactionFieldBuilder().getBuilder(); } /** @@ -1392,14 +1377,14 @@ public com.google.spanner.v1.TransactionSelectorOrBuilder getTransactionOrBuilde * * .google.spanner.v1.TransactionSelector transaction = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> - getTransactionFieldBuilder() { + internalGetTransactionFieldBuilder() { if (transactionBuilder_ == null) { transactionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder>( @@ -1581,7 +1566,7 @@ public Builder setSqlBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Struct params_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> @@ -1591,7 +1576,8 @@ public Builder setSqlBytes(com.google.protobuf.ByteString value) { * * *
-     * Parameter names and values that bind to placeholders in the SQL string.
+     * Optional. Parameter names and values that bind to placeholders in the SQL
+     * string.
      *
      * A parameter placeholder consists of the `@` character followed by the
      * parameter name (for example, `@firstName`). Parameter names can contain
@@ -1605,7 +1591,7 @@ public Builder setSqlBytes(com.google.protobuf.ByteString value) {
      * It's an error to execute a SQL statement with unbound parameters.
      * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the params field is set. */ @@ -1617,7 +1603,8 @@ public boolean hasParams() { * * *
-     * Parameter names and values that bind to placeholders in the SQL string.
+     * Optional. Parameter names and values that bind to placeholders in the SQL
+     * string.
      *
      * A parameter placeholder consists of the `@` character followed by the
      * parameter name (for example, `@firstName`). Parameter names can contain
@@ -1631,7 +1618,7 @@ public boolean hasParams() {
      * It's an error to execute a SQL statement with unbound parameters.
      * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The params. */ @@ -1647,7 +1634,8 @@ public com.google.protobuf.Struct getParams() { * * *
-     * Parameter names and values that bind to placeholders in the SQL string.
+     * Optional. Parameter names and values that bind to placeholders in the SQL
+     * string.
      *
      * A parameter placeholder consists of the `@` character followed by the
      * parameter name (for example, `@firstName`). Parameter names can contain
@@ -1661,7 +1649,7 @@ public com.google.protobuf.Struct getParams() {
      * It's an error to execute a SQL statement with unbound parameters.
      * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder setParams(com.google.protobuf.Struct value) { if (paramsBuilder_ == null) { @@ -1681,7 +1669,8 @@ public Builder setParams(com.google.protobuf.Struct value) { * * *
-     * Parameter names and values that bind to placeholders in the SQL string.
+     * Optional. Parameter names and values that bind to placeholders in the SQL
+     * string.
      *
      * A parameter placeholder consists of the `@` character followed by the
      * parameter name (for example, `@firstName`). Parameter names can contain
@@ -1695,7 +1684,7 @@ public Builder setParams(com.google.protobuf.Struct value) {
      * It's an error to execute a SQL statement with unbound parameters.
      * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder setParams(com.google.protobuf.Struct.Builder builderForValue) { if (paramsBuilder_ == null) { @@ -1712,7 +1701,8 @@ public Builder setParams(com.google.protobuf.Struct.Builder builderForValue) { * * *
-     * Parameter names and values that bind to placeholders in the SQL string.
+     * Optional. Parameter names and values that bind to placeholders in the SQL
+     * string.
      *
      * A parameter placeholder consists of the `@` character followed by the
      * parameter name (for example, `@firstName`). Parameter names can contain
@@ -1726,7 +1716,7 @@ public Builder setParams(com.google.protobuf.Struct.Builder builderForValue) {
      * It's an error to execute a SQL statement with unbound parameters.
      * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder mergeParams(com.google.protobuf.Struct value) { if (paramsBuilder_ == null) { @@ -1751,7 +1741,8 @@ public Builder mergeParams(com.google.protobuf.Struct value) { * * *
-     * Parameter names and values that bind to placeholders in the SQL string.
+     * Optional. Parameter names and values that bind to placeholders in the SQL
+     * string.
      *
      * A parameter placeholder consists of the `@` character followed by the
      * parameter name (for example, `@firstName`). Parameter names can contain
@@ -1765,7 +1756,7 @@ public Builder mergeParams(com.google.protobuf.Struct value) {
      * It's an error to execute a SQL statement with unbound parameters.
      * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder clearParams() { bitField0_ = (bitField0_ & ~0x00000008); @@ -1782,7 +1773,8 @@ public Builder clearParams() { * * *
-     * Parameter names and values that bind to placeholders in the SQL string.
+     * Optional. Parameter names and values that bind to placeholders in the SQL
+     * string.
      *
      * A parameter placeholder consists of the `@` character followed by the
      * parameter name (for example, `@firstName`). Parameter names can contain
@@ -1796,19 +1788,20 @@ public Builder clearParams() {
      * It's an error to execute a SQL statement with unbound parameters.
      * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public com.google.protobuf.Struct.Builder getParamsBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getParamsFieldBuilder().getBuilder(); + return internalGetParamsFieldBuilder().getBuilder(); } /** * * *
-     * Parameter names and values that bind to placeholders in the SQL string.
+     * Optional. Parameter names and values that bind to placeholders in the SQL
+     * string.
      *
      * A parameter placeholder consists of the `@` character followed by the
      * parameter name (for example, `@firstName`). Parameter names can contain
@@ -1822,7 +1815,7 @@ public com.google.protobuf.Struct.Builder getParamsBuilder() {
      * It's an error to execute a SQL statement with unbound parameters.
      * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public com.google.protobuf.StructOrBuilder getParamsOrBuilder() { if (paramsBuilder_ != null) { @@ -1836,7 +1829,8 @@ public com.google.protobuf.StructOrBuilder getParamsOrBuilder() { * * *
-     * Parameter names and values that bind to placeholders in the SQL string.
+     * Optional. Parameter names and values that bind to placeholders in the SQL
+     * string.
      *
      * A parameter placeholder consists of the `@` character followed by the
      * parameter name (for example, `@firstName`). Parameter names can contain
@@ -1850,16 +1844,16 @@ public com.google.protobuf.StructOrBuilder getParamsOrBuilder() {
      * It's an error to execute a SQL statement with unbound parameters.
      * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getParamsFieldBuilder() { + internalGetParamsFieldBuilder() { if (paramsBuilder_ == null) { paramsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( @@ -1931,9 +1925,9 @@ public int getParamTypesCount() { * * *
-     * It isn't always possible for Cloud Spanner to infer the right SQL type
-     * from a JSON value. For example, values of type `BYTES` and values
-     * of type `STRING` both appear in
+     * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+     * type from a JSON value. For example, values of type `BYTES` and values of
+     * type `STRING` both appear in
      * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
      *
      * In these cases, `param_types` can be used to specify the exact
@@ -1942,7 +1936,9 @@ public int getParamTypesCount() {
      * about SQL types.
      * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public boolean containsParamTypes(java.lang.String key) { @@ -1963,9 +1959,9 @@ public java.util.Map getParamTypes * * *
-     * It isn't always possible for Cloud Spanner to infer the right SQL type
-     * from a JSON value. For example, values of type `BYTES` and values
-     * of type `STRING` both appear in
+     * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+     * type from a JSON value. For example, values of type `BYTES` and values of
+     * type `STRING` both appear in
      * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
      *
      * In these cases, `param_types` can be used to specify the exact
@@ -1974,7 +1970,9 @@ public java.util.Map getParamTypes
      * about SQL types.
      * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.Map getParamTypesMap() { @@ -1985,9 +1983,9 @@ public java.util.Map getParamTypes * * *
-     * It isn't always possible for Cloud Spanner to infer the right SQL type
-     * from a JSON value. For example, values of type `BYTES` and values
-     * of type `STRING` both appear in
+     * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+     * type from a JSON value. For example, values of type `BYTES` and values of
+     * type `STRING` both appear in
      * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
      *
      * In these cases, `param_types` can be used to specify the exact
@@ -1996,7 +1994,9 @@ public java.util.Map getParamTypes
      * about SQL types.
      * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public /* nullable */ com.google.spanner.v1.Type getParamTypesOrDefault( @@ -2015,9 +2015,9 @@ public java.util.Map getParamTypes * * *
-     * It isn't always possible for Cloud Spanner to infer the right SQL type
-     * from a JSON value. For example, values of type `BYTES` and values
-     * of type `STRING` both appear in
+     * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+     * type from a JSON value. For example, values of type `BYTES` and values of
+     * type `STRING` both appear in
      * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
      *
      * In these cases, `param_types` can be used to specify the exact
@@ -2026,7 +2026,9 @@ public java.util.Map getParamTypes
      * about SQL types.
      * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.spanner.v1.Type getParamTypesOrThrow(java.lang.String key) { @@ -2051,9 +2053,9 @@ public Builder clearParamTypes() { * * *
-     * It isn't always possible for Cloud Spanner to infer the right SQL type
-     * from a JSON value. For example, values of type `BYTES` and values
-     * of type `STRING` both appear in
+     * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+     * type from a JSON value. For example, values of type `BYTES` and values of
+     * type `STRING` both appear in
      * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
      *
      * In these cases, `param_types` can be used to specify the exact
@@ -2062,7 +2064,9 @@ public Builder clearParamTypes() {
      * about SQL types.
      * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder removeParamTypes(java.lang.String key) { if (key == null) { @@ -2083,9 +2087,9 @@ public java.util.Map getMutablePar * * *
-     * It isn't always possible for Cloud Spanner to infer the right SQL type
-     * from a JSON value. For example, values of type `BYTES` and values
-     * of type `STRING` both appear in
+     * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+     * type from a JSON value. For example, values of type `BYTES` and values of
+     * type `STRING` both appear in
      * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
      *
      * In these cases, `param_types` can be used to specify the exact
@@ -2094,7 +2098,9 @@ public java.util.Map getMutablePar
      * about SQL types.
      * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder putParamTypes(java.lang.String key, com.google.spanner.v1.Type value) { if (key == null) { @@ -2112,9 +2118,9 @@ public Builder putParamTypes(java.lang.String key, com.google.spanner.v1.Type va * * *
-     * It isn't always possible for Cloud Spanner to infer the right SQL type
-     * from a JSON value. For example, values of type `BYTES` and values
-     * of type `STRING` both appear in
+     * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+     * type from a JSON value. For example, values of type `BYTES` and values of
+     * type `STRING` both appear in
      * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
      *
      * In these cases, `param_types` can be used to specify the exact
@@ -2123,7 +2129,9 @@ public Builder putParamTypes(java.lang.String key, com.google.spanner.v1.Type va
      * about SQL types.
      * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder putAllParamTypes( java.util.Map values) { @@ -2142,9 +2150,9 @@ public Builder putAllParamTypes( * * *
-     * It isn't always possible for Cloud Spanner to infer the right SQL type
-     * from a JSON value. For example, values of type `BYTES` and values
-     * of type `STRING` both appear in
+     * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+     * type from a JSON value. For example, values of type `BYTES` and values of
+     * type `STRING` both appear in
      * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
      *
      * In these cases, `param_types` can be used to specify the exact
@@ -2153,7 +2161,9 @@ public Builder putAllParamTypes(
      * about SQL types.
      * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.spanner.v1.Type.Builder putParamTypesBuilderIfAbsent(java.lang.String key) { java.util.Map builderMap = @@ -2171,7 +2181,7 @@ public com.google.spanner.v1.Type.Builder putParamTypesBuilderIfAbsent(java.lang } private com.google.spanner.v1.PartitionOptions partitionOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.PartitionOptions, com.google.spanner.v1.PartitionOptions.Builder, com.google.spanner.v1.PartitionOptionsOrBuilder> @@ -2317,7 +2327,7 @@ public Builder clearPartitionOptions() { public com.google.spanner.v1.PartitionOptions.Builder getPartitionOptionsBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getPartitionOptionsFieldBuilder().getBuilder(); + return internalGetPartitionOptionsFieldBuilder().getBuilder(); } /** @@ -2348,14 +2358,14 @@ public com.google.spanner.v1.PartitionOptionsOrBuilder getPartitionOptionsOrBuil * * .google.spanner.v1.PartitionOptions partition_options = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.PartitionOptions, com.google.spanner.v1.PartitionOptions.Builder, com.google.spanner.v1.PartitionOptionsOrBuilder> - getPartitionOptionsFieldBuilder() { + internalGetPartitionOptionsFieldBuilder() { if (partitionOptionsBuilder_ == null) { partitionOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.PartitionOptions, com.google.spanner.v1.PartitionOptions.Builder, com.google.spanner.v1.PartitionOptionsOrBuilder>( @@ -2365,17 +2375,6 @@ public com.google.spanner.v1.PartitionOptionsOrBuilder getPartitionOptionsOrBuil return partitionOptionsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.PartitionQueryRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequestOrBuilder.java index e637e57eb3f..c03b0b2e6af 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionQueryRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface PartitionQueryRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.PartitionQueryRequest) @@ -148,7 +150,8 @@ public interface PartitionQueryRequestOrBuilder * * *
-   * Parameter names and values that bind to placeholders in the SQL string.
+   * Optional. Parameter names and values that bind to placeholders in the SQL
+   * string.
    *
    * A parameter placeholder consists of the `@` character followed by the
    * parameter name (for example, `@firstName`). Parameter names can contain
@@ -162,7 +165,7 @@ public interface PartitionQueryRequestOrBuilder
    * It's an error to execute a SQL statement with unbound parameters.
    * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the params field is set. */ @@ -172,7 +175,8 @@ public interface PartitionQueryRequestOrBuilder * * *
-   * Parameter names and values that bind to placeholders in the SQL string.
+   * Optional. Parameter names and values that bind to placeholders in the SQL
+   * string.
    *
    * A parameter placeholder consists of the `@` character followed by the
    * parameter name (for example, `@firstName`). Parameter names can contain
@@ -186,7 +190,7 @@ public interface PartitionQueryRequestOrBuilder
    * It's an error to execute a SQL statement with unbound parameters.
    * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The params. */ @@ -196,7 +200,8 @@ public interface PartitionQueryRequestOrBuilder * * *
-   * Parameter names and values that bind to placeholders in the SQL string.
+   * Optional. Parameter names and values that bind to placeholders in the SQL
+   * string.
    *
    * A parameter placeholder consists of the `@` character followed by the
    * parameter name (for example, `@firstName`). Parameter names can contain
@@ -210,7 +215,7 @@ public interface PartitionQueryRequestOrBuilder
    * It's an error to execute a SQL statement with unbound parameters.
    * 
* - * .google.protobuf.Struct params = 4; + * .google.protobuf.Struct params = 4 [(.google.api.field_behavior) = OPTIONAL]; */ com.google.protobuf.StructOrBuilder getParamsOrBuilder(); @@ -218,9 +223,9 @@ public interface PartitionQueryRequestOrBuilder * * *
-   * It isn't always possible for Cloud Spanner to infer the right SQL type
-   * from a JSON value. For example, values of type `BYTES` and values
-   * of type `STRING` both appear in
+   * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+   * type from a JSON value. For example, values of type `BYTES` and values of
+   * type `STRING` both appear in
    * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
    *
    * In these cases, `param_types` can be used to specify the exact
@@ -229,7 +234,9 @@ public interface PartitionQueryRequestOrBuilder
    * about SQL types.
    * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getParamTypesCount(); @@ -237,9 +244,9 @@ public interface PartitionQueryRequestOrBuilder * * *
-   * It isn't always possible for Cloud Spanner to infer the right SQL type
-   * from a JSON value. For example, values of type `BYTES` and values
-   * of type `STRING` both appear in
+   * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+   * type from a JSON value. For example, values of type `BYTES` and values of
+   * type `STRING` both appear in
    * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
    *
    * In these cases, `param_types` can be used to specify the exact
@@ -248,7 +255,9 @@ public interface PartitionQueryRequestOrBuilder
    * about SQL types.
    * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ boolean containsParamTypes(java.lang.String key); @@ -260,9 +269,9 @@ public interface PartitionQueryRequestOrBuilder * * *
-   * It isn't always possible for Cloud Spanner to infer the right SQL type
-   * from a JSON value. For example, values of type `BYTES` and values
-   * of type `STRING` both appear in
+   * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+   * type from a JSON value. For example, values of type `BYTES` and values of
+   * type `STRING` both appear in
    * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
    *
    * In these cases, `param_types` can be used to specify the exact
@@ -271,7 +280,9 @@ public interface PartitionQueryRequestOrBuilder
    * about SQL types.
    * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.Map getParamTypesMap(); @@ -279,9 +290,9 @@ public interface PartitionQueryRequestOrBuilder * * *
-   * It isn't always possible for Cloud Spanner to infer the right SQL type
-   * from a JSON value. For example, values of type `BYTES` and values
-   * of type `STRING` both appear in
+   * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+   * type from a JSON value. For example, values of type `BYTES` and values of
+   * type `STRING` both appear in
    * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
    *
    * In these cases, `param_types` can be used to specify the exact
@@ -290,7 +301,9 @@ public interface PartitionQueryRequestOrBuilder
    * about SQL types.
    * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ /* nullable */ com.google.spanner.v1.Type getParamTypesOrDefault( @@ -302,9 +315,9 @@ com.google.spanner.v1.Type getParamTypesOrDefault( * * *
-   * It isn't always possible for Cloud Spanner to infer the right SQL type
-   * from a JSON value. For example, values of type `BYTES` and values
-   * of type `STRING` both appear in
+   * Optional. It isn't always possible for Cloud Spanner to infer the right SQL
+   * type from a JSON value. For example, values of type `BYTES` and values of
+   * type `STRING` both appear in
    * [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings.
    *
    * In these cases, `param_types` can be used to specify the exact
@@ -313,7 +326,9 @@ com.google.spanner.v1.Type getParamTypesOrDefault(
    * about SQL types.
    * 
* - * map<string, .google.spanner.v1.Type> param_types = 5; + * + * map<string, .google.spanner.v1.Type> param_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.spanner.v1.Type getParamTypesOrThrow(java.lang.String key); diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequest.java index 977ac885ea3..e3880e91f1b 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.PartitionReadRequest} */ -public final class PartitionReadRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PartitionReadRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.PartitionReadRequest) PartitionReadRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartitionReadRequest"); + } + // Use PartitionReadRequest.newBuilder() to construct. - private PartitionReadRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartitionReadRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private PartitionReadRequest() { columns_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartitionReadRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionReadRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionReadRequest_fieldAccessorTable @@ -512,20 +518,20 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getTransaction()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, table_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, index_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, index_); } for (int i = 0; i < columns_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, columns_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 5, columns_.getRaw(i)); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(6, getKeySet()); @@ -542,17 +548,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTransaction()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, table_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, index_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(index_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, index_); } { int dataSize = 0; @@ -675,38 +681,38 @@ public static com.google.spanner.v1.PartitionReadRequest parseFrom( public static com.google.spanner.v1.PartitionReadRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionReadRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartitionReadRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionReadRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartitionReadRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionReadRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -729,7 +735,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -743,7 +749,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.PartitionReadRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.PartitionReadRequest) com.google.spanner.v1.PartitionReadRequestOrBuilder { @@ -753,7 +759,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionReadRequest_fieldAccessorTable @@ -767,16 +773,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTransactionFieldBuilder(); - getKeySetFieldBuilder(); - getPartitionOptionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTransactionFieldBuilder(); + internalGetKeySetFieldBuilder(); + internalGetPartitionOptionsFieldBuilder(); } } @@ -870,39 +876,6 @@ private void buildPartial0(com.google.spanner.v1.PartitionReadRequest result) { 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.v1.PartitionReadRequest) { @@ -983,7 +956,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTransactionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTransactionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -1008,14 +982,14 @@ public Builder mergeFrom( } // case 42 case 50: { - input.readMessage(getKeySetFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetKeySetFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 case 74: { input.readMessage( - getPartitionOptionsFieldBuilder().getBuilder(), extensionRegistry); + internalGetPartitionOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 74 @@ -1160,7 +1134,7 @@ public Builder setSessionBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.TransactionSelector transaction_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> @@ -1313,7 +1287,7 @@ public Builder clearTransaction() { public com.google.spanner.v1.TransactionSelector.Builder getTransactionBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTransactionFieldBuilder().getBuilder(); + return internalGetTransactionFieldBuilder().getBuilder(); } /** @@ -1346,14 +1320,14 @@ public com.google.spanner.v1.TransactionSelectorOrBuilder getTransactionOrBuilde * * .google.spanner.v1.TransactionSelector transaction = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> - getTransactionFieldBuilder() { + internalGetTransactionFieldBuilder() { if (transactionBuilder_ == null) { transactionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder>( @@ -1803,7 +1777,7 @@ public Builder addColumnsBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.KeySet keySet_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.KeySet, com.google.spanner.v1.KeySet.Builder, com.google.spanner.v1.KeySetOrBuilder> @@ -2009,7 +1983,7 @@ public Builder clearKeySet() { public com.google.spanner.v1.KeySet.Builder getKeySetBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getKeySetFieldBuilder().getBuilder(); + return internalGetKeySetFieldBuilder().getBuilder(); } /** @@ -2056,14 +2030,14 @@ public com.google.spanner.v1.KeySetOrBuilder getKeySetOrBuilder() { * * .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.KeySet, com.google.spanner.v1.KeySet.Builder, com.google.spanner.v1.KeySetOrBuilder> - getKeySetFieldBuilder() { + internalGetKeySetFieldBuilder() { if (keySetBuilder_ == null) { keySetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.KeySet, com.google.spanner.v1.KeySet.Builder, com.google.spanner.v1.KeySetOrBuilder>( @@ -2074,7 +2048,7 @@ public com.google.spanner.v1.KeySetOrBuilder getKeySetOrBuilder() { } private com.google.spanner.v1.PartitionOptions partitionOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.PartitionOptions, com.google.spanner.v1.PartitionOptions.Builder, com.google.spanner.v1.PartitionOptionsOrBuilder> @@ -2220,7 +2194,7 @@ public Builder clearPartitionOptions() { public com.google.spanner.v1.PartitionOptions.Builder getPartitionOptionsBuilder() { bitField0_ |= 0x00000040; onChanged(); - return getPartitionOptionsFieldBuilder().getBuilder(); + return internalGetPartitionOptionsFieldBuilder().getBuilder(); } /** @@ -2251,14 +2225,14 @@ public com.google.spanner.v1.PartitionOptionsOrBuilder getPartitionOptionsOrBuil * * .google.spanner.v1.PartitionOptions partition_options = 9; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.PartitionOptions, com.google.spanner.v1.PartitionOptions.Builder, com.google.spanner.v1.PartitionOptionsOrBuilder> - getPartitionOptionsFieldBuilder() { + internalGetPartitionOptionsFieldBuilder() { if (partitionOptionsBuilder_ == null) { partitionOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.PartitionOptions, com.google.spanner.v1.PartitionOptions.Builder, com.google.spanner.v1.PartitionOptionsOrBuilder>( @@ -2268,17 +2242,6 @@ public com.google.spanner.v1.PartitionOptionsOrBuilder getPartitionOptionsOrBuil return partitionOptionsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.PartitionReadRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequestOrBuilder.java index 8f193aba282..506b61d7824 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionReadRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface PartitionReadRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.PartitionReadRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponse.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponse.java index fc5d60e234d..47d8ccb7cb5 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponse.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.PartitionResponse} */ -public final class PartitionResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PartitionResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.PartitionResponse) PartitionResponseOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartitionResponse"); + } + // Use PartitionResponse.newBuilder() to construct. - private PartitionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartitionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private PartitionResponse() { partitions_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartitionResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionResponse_fieldAccessorTable @@ -311,38 +317,38 @@ public static com.google.spanner.v1.PartitionResponse parseFrom( public static com.google.spanner.v1.PartitionResponse parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartitionResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PartitionResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PartitionResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -365,7 +371,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -380,7 +386,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.PartitionResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.PartitionResponse) com.google.spanner.v1.PartitionResponseOrBuilder { @@ -390,7 +396,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_PartitionResponse_fieldAccessorTable @@ -404,15 +410,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPartitionsFieldBuilder(); - getTransactionFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPartitionsFieldBuilder(); + internalGetTransactionFieldBuilder(); } } @@ -490,39 +496,6 @@ private void buildPartial0(com.google.spanner.v1.PartitionResponse result) { 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.v1.PartitionResponse) { @@ -554,8 +527,8 @@ public Builder mergeFrom(com.google.spanner.v1.PartitionResponse other) { partitions_ = other.partitions_; bitField0_ = (bitField0_ & ~0x00000001); partitionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPartitionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPartitionsFieldBuilder() : null; } else { partitionsBuilder_.addAllMessages(other.partitions_); @@ -605,7 +578,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTransactionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTransactionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -638,7 +612,7 @@ private void ensurePartitionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Partition, com.google.spanner.v1.Partition.Builder, com.google.spanner.v1.PartitionOrBuilder> @@ -897,7 +871,7 @@ public Builder removePartitions(int index) { * repeated .google.spanner.v1.Partition partitions = 1; */ public com.google.spanner.v1.Partition.Builder getPartitionsBuilder(int index) { - return getPartitionsFieldBuilder().getBuilder(index); + return internalGetPartitionsFieldBuilder().getBuilder(index); } /** @@ -945,7 +919,7 @@ public com.google.spanner.v1.PartitionOrBuilder getPartitionsOrBuilder(int index * repeated .google.spanner.v1.Partition partitions = 1; */ public com.google.spanner.v1.Partition.Builder addPartitionsBuilder() { - return getPartitionsFieldBuilder() + return internalGetPartitionsFieldBuilder() .addBuilder(com.google.spanner.v1.Partition.getDefaultInstance()); } @@ -959,7 +933,7 @@ public com.google.spanner.v1.Partition.Builder addPartitionsBuilder() { * repeated .google.spanner.v1.Partition partitions = 1; */ public com.google.spanner.v1.Partition.Builder addPartitionsBuilder(int index) { - return getPartitionsFieldBuilder() + return internalGetPartitionsFieldBuilder() .addBuilder(index, com.google.spanner.v1.Partition.getDefaultInstance()); } @@ -973,17 +947,17 @@ public com.google.spanner.v1.Partition.Builder addPartitionsBuilder(int index) { * repeated .google.spanner.v1.Partition partitions = 1; */ public java.util.List getPartitionsBuilderList() { - return getPartitionsFieldBuilder().getBuilderList(); + return internalGetPartitionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Partition, com.google.spanner.v1.Partition.Builder, com.google.spanner.v1.PartitionOrBuilder> - getPartitionsFieldBuilder() { + internalGetPartitionsFieldBuilder() { if (partitionsBuilder_ == null) { partitionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.Partition, com.google.spanner.v1.Partition.Builder, com.google.spanner.v1.PartitionOrBuilder>( @@ -994,7 +968,7 @@ public java.util.List getPartitionsBuil } private com.google.spanner.v1.Transaction transaction_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Transaction, com.google.spanner.v1.Transaction.Builder, com.google.spanner.v1.TransactionOrBuilder> @@ -1139,7 +1113,7 @@ public Builder clearTransaction() { public com.google.spanner.v1.Transaction.Builder getTransactionBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTransactionFieldBuilder().getBuilder(); + return internalGetTransactionFieldBuilder().getBuilder(); } /** @@ -1170,14 +1144,14 @@ public com.google.spanner.v1.TransactionOrBuilder getTransactionOrBuilder() { * * .google.spanner.v1.Transaction transaction = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Transaction, com.google.spanner.v1.Transaction.Builder, com.google.spanner.v1.TransactionOrBuilder> - getTransactionFieldBuilder() { + internalGetTransactionFieldBuilder() { if (transactionBuilder_ == null) { transactionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Transaction, com.google.spanner.v1.Transaction.Builder, com.google.spanner.v1.TransactionOrBuilder>( @@ -1187,17 +1161,6 @@ public com.google.spanner.v1.TransactionOrBuilder getTransactionOrBuilder() { return transactionBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.PartitionResponse) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponseOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponseOrBuilder.java index 5a03ad7891c..078cd629d68 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponseOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PartitionResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface PartitionResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.PartitionResponse) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNode.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNode.java index 03dd67830dd..2573c5966d2 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNode.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/query_plan.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.PlanNode} */ -public final class PlanNode extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PlanNode extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.PlanNode) PlanNodeOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PlanNode"); + } + // Use PlanNode.newBuilder() to construct. - private PlanNode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PlanNode(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +58,13 @@ private PlanNode() { childLinks_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PlanNode(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_PlanNode_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_PlanNode_fieldAccessorTable @@ -115,6 +121,16 @@ public enum Kind implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Kind"); + } + /** * * @@ -211,7 +227,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.PlanNode.getDescriptor().getEnumTypes().get(0); } @@ -337,14 +353,24 @@ public interface ChildLinkOrBuilder * * Protobuf type {@code google.spanner.v1.PlanNode.ChildLink} */ - public static final class ChildLink extends com.google.protobuf.GeneratedMessageV3 + public static final class ChildLink extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.PlanNode.ChildLink) ChildLinkOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChildLink"); + } + // Use ChildLink.newBuilder() to construct. - private ChildLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ChildLink(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -353,19 +379,13 @@ private ChildLink() { variable_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ChildLink(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_PlanNode_ChildLink_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_PlanNode_ChildLink_fieldAccessorTable @@ -536,11 +556,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (childIndex_ != 0) { output.writeInt32(1, childIndex_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(variable_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, variable_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(variable_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, variable_); } getUnknownFields().writeTo(output); } @@ -554,11 +574,11 @@ public int getSerializedSize() { if (childIndex_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, childIndex_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(variable_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, variable_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(variable_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, variable_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -638,38 +658,38 @@ public static com.google.spanner.v1.PlanNode.ChildLink parseFrom( public static com.google.spanner.v1.PlanNode.ChildLink parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PlanNode.ChildLink parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PlanNode.ChildLink parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.PlanNode.ChildLink parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PlanNode.ChildLink parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PlanNode.ChildLink parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -692,8 +712,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -708,8 +727,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.PlanNode.ChildLink} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.PlanNode.ChildLink) com.google.spanner.v1.PlanNode.ChildLinkOrBuilder { @@ -719,7 +737,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_PlanNode_ChildLink_fieldAccessorTable @@ -731,7 +749,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.PlanNode.ChildLink.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -789,41 +807,6 @@ private void buildPartial0(com.google.spanner.v1.PlanNode.ChildLink result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.PlanNode.ChildLink) { @@ -1240,18 +1223,6 @@ public Builder setVariableBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.PlanNode.ChildLink) } @@ -1425,14 +1396,24 @@ public interface ShortRepresentationOrBuilder * * Protobuf type {@code google.spanner.v1.PlanNode.ShortRepresentation} */ - public static final class ShortRepresentation extends com.google.protobuf.GeneratedMessageV3 + public static final class ShortRepresentation extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.PlanNode.ShortRepresentation) ShortRepresentationOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ShortRepresentation"); + } + // Use ShortRepresentation.newBuilder() to construct. - private ShortRepresentation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ShortRepresentation(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1440,12 +1421,6 @@ private ShortRepresentation() { description_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ShortRepresentation(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_PlanNode_ShortRepresentation_descriptor; @@ -1464,7 +1439,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_PlanNode_ShortRepresentation_fieldAccessorTable @@ -1662,10 +1637,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetSubqueries(), SubqueriesDefaultEntryHolder.defaultEntry, 2); getUnknownFields().writeTo(output); } @@ -1676,8 +1651,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); } for (java.util.Map.Entry entry : internalGetSubqueries().getMap().entrySet()) { @@ -1766,38 +1741,38 @@ public static com.google.spanner.v1.PlanNode.ShortRepresentation parseFrom( public static com.google.spanner.v1.PlanNode.ShortRepresentation parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PlanNode.ShortRepresentation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PlanNode.ShortRepresentation parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.PlanNode.ShortRepresentation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PlanNode.ShortRepresentation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PlanNode.ShortRepresentation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1820,8 +1795,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1836,8 +1810,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.PlanNode.ShortRepresentation} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.PlanNode.ShortRepresentation) com.google.spanner.v1.PlanNode.ShortRepresentationOrBuilder { @@ -1869,7 +1842,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_PlanNode_ShortRepresentation_fieldAccessorTable @@ -1881,7 +1854,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi // Construct using com.google.spanner.v1.PlanNode.ShortRepresentation.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1936,41 +1909,6 @@ private void buildPartial0(com.google.spanner.v1.PlanNode.ShortRepresentation re } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.PlanNode.ShortRepresentation) { @@ -2363,18 +2301,6 @@ public Builder putAllSubqueries(java.util.Map * * .google.protobuf.Struct metadata = 6; @@ -2713,10 +2639,10 @@ public boolean hasMetadata() { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } *
* * .google.protobuf.Struct metadata = 6; @@ -2736,10 +2662,10 @@ public com.google.protobuf.Struct getMetadata() { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -2831,8 +2757,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kind_ != com.google.spanner.v1.PlanNode.Kind.KIND_UNSPECIFIED.getNumber()) { output.writeEnum(2, kind_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); } for (int i = 0; i < childLinks_.size(); i++) { output.writeMessage(4, childLinks_.get(i)); @@ -2861,8 +2787,8 @@ public int getSerializedSize() { if (kind_ != com.google.spanner.v1.PlanNode.Kind.KIND_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, kind_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); } for (int i = 0; i < childLinks_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, childLinks_.get(i)); @@ -2981,38 +2907,38 @@ public static com.google.spanner.v1.PlanNode parseFrom( public static com.google.spanner.v1.PlanNode parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PlanNode parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PlanNode parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.PlanNode parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.PlanNode parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.PlanNode parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -3035,7 +2961,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3050,7 +2976,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.PlanNode} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.PlanNode) com.google.spanner.v1.PlanNodeOrBuilder { @@ -3060,7 +2986,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_PlanNode_fieldAccessorTable @@ -3073,17 +2999,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getChildLinksFieldBuilder(); - getShortRepresentationFieldBuilder(); - getMetadataFieldBuilder(); - getExecutionStatsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetChildLinksFieldBuilder(); + internalGetShortRepresentationFieldBuilder(); + internalGetMetadataFieldBuilder(); + internalGetExecutionStatsFieldBuilder(); } } @@ -3193,39 +3119,6 @@ private void buildPartial0(com.google.spanner.v1.PlanNode result) { 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.v1.PlanNode) { @@ -3268,8 +3161,8 @@ public Builder mergeFrom(com.google.spanner.v1.PlanNode other) { childLinks_ = other.childLinks_; bitField0_ = (bitField0_ & ~0x00000008); childLinksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getChildLinksFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetChildLinksFieldBuilder() : null; } else { childLinksBuilder_.addAllMessages(other.childLinks_); @@ -3345,19 +3238,21 @@ public Builder mergeFrom( case 42: { input.readMessage( - getShortRepresentationFieldBuilder().getBuilder(), extensionRegistry); + internalGetShortRepresentationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 case 50: { - input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 case 58: { - input.readMessage(getExecutionStatsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExecutionStatsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 @@ -3676,7 +3571,7 @@ private void ensureChildLinksIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.PlanNode.ChildLink, com.google.spanner.v1.PlanNode.ChildLink.Builder, com.google.spanner.v1.PlanNode.ChildLinkOrBuilder> @@ -3935,7 +3830,7 @@ public Builder removeChildLinks(int index) { * repeated .google.spanner.v1.PlanNode.ChildLink child_links = 4; */ public com.google.spanner.v1.PlanNode.ChildLink.Builder getChildLinksBuilder(int index) { - return getChildLinksFieldBuilder().getBuilder(index); + return internalGetChildLinksFieldBuilder().getBuilder(index); } /** @@ -3983,7 +3878,7 @@ public com.google.spanner.v1.PlanNode.ChildLinkOrBuilder getChildLinksOrBuilder( * repeated .google.spanner.v1.PlanNode.ChildLink child_links = 4; */ public com.google.spanner.v1.PlanNode.ChildLink.Builder addChildLinksBuilder() { - return getChildLinksFieldBuilder() + return internalGetChildLinksFieldBuilder() .addBuilder(com.google.spanner.v1.PlanNode.ChildLink.getDefaultInstance()); } @@ -3997,7 +3892,7 @@ public com.google.spanner.v1.PlanNode.ChildLink.Builder addChildLinksBuilder() { * repeated .google.spanner.v1.PlanNode.ChildLink child_links = 4; */ public com.google.spanner.v1.PlanNode.ChildLink.Builder addChildLinksBuilder(int index) { - return getChildLinksFieldBuilder() + return internalGetChildLinksFieldBuilder() .addBuilder(index, com.google.spanner.v1.PlanNode.ChildLink.getDefaultInstance()); } @@ -4012,17 +3907,17 @@ public com.google.spanner.v1.PlanNode.ChildLink.Builder addChildLinksBuilder(int */ public java.util.List getChildLinksBuilderList() { - return getChildLinksFieldBuilder().getBuilderList(); + return internalGetChildLinksFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.PlanNode.ChildLink, com.google.spanner.v1.PlanNode.ChildLink.Builder, com.google.spanner.v1.PlanNode.ChildLinkOrBuilder> - getChildLinksFieldBuilder() { + internalGetChildLinksFieldBuilder() { if (childLinksBuilder_ == null) { childLinksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.PlanNode.ChildLink, com.google.spanner.v1.PlanNode.ChildLink.Builder, com.google.spanner.v1.PlanNode.ChildLinkOrBuilder>( @@ -4033,7 +3928,7 @@ public com.google.spanner.v1.PlanNode.ChildLink.Builder addChildLinksBuilder(int } private com.google.spanner.v1.PlanNode.ShortRepresentation shortRepresentation_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.PlanNode.ShortRepresentation, com.google.spanner.v1.PlanNode.ShortRepresentation.Builder, com.google.spanner.v1.PlanNode.ShortRepresentationOrBuilder> @@ -4190,7 +4085,7 @@ public Builder clearShortRepresentation() { getShortRepresentationBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getShortRepresentationFieldBuilder().getBuilder(); + return internalGetShortRepresentationFieldBuilder().getBuilder(); } /** @@ -4224,14 +4119,14 @@ public Builder clearShortRepresentation() { * * .google.spanner.v1.PlanNode.ShortRepresentation short_representation = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.PlanNode.ShortRepresentation, com.google.spanner.v1.PlanNode.ShortRepresentation.Builder, com.google.spanner.v1.PlanNode.ShortRepresentationOrBuilder> - getShortRepresentationFieldBuilder() { + internalGetShortRepresentationFieldBuilder() { if (shortRepresentationBuilder_ == null) { shortRepresentationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.PlanNode.ShortRepresentation, com.google.spanner.v1.PlanNode.ShortRepresentation.Builder, com.google.spanner.v1.PlanNode.ShortRepresentationOrBuilder>( @@ -4242,7 +4137,7 @@ public Builder clearShortRepresentation() { } private com.google.protobuf.Struct metadata_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> @@ -4256,10 +4151,10 @@ public Builder clearShortRepresentation() { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -4278,10 +4173,10 @@ public boolean hasMetadata() { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -4304,10 +4199,10 @@ public com.google.protobuf.Struct getMetadata() { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -4334,10 +4229,10 @@ public Builder setMetadata(com.google.protobuf.Struct value) { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -4361,10 +4256,10 @@ public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -4396,10 +4291,10 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -4423,10 +4318,10 @@ public Builder clearMetadata() { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -4434,7 +4329,7 @@ public Builder clearMetadata() { public com.google.protobuf.Struct.Builder getMetadataBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getMetadataFieldBuilder().getBuilder(); + return internalGetMetadataFieldBuilder().getBuilder(); } /** @@ -4445,10 +4340,10 @@ public com.google.protobuf.Struct.Builder getMetadataBuilder() { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -4469,22 +4364,22 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getMetadataFieldBuilder() { + internalGetMetadataFieldBuilder() { if (metadataBuilder_ == null) { metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( @@ -4495,7 +4390,7 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { } private com.google.protobuf.Struct executionStats_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> @@ -4661,7 +4556,7 @@ public Builder clearExecutionStats() { public com.google.protobuf.Struct.Builder getExecutionStatsBuilder() { bitField0_ |= 0x00000040; onChanged(); - return getExecutionStatsFieldBuilder().getBuilder(); + return internalGetExecutionStatsFieldBuilder().getBuilder(); } /** @@ -4698,14 +4593,14 @@ public com.google.protobuf.StructOrBuilder getExecutionStatsOrBuilder() { * * .google.protobuf.Struct execution_stats = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getExecutionStatsFieldBuilder() { + internalGetExecutionStatsFieldBuilder() { if (executionStatsBuilder_ == null) { executionStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( @@ -4715,17 +4610,6 @@ public com.google.protobuf.StructOrBuilder getExecutionStatsOrBuilder() { return executionStatsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.PlanNode) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNodeOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNodeOrBuilder.java index 8fa6e99b648..75a22e50173 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNodeOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/PlanNodeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/query_plan.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface PlanNodeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.PlanNode) @@ -202,10 +204,10 @@ public interface PlanNodeOrBuilder * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -222,10 +224,10 @@ public interface PlanNodeOrBuilder * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; @@ -242,10 +244,10 @@ public interface PlanNodeOrBuilder * For example, a Parameter Reference node could have the following * information in its metadata: * - * { - * "parameter_reference": "param1", - * "parameter_type": "array" - * } + * { + * "parameter_reference": "param1", + * "parameter_type": "array" + * } * * * .google.protobuf.Struct metadata = 6; diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryAdvisorResult.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryAdvisorResult.java new file mode 100644 index 00000000000..abbcc3cf3a0 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryAdvisorResult.java @@ -0,0 +1,1884 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/query_plan.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +/** + * + * + *
+ * Output of query advisor analysis.
+ * 
+ * + * Protobuf type {@code google.spanner.v1.QueryAdvisorResult} + */ +@com.google.protobuf.Generated +public final class QueryAdvisorResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.QueryAdvisorResult) + QueryAdvisorResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryAdvisorResult"); + } + + // Use QueryAdvisorResult.newBuilder() to construct. + private QueryAdvisorResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private QueryAdvisorResult() { + indexAdvice_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.QueryAdvisorResult.class, + com.google.spanner.v1.QueryAdvisorResult.Builder.class); + } + + public interface IndexAdviceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.QueryAdvisorResult.IndexAdvice) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. DDL statements to add new indexes that will improve the query.
+     * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the ddl. + */ + java.util.List getDdlList(); + + /** + * + * + *
+     * Optional. DDL statements to add new indexes that will improve the query.
+     * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of ddl. + */ + int getDdlCount(); + + /** + * + * + *
+     * Optional. DDL statements to add new indexes that will improve the query.
+     * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The ddl at the given index. + */ + java.lang.String getDdl(int index); + + /** + * + * + *
+     * Optional. DDL statements to add new indexes that will improve the query.
+     * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the ddl at the given index. + */ + com.google.protobuf.ByteString getDdlBytes(int index); + + /** + * + * + *
+     * Optional. Estimated latency improvement factor. For example if the query
+     * currently takes 500 ms to run and the estimated latency with new indexes
+     * is 100 ms this field will be 5.
+     * 
+ * + * double improvement_factor = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The improvementFactor. + */ + double getImprovementFactor(); + } + + /** + * + * + *
+   * Recommendation to add new indexes to run queries more efficiently.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.QueryAdvisorResult.IndexAdvice} + */ + public static final class IndexAdvice extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.QueryAdvisorResult.IndexAdvice) + IndexAdviceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IndexAdvice"); + } + + // Use IndexAdvice.newBuilder() to construct. + private IndexAdvice(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IndexAdvice() { + ddl_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.class, + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder.class); + } + + public static final int DDL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ddl_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Optional. DDL statements to add new indexes that will improve the query.
+     * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the ddl. + */ + public com.google.protobuf.ProtocolStringList getDdlList() { + return ddl_; + } + + /** + * + * + *
+     * Optional. DDL statements to add new indexes that will improve the query.
+     * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of ddl. + */ + public int getDdlCount() { + return ddl_.size(); + } + + /** + * + * + *
+     * Optional. DDL statements to add new indexes that will improve the query.
+     * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The ddl at the given index. + */ + public java.lang.String getDdl(int index) { + return ddl_.get(index); + } + + /** + * + * + *
+     * Optional. DDL statements to add new indexes that will improve the query.
+     * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the ddl at the given index. + */ + public com.google.protobuf.ByteString getDdlBytes(int index) { + return ddl_.getByteString(index); + } + + public static final int IMPROVEMENT_FACTOR_FIELD_NUMBER = 2; + private double improvementFactor_ = 0D; + + /** + * + * + *
+     * Optional. Estimated latency improvement factor. For example if the query
+     * currently takes 500 ms to run and the estimated latency with new indexes
+     * is 100 ms this field will be 5.
+     * 
+ * + * double improvement_factor = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The improvementFactor. + */ + @java.lang.Override + public double getImprovementFactor() { + return improvementFactor_; + } + + 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 < ddl_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ddl_.getRaw(i)); + } + if (java.lang.Double.doubleToRawLongBits(improvementFactor_) != 0) { + output.writeDouble(2, improvementFactor_); + } + 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 < ddl_.size(); i++) { + dataSize += computeStringSizeNoTag(ddl_.getRaw(i)); + } + size += dataSize; + size += 1 * getDdlList().size(); + } + if (java.lang.Double.doubleToRawLongBits(improvementFactor_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, improvementFactor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.QueryAdvisorResult.IndexAdvice)) { + return super.equals(obj); + } + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice other = + (com.google.spanner.v1.QueryAdvisorResult.IndexAdvice) obj; + + if (!getDdlList().equals(other.getDdlList())) return false; + if (java.lang.Double.doubleToLongBits(getImprovementFactor()) + != java.lang.Double.doubleToLongBits(other.getImprovementFactor())) 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 (getDdlCount() > 0) { + hash = (37 * hash) + DDL_FIELD_NUMBER; + hash = (53 * hash) + getDdlList().hashCode(); + } + hash = (37 * hash) + IMPROVEMENT_FACTOR_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getImprovementFactor())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Recommendation to add new indexes to run queries more efficiently.
+     * 
+ * + * Protobuf type {@code google.spanner.v1.QueryAdvisorResult.IndexAdvice} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.QueryAdvisorResult.IndexAdvice) + com.google.spanner.v1.QueryAdvisorResult.IndexAdviceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.class, + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder.class); + } + + // Construct using com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ddl_ = com.google.protobuf.LazyStringArrayList.emptyList(); + improvementFactor_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult.IndexAdvice getDefaultInstanceForType() { + return com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult.IndexAdvice build() { + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult.IndexAdvice buildPartial() { + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice result = + new com.google.spanner.v1.QueryAdvisorResult.IndexAdvice(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.v1.QueryAdvisorResult.IndexAdvice result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ddl_.makeImmutable(); + result.ddl_ = ddl_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.improvementFactor_ = improvementFactor_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.QueryAdvisorResult.IndexAdvice) { + return mergeFrom((com.google.spanner.v1.QueryAdvisorResult.IndexAdvice) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.QueryAdvisorResult.IndexAdvice other) { + if (other == com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.getDefaultInstance()) + return this; + if (!other.ddl_.isEmpty()) { + if (ddl_.isEmpty()) { + ddl_ = other.ddl_; + bitField0_ |= 0x00000001; + } else { + ensureDdlIsMutable(); + ddl_.addAll(other.ddl_); + } + onChanged(); + } + if (java.lang.Double.doubleToRawLongBits(other.getImprovementFactor()) != 0) { + setImprovementFactor(other.getImprovementFactor()); + } + 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(); + ensureDdlIsMutable(); + ddl_.add(s); + break; + } // case 10 + case 17: + { + improvementFactor_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + 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 ddl_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDdlIsMutable() { + if (!ddl_.isModifiable()) { + ddl_ = new com.google.protobuf.LazyStringArrayList(ddl_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+       * Optional. DDL statements to add new indexes that will improve the query.
+       * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the ddl. + */ + public com.google.protobuf.ProtocolStringList getDdlList() { + ddl_.makeImmutable(); + return ddl_; + } + + /** + * + * + *
+       * Optional. DDL statements to add new indexes that will improve the query.
+       * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of ddl. + */ + public int getDdlCount() { + return ddl_.size(); + } + + /** + * + * + *
+       * Optional. DDL statements to add new indexes that will improve the query.
+       * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The ddl at the given index. + */ + public java.lang.String getDdl(int index) { + return ddl_.get(index); + } + + /** + * + * + *
+       * Optional. DDL statements to add new indexes that will improve the query.
+       * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the ddl at the given index. + */ + public com.google.protobuf.ByteString getDdlBytes(int index) { + return ddl_.getByteString(index); + } + + /** + * + * + *
+       * Optional. DDL statements to add new indexes that will improve the query.
+       * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The ddl to set. + * @return This builder for chaining. + */ + public Builder setDdl(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDdlIsMutable(); + ddl_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. DDL statements to add new indexes that will improve the query.
+       * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ddl to add. + * @return This builder for chaining. + */ + public Builder addDdl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDdlIsMutable(); + ddl_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. DDL statements to add new indexes that will improve the query.
+       * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The ddl to add. + * @return This builder for chaining. + */ + public Builder addAllDdl(java.lang.Iterable values) { + ensureDdlIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ddl_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. DDL statements to add new indexes that will improve the query.
+       * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDdl() { + ddl_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. DDL statements to add new indexes that will improve the query.
+       * 
+ * + * repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the ddl to add. + * @return This builder for chaining. + */ + public Builder addDdlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDdlIsMutable(); + ddl_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private double improvementFactor_; + + /** + * + * + *
+       * Optional. Estimated latency improvement factor. For example if the query
+       * currently takes 500 ms to run and the estimated latency with new indexes
+       * is 100 ms this field will be 5.
+       * 
+ * + * double improvement_factor = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The improvementFactor. + */ + @java.lang.Override + public double getImprovementFactor() { + return improvementFactor_; + } + + /** + * + * + *
+       * Optional. Estimated latency improvement factor. For example if the query
+       * currently takes 500 ms to run and the estimated latency with new indexes
+       * is 100 ms this field will be 5.
+       * 
+ * + * double improvement_factor = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The improvementFactor to set. + * @return This builder for chaining. + */ + public Builder setImprovementFactor(double value) { + + improvementFactor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Estimated latency improvement factor. For example if the query
+       * currently takes 500 ms to run and the estimated latency with new indexes
+       * is 100 ms this field will be 5.
+       * 
+ * + * double improvement_factor = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearImprovementFactor() { + bitField0_ = (bitField0_ & ~0x00000002); + improvementFactor_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.QueryAdvisorResult.IndexAdvice) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.QueryAdvisorResult.IndexAdvice) + private static final com.google.spanner.v1.QueryAdvisorResult.IndexAdvice DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.QueryAdvisorResult.IndexAdvice(); + } + + public static com.google.spanner.v1.QueryAdvisorResult.IndexAdvice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexAdvice parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult.IndexAdvice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int INDEX_ADVICE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List indexAdvice_; + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getIndexAdviceList() { + return indexAdvice_; + } + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getIndexAdviceOrBuilderList() { + return indexAdvice_; + } + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getIndexAdviceCount() { + return indexAdvice_.size(); + } + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult.IndexAdvice getIndexAdvice(int index) { + return indexAdvice_.get(index); + } + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult.IndexAdviceOrBuilder getIndexAdviceOrBuilder( + int index) { + return indexAdvice_.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 < indexAdvice_.size(); i++) { + output.writeMessage(1, indexAdvice_.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 < indexAdvice_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, indexAdvice_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.QueryAdvisorResult)) { + return super.equals(obj); + } + com.google.spanner.v1.QueryAdvisorResult other = (com.google.spanner.v1.QueryAdvisorResult) obj; + + if (!getIndexAdviceList().equals(other.getIndexAdviceList())) 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 (getIndexAdviceCount() > 0) { + hash = (37 * hash) + INDEX_ADVICE_FIELD_NUMBER; + hash = (53 * hash) + getIndexAdviceList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.QueryAdvisorResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.QueryAdvisorResult 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Output of query advisor analysis.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.QueryAdvisorResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.QueryAdvisorResult) + com.google.spanner.v1.QueryAdvisorResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.QueryAdvisorResult.class, + com.google.spanner.v1.QueryAdvisorResult.Builder.class); + } + + // Construct using com.google.spanner.v1.QueryAdvisorResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (indexAdviceBuilder_ == null) { + indexAdvice_ = java.util.Collections.emptyList(); + } else { + indexAdvice_ = null; + indexAdviceBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.QueryPlanProto + .internal_static_google_spanner_v1_QueryAdvisorResult_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult getDefaultInstanceForType() { + return com.google.spanner.v1.QueryAdvisorResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult build() { + com.google.spanner.v1.QueryAdvisorResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult buildPartial() { + com.google.spanner.v1.QueryAdvisorResult result = + new com.google.spanner.v1.QueryAdvisorResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.v1.QueryAdvisorResult result) { + if (indexAdviceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + indexAdvice_ = java.util.Collections.unmodifiableList(indexAdvice_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.indexAdvice_ = indexAdvice_; + } else { + result.indexAdvice_ = indexAdviceBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.v1.QueryAdvisorResult result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.QueryAdvisorResult) { + return mergeFrom((com.google.spanner.v1.QueryAdvisorResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.QueryAdvisorResult other) { + if (other == com.google.spanner.v1.QueryAdvisorResult.getDefaultInstance()) return this; + if (indexAdviceBuilder_ == null) { + if (!other.indexAdvice_.isEmpty()) { + if (indexAdvice_.isEmpty()) { + indexAdvice_ = other.indexAdvice_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIndexAdviceIsMutable(); + indexAdvice_.addAll(other.indexAdvice_); + } + onChanged(); + } + } else { + if (!other.indexAdvice_.isEmpty()) { + if (indexAdviceBuilder_.isEmpty()) { + indexAdviceBuilder_.dispose(); + indexAdviceBuilder_ = null; + indexAdvice_ = other.indexAdvice_; + bitField0_ = (bitField0_ & ~0x00000001); + indexAdviceBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetIndexAdviceFieldBuilder() + : null; + } else { + indexAdviceBuilder_.addAllMessages(other.indexAdvice_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice m = + input.readMessage( + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.parser(), + extensionRegistry); + if (indexAdviceBuilder_ == null) { + ensureIndexAdviceIsMutable(); + indexAdvice_.add(m); + } else { + indexAdviceBuilder_.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 indexAdvice_ = + java.util.Collections.emptyList(); + + private void ensureIndexAdviceIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + indexAdvice_ = + new java.util.ArrayList( + indexAdvice_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice, + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder, + com.google.spanner.v1.QueryAdvisorResult.IndexAdviceOrBuilder> + indexAdviceBuilder_; + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getIndexAdviceList() { + if (indexAdviceBuilder_ == null) { + return java.util.Collections.unmodifiableList(indexAdvice_); + } else { + return indexAdviceBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getIndexAdviceCount() { + if (indexAdviceBuilder_ == null) { + return indexAdvice_.size(); + } else { + return indexAdviceBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.QueryAdvisorResult.IndexAdvice getIndexAdvice(int index) { + if (indexAdviceBuilder_ == null) { + return indexAdvice_.get(index); + } else { + return indexAdviceBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIndexAdvice( + int index, com.google.spanner.v1.QueryAdvisorResult.IndexAdvice value) { + if (indexAdviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexAdviceIsMutable(); + indexAdvice_.set(index, value); + onChanged(); + } else { + indexAdviceBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIndexAdvice( + int index, com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder builderForValue) { + if (indexAdviceBuilder_ == null) { + ensureIndexAdviceIsMutable(); + indexAdvice_.set(index, builderForValue.build()); + onChanged(); + } else { + indexAdviceBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIndexAdvice(com.google.spanner.v1.QueryAdvisorResult.IndexAdvice value) { + if (indexAdviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexAdviceIsMutable(); + indexAdvice_.add(value); + onChanged(); + } else { + indexAdviceBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIndexAdvice( + int index, com.google.spanner.v1.QueryAdvisorResult.IndexAdvice value) { + if (indexAdviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexAdviceIsMutable(); + indexAdvice_.add(index, value); + onChanged(); + } else { + indexAdviceBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIndexAdvice( + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder builderForValue) { + if (indexAdviceBuilder_ == null) { + ensureIndexAdviceIsMutable(); + indexAdvice_.add(builderForValue.build()); + onChanged(); + } else { + indexAdviceBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIndexAdvice( + int index, com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder builderForValue) { + if (indexAdviceBuilder_ == null) { + ensureIndexAdviceIsMutable(); + indexAdvice_.add(index, builderForValue.build()); + onChanged(); + } else { + indexAdviceBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllIndexAdvice( + java.lang.Iterable values) { + if (indexAdviceBuilder_ == null) { + ensureIndexAdviceIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexAdvice_); + onChanged(); + } else { + indexAdviceBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIndexAdvice() { + if (indexAdviceBuilder_ == null) { + indexAdvice_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + indexAdviceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeIndexAdvice(int index) { + if (indexAdviceBuilder_ == null) { + ensureIndexAdviceIsMutable(); + indexAdvice_.remove(index); + onChanged(); + } else { + indexAdviceBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder getIndexAdviceBuilder( + int index) { + return internalGetIndexAdviceFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.QueryAdvisorResult.IndexAdviceOrBuilder getIndexAdviceOrBuilder( + int index) { + if (indexAdviceBuilder_ == null) { + return indexAdvice_.get(index); + } else { + return indexAdviceBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getIndexAdviceOrBuilderList() { + if (indexAdviceBuilder_ != null) { + return indexAdviceBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(indexAdvice_); + } + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder addIndexAdviceBuilder() { + return internalGetIndexAdviceFieldBuilder() + .addBuilder(com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder addIndexAdviceBuilder( + int index) { + return internalGetIndexAdviceFieldBuilder() + .addBuilder( + index, com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Index Recommendation for a query. This is an optional field and
+     * the recommendation will only be available when the recommendation
+     * guarantees significant improvement in query performance.
+     * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getIndexAdviceBuilderList() { + return internalGetIndexAdviceFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice, + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder, + com.google.spanner.v1.QueryAdvisorResult.IndexAdviceOrBuilder> + internalGetIndexAdviceFieldBuilder() { + if (indexAdviceBuilder_ == null) { + indexAdviceBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice, + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice.Builder, + com.google.spanner.v1.QueryAdvisorResult.IndexAdviceOrBuilder>( + indexAdvice_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + indexAdvice_ = null; + } + return indexAdviceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.QueryAdvisorResult) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.QueryAdvisorResult) + private static final com.google.spanner.v1.QueryAdvisorResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.QueryAdvisorResult(); + } + + public static com.google.spanner.v1.QueryAdvisorResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryAdvisorResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryAdvisorResultOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryAdvisorResultOrBuilder.java new file mode 100644 index 00000000000..8d46964cf30 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryAdvisorResultOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/query_plan.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +@com.google.protobuf.Generated +public interface QueryAdvisorResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.QueryAdvisorResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getIndexAdviceList(); + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.QueryAdvisorResult.IndexAdvice getIndexAdvice(int index); + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getIndexAdviceCount(); + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getIndexAdviceOrBuilderList(); + + /** + * + * + *
+   * Optional. Index Recommendation for a query. This is an optional field and
+   * the recommendation will only be available when the recommendation
+   * guarantees significant improvement in query performance.
+   * 
+ * + * + * repeated .google.spanner.v1.QueryAdvisorResult.IndexAdvice index_advice = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.QueryAdvisorResult.IndexAdviceOrBuilder getIndexAdviceOrBuilder(int index); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlan.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlan.java index 30f4a95bf4e..789c2f58e73 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlan.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlan.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/query_plan.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.QueryPlan} */ -public final class QueryPlan extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class QueryPlan extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.QueryPlan) QueryPlanOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryPlan"); + } + // Use QueryPlan.newBuilder() to construct. - private QueryPlan(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private QueryPlan(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private QueryPlan() { planNodes_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryPlan(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_QueryPlan_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_QueryPlan_fieldAccessorTable @@ -63,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.spanner.v1.QueryPlan.class, com.google.spanner.v1.QueryPlan.Builder.class); } + private int bitField0_; public static final int PLAN_NODES_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -149,6 +156,68 @@ public com.google.spanner.v1.PlanNodeOrBuilder getPlanNodesOrBuilder(int index) return planNodes_.get(index); } + public static final int QUERY_ADVICE_FIELD_NUMBER = 2; + private com.google.spanner.v1.QueryAdvisorResult queryAdvice_; + + /** + * + * + *
+   * Optional. The advise/recommendations for a query. Currently this field will
+   * be serving index recommendations for a query.
+   * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the queryAdvice field is set. + */ + @java.lang.Override + public boolean hasQueryAdvice() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The advise/recommendations for a query. Currently this field will
+   * be serving index recommendations for a query.
+   * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The queryAdvice. + */ + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResult getQueryAdvice() { + return queryAdvice_ == null + ? com.google.spanner.v1.QueryAdvisorResult.getDefaultInstance() + : queryAdvice_; + } + + /** + * + * + *
+   * Optional. The advise/recommendations for a query. Currently this field will
+   * be serving index recommendations for a query.
+   * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.QueryAdvisorResultOrBuilder getQueryAdviceOrBuilder() { + return queryAdvice_ == null + ? com.google.spanner.v1.QueryAdvisorResult.getDefaultInstance() + : queryAdvice_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -166,6 +235,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < planNodes_.size(); i++) { output.writeMessage(1, planNodes_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getQueryAdvice()); + } getUnknownFields().writeTo(output); } @@ -178,6 +250,9 @@ public int getSerializedSize() { for (int i = 0; i < planNodes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, planNodes_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQueryAdvice()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -194,6 +269,10 @@ public boolean equals(final java.lang.Object obj) { com.google.spanner.v1.QueryPlan other = (com.google.spanner.v1.QueryPlan) obj; if (!getPlanNodesList().equals(other.getPlanNodesList())) return false; + if (hasQueryAdvice() != other.hasQueryAdvice()) return false; + if (hasQueryAdvice()) { + if (!getQueryAdvice().equals(other.getQueryAdvice())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -209,6 +288,10 @@ public int hashCode() { hash = (37 * hash) + PLAN_NODES_FIELD_NUMBER; hash = (53 * hash) + getPlanNodesList().hashCode(); } + if (hasQueryAdvice()) { + hash = (37 * hash) + QUERY_ADVICE_FIELD_NUMBER; + hash = (53 * hash) + getQueryAdvice().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -250,38 +333,38 @@ public static com.google.spanner.v1.QueryPlan parseFrom( public static com.google.spanner.v1.QueryPlan parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.QueryPlan parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.QueryPlan parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.QueryPlan parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.QueryPlan parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.QueryPlan parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -304,7 +387,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -318,7 +401,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.QueryPlan} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.QueryPlan) com.google.spanner.v1.QueryPlanOrBuilder { @@ -328,7 +411,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.QueryPlanProto .internal_static_google_spanner_v1_QueryPlan_fieldAccessorTable @@ -337,10 +420,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.spanner.v1.QueryPlan.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPlanNodesFieldBuilder(); + internalGetQueryAdviceFieldBuilder(); + } } @java.lang.Override @@ -354,6 +447,11 @@ public Builder clear() { planNodesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); + queryAdvice_ = null; + if (queryAdviceBuilder_ != null) { + queryAdviceBuilder_.dispose(); + queryAdviceBuilder_ = null; + } return this; } @@ -402,39 +500,13 @@ private void buildPartialRepeatedFields(com.google.spanner.v1.QueryPlan result) private void buildPartial0(com.google.spanner.v1.QueryPlan 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); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.queryAdvice_ = + queryAdviceBuilder_ == null ? queryAdvice_ : queryAdviceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -468,14 +540,17 @@ public Builder mergeFrom(com.google.spanner.v1.QueryPlan other) { planNodes_ = other.planNodes_; bitField0_ = (bitField0_ & ~0x00000001); planNodesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPlanNodesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPlanNodesFieldBuilder() : null; } else { planNodesBuilder_.addAllMessages(other.planNodes_); } } } + if (other.hasQueryAdvice()) { + mergeQueryAdvice(other.getQueryAdvice()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -514,6 +589,13 @@ public Builder mergeFrom( } break; } // case 10 + case 18: + { + input.readMessage( + internalGetQueryAdviceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -543,7 +625,7 @@ private void ensurePlanNodesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.PlanNode, com.google.spanner.v1.PlanNode.Builder, com.google.spanner.v1.PlanNodeOrBuilder> @@ -826,7 +908,7 @@ public Builder removePlanNodes(int index) { * repeated .google.spanner.v1.PlanNode plan_nodes = 1; */ public com.google.spanner.v1.PlanNode.Builder getPlanNodesBuilder(int index) { - return getPlanNodesFieldBuilder().getBuilder(index); + return internalGetPlanNodesFieldBuilder().getBuilder(index); } /** @@ -880,7 +962,7 @@ public com.google.spanner.v1.PlanNodeOrBuilder getPlanNodesOrBuilder(int index) * repeated .google.spanner.v1.PlanNode plan_nodes = 1; */ public com.google.spanner.v1.PlanNode.Builder addPlanNodesBuilder() { - return getPlanNodesFieldBuilder() + return internalGetPlanNodesFieldBuilder() .addBuilder(com.google.spanner.v1.PlanNode.getDefaultInstance()); } @@ -896,7 +978,7 @@ public com.google.spanner.v1.PlanNode.Builder addPlanNodesBuilder() { * repeated .google.spanner.v1.PlanNode plan_nodes = 1; */ public com.google.spanner.v1.PlanNode.Builder addPlanNodesBuilder(int index) { - return getPlanNodesFieldBuilder() + return internalGetPlanNodesFieldBuilder() .addBuilder(index, com.google.spanner.v1.PlanNode.getDefaultInstance()); } @@ -912,17 +994,17 @@ public com.google.spanner.v1.PlanNode.Builder addPlanNodesBuilder(int index) { * repeated .google.spanner.v1.PlanNode plan_nodes = 1; */ public java.util.List getPlanNodesBuilderList() { - return getPlanNodesFieldBuilder().getBuilderList(); + return internalGetPlanNodesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.PlanNode, com.google.spanner.v1.PlanNode.Builder, com.google.spanner.v1.PlanNodeOrBuilder> - getPlanNodesFieldBuilder() { + internalGetPlanNodesFieldBuilder() { if (planNodesBuilder_ == null) { planNodesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.spanner.v1.PlanNode, com.google.spanner.v1.PlanNode.Builder, com.google.spanner.v1.PlanNodeOrBuilder>( @@ -932,15 +1014,226 @@ public java.util.List getPlanNodesBuilde return planNodesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.QueryAdvisorResult queryAdvice_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.QueryAdvisorResult, + com.google.spanner.v1.QueryAdvisorResult.Builder, + com.google.spanner.v1.QueryAdvisorResultOrBuilder> + queryAdviceBuilder_; + + /** + * + * + *
+     * Optional. The advise/recommendations for a query. Currently this field will
+     * be serving index recommendations for a query.
+     * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the queryAdvice field is set. + */ + public boolean hasQueryAdvice() { + return ((bitField0_ & 0x00000002) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. The advise/recommendations for a query. Currently this field will
+     * be serving index recommendations for a query.
+     * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The queryAdvice. + */ + public com.google.spanner.v1.QueryAdvisorResult getQueryAdvice() { + if (queryAdviceBuilder_ == null) { + return queryAdvice_ == null + ? com.google.spanner.v1.QueryAdvisorResult.getDefaultInstance() + : queryAdvice_; + } else { + return queryAdviceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The advise/recommendations for a query. Currently this field will
+     * be serving index recommendations for a query.
+     * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setQueryAdvice(com.google.spanner.v1.QueryAdvisorResult value) { + if (queryAdviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryAdvice_ = value; + } else { + queryAdviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The advise/recommendations for a query. Currently this field will
+     * be serving index recommendations for a query.
+     * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setQueryAdvice( + com.google.spanner.v1.QueryAdvisorResult.Builder builderForValue) { + if (queryAdviceBuilder_ == null) { + queryAdvice_ = builderForValue.build(); + } else { + queryAdviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The advise/recommendations for a query. Currently this field will
+     * be serving index recommendations for a query.
+     * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeQueryAdvice(com.google.spanner.v1.QueryAdvisorResult value) { + if (queryAdviceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && queryAdvice_ != null + && queryAdvice_ != com.google.spanner.v1.QueryAdvisorResult.getDefaultInstance()) { + getQueryAdviceBuilder().mergeFrom(value); + } else { + queryAdvice_ = value; + } + } else { + queryAdviceBuilder_.mergeFrom(value); + } + if (queryAdvice_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The advise/recommendations for a query. Currently this field will
+     * be serving index recommendations for a query.
+     * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearQueryAdvice() { + bitField0_ = (bitField0_ & ~0x00000002); + queryAdvice_ = null; + if (queryAdviceBuilder_ != null) { + queryAdviceBuilder_.dispose(); + queryAdviceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The advise/recommendations for a query. Currently this field will
+     * be serving index recommendations for a query.
+     * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.QueryAdvisorResult.Builder getQueryAdviceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetQueryAdviceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The advise/recommendations for a query. Currently this field will
+     * be serving index recommendations for a query.
+     * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.QueryAdvisorResultOrBuilder getQueryAdviceOrBuilder() { + if (queryAdviceBuilder_ != null) { + return queryAdviceBuilder_.getMessageOrBuilder(); + } else { + return queryAdvice_ == null + ? com.google.spanner.v1.QueryAdvisorResult.getDefaultInstance() + : queryAdvice_; + } + } + + /** + * + * + *
+     * Optional. The advise/recommendations for a query. Currently this field will
+     * be serving index recommendations for a query.
+     * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.QueryAdvisorResult, + com.google.spanner.v1.QueryAdvisorResult.Builder, + com.google.spanner.v1.QueryAdvisorResultOrBuilder> + internalGetQueryAdviceFieldBuilder() { + if (queryAdviceBuilder_ == null) { + queryAdviceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.QueryAdvisorResult, + com.google.spanner.v1.QueryAdvisorResult.Builder, + com.google.spanner.v1.QueryAdvisorResultOrBuilder>( + getQueryAdvice(), getParentForChildren(), isClean()); + queryAdvice_ = null; + } + return queryAdviceBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.QueryPlan) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanOrBuilder.java index 7b09d935bbb..39bf2ec6dfe 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/query_plan.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface QueryPlanOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.QueryPlan) @@ -88,4 +90,50 @@ public interface QueryPlanOrBuilder * repeated .google.spanner.v1.PlanNode plan_nodes = 1; */ com.google.spanner.v1.PlanNodeOrBuilder getPlanNodesOrBuilder(int index); + + /** + * + * + *
+   * Optional. The advise/recommendations for a query. Currently this field will
+   * be serving index recommendations for a query.
+   * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the queryAdvice field is set. + */ + boolean hasQueryAdvice(); + + /** + * + * + *
+   * Optional. The advise/recommendations for a query. Currently this field will
+   * be serving index recommendations for a query.
+   * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The queryAdvice. + */ + com.google.spanner.v1.QueryAdvisorResult getQueryAdvice(); + + /** + * + * + *
+   * Optional. The advise/recommendations for a query. Currently this field will
+   * be serving index recommendations for a query.
+   * 
+ * + * + * .google.spanner.v1.QueryAdvisorResult query_advice = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.QueryAdvisorResultOrBuilder getQueryAdviceOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java index e252525aec6..e5b42e99007 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/QueryPlanProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/query_plan.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; -public final class QueryPlanProto { +@com.google.protobuf.Generated +public final class QueryPlanProto extends com.google.protobuf.GeneratedFile { private QueryPlanProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryPlanProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,23 +42,31 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_PlanNode_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_PlanNode_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_PlanNode_ChildLink_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_PlanNode_ChildLink_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_PlanNode_ShortRepresentation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_PlanNode_ShortRepresentation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_PlanNode_ShortRepresentation_SubqueriesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_PlanNode_ShortRepresentation_SubqueriesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_QueryAdvisorResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_QueryAdvisorResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_QueryPlan_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_QueryPlan_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -59,14 +79,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n" + "\"google/spanner/v1/query_plan.proto\022\021go" - + "ogle.spanner.v1\032\034google/protobuf/struct.proto\"\370\004\n" + + "ogle.spanner.v1\032\037google/api/field_behavi" + + "or.proto\032\034google/protobuf/struct.proto\"\370\004\n" + "\010PlanNode\022\r\n" + "\005index\030\001 \001(\005\022.\n" + "\004kind\030\002 \001(\0162 .google.spanner.v1.PlanNode.Kind\022\024\n" + "\014display_name\030\003 \001(\t\022:\n" + "\013child_links\030\004 \003(\0132%.google.spanner.v1.PlanNode.ChildLink\022M\n" - + "\024short_representation\030\005 \001(\0132/.goog" - + "le.spanner.v1.PlanNode.ShortRepresentation\022)\n" + + "\024short_representation\030\005" + + " \001(\0132/.google.spanner.v1.PlanNode.ShortRepresentation\022)\n" + "\010metadata\030\006 \001(\0132\027.google.protobuf.Struct\0220\n" + "\017execution_stats\030\007 \001(\0132\027.google.protobuf.Struct\032@\n" + "\tChildLink\022\023\n" @@ -75,32 +96,40 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010variable\030\003 \001(\t\032\262\001\n" + "\023ShortRepresentation\022\023\n" + "\013description\030\001 \001(\t\022S\n\n" - + "subqueries\030\002 \003(\0132?.google.span" - + "ner.v1.PlanNode.ShortRepresentation.SubqueriesEntry\0321\n" + + "subqueries\030\002 \003(\0132?.google.spanner.v1." + + "PlanNode.ShortRepresentation.SubqueriesEntry\0321\n" + "\017SubqueriesEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\005:\0028\001\"8\n" + "\004Kind\022\024\n" + "\020KIND_UNSPECIFIED\020\000\022\016\n\n" + "RELATIONAL\020\001\022\n\n" - + "\006SCALAR\020\002\"<\n" + + "\006SCALAR\020\002\"\244\001\n" + + "\022QueryAdvisorResult\022L\n" + + "\014index_advice\030\001 \003(\01321" + + ".google.spanner.v1.QueryAdvisorResult.IndexAdviceB\003\340A\001\032@\n" + + "\013IndexAdvice\022\020\n" + + "\003ddl\030\001 \003(\tB\003\340A\001\022\037\n" + + "\022improvement_factor\030\002 \001(\001B\003\340A\001\"~\n" + "\tQueryPlan\022/\n\n" - + "plan_nodes\030\001 \003(\0132\033.google.spanner.v1.PlanNodeB\261\001\n" - + "\025com.google.spanner.v1B\016QueryPlanProtoP\001Z5cloud.google" - + ".com/go/spanner/apiv1/spannerpb;spannerp" - + "b\252\002\027Google.Cloud.Spanner.V1\312\002\027Google\\Clo" - + "ud\\Spanner\\V1\352\002\032Google::Cloud::Spanner::V1b\006proto3" + + "plan_nodes\030\001 \003(\0132\033.google.spanner.v1.PlanNode\022@\n" + + "\014query_advice\030\002" + + " \001(\0132%.google.spanner.v1.QueryAdvisorResultB\003\340A\001B\261\001\n" + + "\025com.google.spanner.v1B\016QueryPlanProtoP\001Z5cloud.google.com/go/spanne" + + "r/apiv1/spannerpb;spannerpb\252\002\027Google.Clo" + + "ud.Spanner.V1\312\002\027Google\\Cloud\\Spanner\\V1\352" + + "\002\032Google::Cloud::Spanner::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); - internal_static_google_spanner_v1_PlanNode_descriptor = - getDescriptor().getMessageTypes().get(0); + internal_static_google_spanner_v1_PlanNode_descriptor = getDescriptor().getMessageType(0); internal_static_google_spanner_v1_PlanNode_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_PlanNode_descriptor, new java.lang.String[] { "Index", @@ -112,40 +141,60 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExecutionStats", }); internal_static_google_spanner_v1_PlanNode_ChildLink_descriptor = - internal_static_google_spanner_v1_PlanNode_descriptor.getNestedTypes().get(0); + internal_static_google_spanner_v1_PlanNode_descriptor.getNestedType(0); internal_static_google_spanner_v1_PlanNode_ChildLink_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_PlanNode_ChildLink_descriptor, new java.lang.String[] { "ChildIndex", "Type", "Variable", }); internal_static_google_spanner_v1_PlanNode_ShortRepresentation_descriptor = - internal_static_google_spanner_v1_PlanNode_descriptor.getNestedTypes().get(1); + internal_static_google_spanner_v1_PlanNode_descriptor.getNestedType(1); internal_static_google_spanner_v1_PlanNode_ShortRepresentation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_PlanNode_ShortRepresentation_descriptor, new java.lang.String[] { "Description", "Subqueries", }); internal_static_google_spanner_v1_PlanNode_ShortRepresentation_SubqueriesEntry_descriptor = - internal_static_google_spanner_v1_PlanNode_ShortRepresentation_descriptor - .getNestedTypes() - .get(0); + internal_static_google_spanner_v1_PlanNode_ShortRepresentation_descriptor.getNestedType(0); internal_static_google_spanner_v1_PlanNode_ShortRepresentation_SubqueriesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_PlanNode_ShortRepresentation_SubqueriesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); - internal_static_google_spanner_v1_QueryPlan_descriptor = - getDescriptor().getMessageTypes().get(1); + internal_static_google_spanner_v1_QueryAdvisorResult_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_spanner_v1_QueryAdvisorResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_QueryAdvisorResult_descriptor, + new java.lang.String[] { + "IndexAdvice", + }); + internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_descriptor = + internal_static_google_spanner_v1_QueryAdvisorResult_descriptor.getNestedType(0); + internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_spanner_v1_QueryAdvisorResult_IndexAdvice_descriptor, + new java.lang.String[] { + "Ddl", "ImprovementFactor", + }); + internal_static_google_spanner_v1_QueryPlan_descriptor = getDescriptor().getMessageType(2); internal_static_google_spanner_v1_QueryPlan_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_QueryPlan_descriptor, new java.lang.String[] { - "PlanNodes", + "PlanNodes", "QueryAdvice", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Range.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Range.java new file mode 100644 index 00000000000..e01efe1b227 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Range.java @@ -0,0 +1,944 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +/** + * + * + *
+ * A `Range` represents a range of keys in a database. The keys themselves
+ * are encoded in "sortable string format", also known as ssformat. Consult
+ * Spanner's open source client libraries for details on the encoding.
+ *
+ * Each range represents a contiguous range of rows, possibly from multiple
+ * tables/indexes. Each range is associated with a single paxos group (known as
+ * a "group" throughout this API), a split (which names the exact range within
+ * the group), and a generation that can be used to determine whether a given
+ * `Range` represents a newer or older location for the key range.
+ * 
+ * + * Protobuf type {@code google.spanner.v1.Range} + */ +@com.google.protobuf.Generated +public final class Range extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.Range) + RangeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Range"); + } + + // Use Range.newBuilder() to construct. + private Range(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Range() { + startKey_ = com.google.protobuf.ByteString.EMPTY; + limitKey_ = com.google.protobuf.ByteString.EMPTY; + generation_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto.internal_static_google_spanner_v1_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Range.class, com.google.spanner.v1.Range.Builder.class); + } + + public static final int START_KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString startKey_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * The start key of the range, inclusive. Encoded in "sortable string format"
+   * (ssformat).
+   * 
+ * + * bytes start_key = 1; + * + * @return The startKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStartKey() { + return startKey_; + } + + public static final int LIMIT_KEY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString limitKey_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * The limit key of the range, exclusive. Encoded in "sortable string format"
+   * (ssformat).
+   * 
+ * + * bytes limit_key = 2; + * + * @return The limitKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLimitKey() { + return limitKey_; + } + + public static final int GROUP_UID_FIELD_NUMBER = 3; + private long groupUid_ = 0L; + + /** + * + * + *
+   * The UID of the paxos group where this range is stored. UIDs are unique
+   * within the database. References `Group.group_uid`.
+   * 
+ * + * uint64 group_uid = 3; + * + * @return The groupUid. + */ + @java.lang.Override + public long getGroupUid() { + return groupUid_; + } + + public static final int SPLIT_ID_FIELD_NUMBER = 4; + private long splitId_ = 0L; + + /** + * + * + *
+   * A group can store multiple ranges of keys. Each key range is named by an
+   * ID (the split ID). Within a group, split IDs are unique. The `split_id`
+   * names the exact split in `group_uid` where this range is stored.
+   * 
+ * + * uint64 split_id = 4; + * + * @return The splitId. + */ + @java.lang.Override + public long getSplitId() { + return splitId_; + } + + public static final int GENERATION_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString generation_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * `generation` indicates the freshness of the range information contained
+   * in this proto. Generations can be compared lexicographically; if generation
+   * A is greater than generation B, then the `Range` corresponding to A is
+   * newer than the `Range` corresponding to B, and should be used
+   * preferentially.
+   * 
+ * + * bytes generation = 5; + * + * @return The generation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGeneration() { + return generation_; + } + + 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 (!startKey_.isEmpty()) { + output.writeBytes(1, startKey_); + } + if (!limitKey_.isEmpty()) { + output.writeBytes(2, limitKey_); + } + if (groupUid_ != 0L) { + output.writeUInt64(3, groupUid_); + } + if (splitId_ != 0L) { + output.writeUInt64(4, splitId_); + } + if (!generation_.isEmpty()) { + output.writeBytes(5, generation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!startKey_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, startKey_); + } + if (!limitKey_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, limitKey_); + } + if (groupUid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3, groupUid_); + } + if (splitId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(4, splitId_); + } + if (!generation_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, generation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.Range)) { + return super.equals(obj); + } + com.google.spanner.v1.Range other = (com.google.spanner.v1.Range) obj; + + if (!getStartKey().equals(other.getStartKey())) return false; + if (!getLimitKey().equals(other.getLimitKey())) return false; + if (getGroupUid() != other.getGroupUid()) return false; + if (getSplitId() != other.getSplitId()) return false; + if (!getGeneration().equals(other.getGeneration())) 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) + START_KEY_FIELD_NUMBER; + hash = (53 * hash) + getStartKey().hashCode(); + hash = (37 * hash) + LIMIT_KEY_FIELD_NUMBER; + hash = (53 * hash) + getLimitKey().hashCode(); + hash = (37 * hash) + GROUP_UID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGroupUid()); + hash = (37 * hash) + SPLIT_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSplitId()); + hash = (37 * hash) + GENERATION_FIELD_NUMBER; + hash = (53 * hash) + getGeneration().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.Range parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Range parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Range parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Range parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Range parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Range parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Range parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Range parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Range parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Range parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Range parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Range parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.Range 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A `Range` represents a range of keys in a database. The keys themselves
+   * are encoded in "sortable string format", also known as ssformat. Consult
+   * Spanner's open source client libraries for details on the encoding.
+   *
+   * Each range represents a contiguous range of rows, possibly from multiple
+   * tables/indexes. Each range is associated with a single paxos group (known as
+   * a "group" throughout this API), a split (which names the exact range within
+   * the group), and a generation that can be used to determine whether a given
+   * `Range` represents a newer or older location for the key range.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.Range} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.Range) + com.google.spanner.v1.RangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto.internal_static_google_spanner_v1_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Range.class, com.google.spanner.v1.Range.Builder.class); + } + + // Construct using com.google.spanner.v1.Range.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startKey_ = com.google.protobuf.ByteString.EMPTY; + limitKey_ = com.google.protobuf.ByteString.EMPTY; + groupUid_ = 0L; + splitId_ = 0L; + generation_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.LocationProto.internal_static_google_spanner_v1_Range_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.Range getDefaultInstanceForType() { + return com.google.spanner.v1.Range.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.Range build() { + com.google.spanner.v1.Range result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.Range buildPartial() { + com.google.spanner.v1.Range result = new com.google.spanner.v1.Range(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.v1.Range result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startKey_ = startKey_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.limitKey_ = limitKey_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.groupUid_ = groupUid_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.splitId_ = splitId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.generation_ = generation_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.Range) { + return mergeFrom((com.google.spanner.v1.Range) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.Range other) { + if (other == com.google.spanner.v1.Range.getDefaultInstance()) return this; + if (!other.getStartKey().isEmpty()) { + setStartKey(other.getStartKey()); + } + if (!other.getLimitKey().isEmpty()) { + setLimitKey(other.getLimitKey()); + } + if (other.getGroupUid() != 0L) { + setGroupUid(other.getGroupUid()); + } + if (other.getSplitId() != 0L) { + setSplitId(other.getSplitId()); + } + if (!other.getGeneration().isEmpty()) { + setGeneration(other.getGeneration()); + } + 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: + { + startKey_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + limitKey_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + groupUid_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + splitId_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + generation_ = input.readBytes(); + 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.protobuf.ByteString startKey_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * The start key of the range, inclusive. Encoded in "sortable string format"
+     * (ssformat).
+     * 
+ * + * bytes start_key = 1; + * + * @return The startKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStartKey() { + return startKey_; + } + + /** + * + * + *
+     * The start key of the range, inclusive. Encoded in "sortable string format"
+     * (ssformat).
+     * 
+ * + * bytes start_key = 1; + * + * @param value The startKey to set. + * @return This builder for chaining. + */ + public Builder setStartKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + startKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The start key of the range, inclusive. Encoded in "sortable string format"
+     * (ssformat).
+     * 
+ * + * bytes start_key = 1; + * + * @return This builder for chaining. + */ + public Builder clearStartKey() { + bitField0_ = (bitField0_ & ~0x00000001); + startKey_ = getDefaultInstance().getStartKey(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString limitKey_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * The limit key of the range, exclusive. Encoded in "sortable string format"
+     * (ssformat).
+     * 
+ * + * bytes limit_key = 2; + * + * @return The limitKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLimitKey() { + return limitKey_; + } + + /** + * + * + *
+     * The limit key of the range, exclusive. Encoded in "sortable string format"
+     * (ssformat).
+     * 
+ * + * bytes limit_key = 2; + * + * @param value The limitKey to set. + * @return This builder for chaining. + */ + public Builder setLimitKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + limitKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The limit key of the range, exclusive. Encoded in "sortable string format"
+     * (ssformat).
+     * 
+ * + * bytes limit_key = 2; + * + * @return This builder for chaining. + */ + public Builder clearLimitKey() { + bitField0_ = (bitField0_ & ~0x00000002); + limitKey_ = getDefaultInstance().getLimitKey(); + onChanged(); + return this; + } + + private long groupUid_; + + /** + * + * + *
+     * The UID of the paxos group where this range is stored. UIDs are unique
+     * within the database. References `Group.group_uid`.
+     * 
+ * + * uint64 group_uid = 3; + * + * @return The groupUid. + */ + @java.lang.Override + public long getGroupUid() { + return groupUid_; + } + + /** + * + * + *
+     * The UID of the paxos group where this range is stored. UIDs are unique
+     * within the database. References `Group.group_uid`.
+     * 
+ * + * uint64 group_uid = 3; + * + * @param value The groupUid to set. + * @return This builder for chaining. + */ + public Builder setGroupUid(long value) { + + groupUid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The UID of the paxos group where this range is stored. UIDs are unique
+     * within the database. References `Group.group_uid`.
+     * 
+ * + * uint64 group_uid = 3; + * + * @return This builder for chaining. + */ + public Builder clearGroupUid() { + bitField0_ = (bitField0_ & ~0x00000004); + groupUid_ = 0L; + onChanged(); + return this; + } + + private long splitId_; + + /** + * + * + *
+     * A group can store multiple ranges of keys. Each key range is named by an
+     * ID (the split ID). Within a group, split IDs are unique. The `split_id`
+     * names the exact split in `group_uid` where this range is stored.
+     * 
+ * + * uint64 split_id = 4; + * + * @return The splitId. + */ + @java.lang.Override + public long getSplitId() { + return splitId_; + } + + /** + * + * + *
+     * A group can store multiple ranges of keys. Each key range is named by an
+     * ID (the split ID). Within a group, split IDs are unique. The `split_id`
+     * names the exact split in `group_uid` where this range is stored.
+     * 
+ * + * uint64 split_id = 4; + * + * @param value The splitId to set. + * @return This builder for chaining. + */ + public Builder setSplitId(long value) { + + splitId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * A group can store multiple ranges of keys. Each key range is named by an
+     * ID (the split ID). Within a group, split IDs are unique. The `split_id`
+     * names the exact split in `group_uid` where this range is stored.
+     * 
+ * + * uint64 split_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearSplitId() { + bitField0_ = (bitField0_ & ~0x00000008); + splitId_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString generation_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * `generation` indicates the freshness of the range information contained
+     * in this proto. Generations can be compared lexicographically; if generation
+     * A is greater than generation B, then the `Range` corresponding to A is
+     * newer than the `Range` corresponding to B, and should be used
+     * preferentially.
+     * 
+ * + * bytes generation = 5; + * + * @return The generation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGeneration() { + return generation_; + } + + /** + * + * + *
+     * `generation` indicates the freshness of the range information contained
+     * in this proto. Generations can be compared lexicographically; if generation
+     * A is greater than generation B, then the `Range` corresponding to A is
+     * newer than the `Range` corresponding to B, and should be used
+     * preferentially.
+     * 
+ * + * bytes generation = 5; + * + * @param value The generation to set. + * @return This builder for chaining. + */ + public Builder setGeneration(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + generation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * `generation` indicates the freshness of the range information contained
+     * in this proto. Generations can be compared lexicographically; if generation
+     * A is greater than generation B, then the `Range` corresponding to A is
+     * newer than the `Range` corresponding to B, and should be used
+     * preferentially.
+     * 
+ * + * bytes generation = 5; + * + * @return This builder for chaining. + */ + public Builder clearGeneration() { + bitField0_ = (bitField0_ & ~0x00000010); + generation_ = getDefaultInstance().getGeneration(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.Range) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.Range) + private static final com.google.spanner.v1.Range DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.Range(); + } + + public static com.google.spanner.v1.Range getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Range parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.Range getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RangeOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RangeOrBuilder.java new file mode 100644 index 00000000000..d4f2488803f --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RangeOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +@com.google.protobuf.Generated +public interface RangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.Range) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The start key of the range, inclusive. Encoded in "sortable string format"
+   * (ssformat).
+   * 
+ * + * bytes start_key = 1; + * + * @return The startKey. + */ + com.google.protobuf.ByteString getStartKey(); + + /** + * + * + *
+   * The limit key of the range, exclusive. Encoded in "sortable string format"
+   * (ssformat).
+   * 
+ * + * bytes limit_key = 2; + * + * @return The limitKey. + */ + com.google.protobuf.ByteString getLimitKey(); + + /** + * + * + *
+   * The UID of the paxos group where this range is stored. UIDs are unique
+   * within the database. References `Group.group_uid`.
+   * 
+ * + * uint64 group_uid = 3; + * + * @return The groupUid. + */ + long getGroupUid(); + + /** + * + * + *
+   * A group can store multiple ranges of keys. Each key range is named by an
+   * ID (the split ID). Within a group, split IDs are unique. The `split_id`
+   * names the exact split in `group_uid` where this range is stored.
+   * 
+ * + * uint64 split_id = 4; + * + * @return The splitId. + */ + long getSplitId(); + + /** + * + * + *
+   * `generation` indicates the freshness of the range information contained
+   * in this proto. Generations can be compared lexicographically; if generation
+   * A is greater than generation B, then the `Range` corresponding to A is
+   * newer than the `Range` corresponding to B, and should be used
+   * preferentially.
+   * 
+ * + * bytes generation = 5; + * + * @return The generation. + */ + com.google.protobuf.ByteString getGeneration(); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java index 2ae6e5b964a..692d4e3f994 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.ReadRequest} */ -public final class ReadRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ReadRequest) ReadRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadRequest"); + } + // Use ReadRequest.newBuilder() to construct. - private ReadRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -51,19 +63,13 @@ private ReadRequest() { lockHint_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ReadRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ReadRequest_fieldAccessorTable @@ -120,6 +126,16 @@ public enum OrderBy implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OrderBy"); + } + /** * * @@ -216,7 +232,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.ReadRequest.getDescriptor().getEnumTypes().get(0); } @@ -320,6 +336,16 @@ public enum LockHint implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LockHint"); + } + /** * * @@ -447,7 +473,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.ReadRequest.getDescriptor().getEnumTypes().get(1); } @@ -1162,6 +1188,80 @@ public com.google.spanner.v1.ReadRequest.LockHint getLockHint() { return result == null ? com.google.spanner.v1.ReadRequest.LockHint.UNRECOGNIZED : result; } + public static final int ROUTING_HINT_FIELD_NUMBER = 18; + private com.google.spanner.v1.RoutingHint routingHint_; + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + @java.lang.Override + public boolean hasRoutingHint() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHint getRoutingHint() { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder() { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1176,20 +1276,20 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getTransaction()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, table_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, index_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, index_); } for (int i = 0; i < columns_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, columns_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 5, columns_.getRaw(i)); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(6, getKeySet()); @@ -1218,6 +1318,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (lockHint_ != com.google.spanner.v1.ReadRequest.LockHint.LOCK_HINT_UNSPECIFIED.getNumber()) { output.writeEnum(17, lockHint_); } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(18, getRoutingHint()); + } getUnknownFields().writeTo(output); } @@ -1227,17 +1330,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTransaction()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, table_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, table_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, index_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(index_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, index_); } { int dataSize = 0; @@ -1275,6 +1378,9 @@ public int getSerializedSize() { if (lockHint_ != com.google.spanner.v1.ReadRequest.LockHint.LOCK_HINT_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, lockHint_); } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getRoutingHint()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1316,6 +1422,10 @@ public boolean equals(final java.lang.Object obj) { if (getDataBoostEnabled() != other.getDataBoostEnabled()) return false; if (orderBy_ != other.orderBy_) return false; if (lockHint_ != other.lockHint_) return false; + if (hasRoutingHint() != other.hasRoutingHint()) return false; + if (hasRoutingHint()) { + if (!getRoutingHint().equals(other.getRoutingHint())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1365,6 +1475,10 @@ public int hashCode() { hash = (53 * hash) + orderBy_; hash = (37 * hash) + LOCK_HINT_FIELD_NUMBER; hash = (53 * hash) + lockHint_; + if (hasRoutingHint()) { + hash = (37 * hash) + ROUTING_HINT_FIELD_NUMBER; + hash = (53 * hash) + getRoutingHint().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1406,38 +1520,38 @@ public static com.google.spanner.v1.ReadRequest parseFrom( public static com.google.spanner.v1.ReadRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ReadRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ReadRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ReadRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ReadRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ReadRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1460,7 +1574,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1475,7 +1589,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.ReadRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ReadRequest) com.google.spanner.v1.ReadRequestOrBuilder { @@ -1485,7 +1599,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_ReadRequest_fieldAccessorTable @@ -1499,17 +1613,18 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTransactionFieldBuilder(); - getKeySetFieldBuilder(); - getRequestOptionsFieldBuilder(); - getDirectedReadOptionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTransactionFieldBuilder(); + internalGetKeySetFieldBuilder(); + internalGetRequestOptionsFieldBuilder(); + internalGetDirectedReadOptionsFieldBuilder(); + internalGetRoutingHintFieldBuilder(); } } @@ -1547,6 +1662,11 @@ public Builder clear() { dataBoostEnabled_ = false; orderBy_ = 0; lockHint_ = 0; + routingHint_ = null; + if (routingHintBuilder_ != null) { + routingHintBuilder_.dispose(); + routingHintBuilder_ = null; + } return this; } @@ -1635,42 +1755,14 @@ private void buildPartial0(com.google.spanner.v1.ReadRequest result) { if (((from_bitField0_ & 0x00002000) != 0)) { result.lockHint_ = lockHint_; } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.routingHint_ = + routingHintBuilder_ == null ? routingHint_ : routingHintBuilder_.build(); + 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.v1.ReadRequest) { @@ -1717,10 +1809,10 @@ public Builder mergeFrom(com.google.spanner.v1.ReadRequest other) { if (other.getLimit() != 0L) { setLimit(other.getLimit()); } - if (other.getResumeToken() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getResumeToken().isEmpty()) { setResumeToken(other.getResumeToken()); } - if (other.getPartitionToken() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getPartitionToken().isEmpty()) { setPartitionToken(other.getPartitionToken()); } if (other.hasRequestOptions()) { @@ -1738,6 +1830,9 @@ public Builder mergeFrom(com.google.spanner.v1.ReadRequest other) { if (other.lockHint_ != 0) { setLockHintValue(other.getLockHintValue()); } + if (other.hasRoutingHint()) { + mergeRoutingHint(other.getRoutingHint()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1772,7 +1867,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTransactionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTransactionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -1797,7 +1893,7 @@ public Builder mergeFrom( } // case 42 case 50: { - input.readMessage(getKeySetFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetKeySetFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 @@ -1821,14 +1917,15 @@ public Builder mergeFrom( } // case 82 case 90: { - input.readMessage(getRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000200; break; } // case 90 case 114: { input.readMessage( - getDirectedReadOptionsFieldBuilder().getBuilder(), extensionRegistry); + internalGetDirectedReadOptionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000400; break; } // case 114 @@ -1850,6 +1947,13 @@ public Builder mergeFrom( bitField0_ |= 0x00002000; break; } // case 136 + case 146: + { + input.readMessage( + internalGetRoutingHintFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1991,7 +2095,7 @@ public Builder setSessionBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.TransactionSelector transaction_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> @@ -2144,7 +2248,7 @@ public Builder clearTransaction() { public com.google.spanner.v1.TransactionSelector.Builder getTransactionBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTransactionFieldBuilder().getBuilder(); + return internalGetTransactionFieldBuilder().getBuilder(); } /** @@ -2177,14 +2281,14 @@ public com.google.spanner.v1.TransactionSelectorOrBuilder getTransactionOrBuilde * * .google.spanner.v1.TransactionSelector transaction = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder> - getTransactionFieldBuilder() { + internalGetTransactionFieldBuilder() { if (transactionBuilder_ == null) { transactionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionSelector, com.google.spanner.v1.TransactionSelector.Builder, com.google.spanner.v1.TransactionSelectorOrBuilder>( @@ -2634,7 +2738,7 @@ public Builder addColumnsBytes(com.google.protobuf.ByteString value) { } private com.google.spanner.v1.KeySet keySet_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.KeySet, com.google.spanner.v1.KeySet.Builder, com.google.spanner.v1.KeySetOrBuilder> @@ -2882,7 +2986,7 @@ public Builder clearKeySet() { public com.google.spanner.v1.KeySet.Builder getKeySetBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getKeySetFieldBuilder().getBuilder(); + return internalGetKeySetFieldBuilder().getBuilder(); } /** @@ -2941,14 +3045,14 @@ public com.google.spanner.v1.KeySetOrBuilder getKeySetOrBuilder() { * * .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.KeySet, com.google.spanner.v1.KeySet.Builder, com.google.spanner.v1.KeySetOrBuilder> - getKeySetFieldBuilder() { + internalGetKeySetFieldBuilder() { if (keySetBuilder_ == null) { keySetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.KeySet, com.google.spanner.v1.KeySet.Builder, com.google.spanner.v1.KeySetOrBuilder>( @@ -3161,7 +3265,7 @@ public Builder clearPartitionToken() { } private com.google.spanner.v1.RequestOptions requestOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> @@ -3306,7 +3410,7 @@ public Builder clearRequestOptions() { public com.google.spanner.v1.RequestOptions.Builder getRequestOptionsBuilder() { bitField0_ |= 0x00000200; onChanged(); - return getRequestOptionsFieldBuilder().getBuilder(); + return internalGetRequestOptionsFieldBuilder().getBuilder(); } /** @@ -3337,14 +3441,14 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( * * .google.spanner.v1.RequestOptions request_options = 11; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder> - getRequestOptionsFieldBuilder() { + internalGetRequestOptionsFieldBuilder() { if (requestOptionsBuilder_ == null) { requestOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.RequestOptions, com.google.spanner.v1.RequestOptions.Builder, com.google.spanner.v1.RequestOptionsOrBuilder>( @@ -3355,7 +3459,7 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder( } private com.google.spanner.v1.DirectedReadOptions directedReadOptions_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions, com.google.spanner.v1.DirectedReadOptions.Builder, com.google.spanner.v1.DirectedReadOptionsOrBuilder> @@ -3502,7 +3606,7 @@ public Builder clearDirectedReadOptions() { public com.google.spanner.v1.DirectedReadOptions.Builder getDirectedReadOptionsBuilder() { bitField0_ |= 0x00000400; onChanged(); - return getDirectedReadOptionsFieldBuilder().getBuilder(); + return internalGetDirectedReadOptionsFieldBuilder().getBuilder(); } /** @@ -3533,14 +3637,14 @@ public com.google.spanner.v1.DirectedReadOptionsOrBuilder getDirectedReadOptions * * .google.spanner.v1.DirectedReadOptions directed_read_options = 14; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions, com.google.spanner.v1.DirectedReadOptions.Builder, com.google.spanner.v1.DirectedReadOptionsOrBuilder> - getDirectedReadOptionsFieldBuilder() { + internalGetDirectedReadOptionsFieldBuilder() { if (directedReadOptionsBuilder_ == null) { directedReadOptionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.DirectedReadOptions, com.google.spanner.v1.DirectedReadOptions.Builder, com.google.spanner.v1.DirectedReadOptionsOrBuilder>( @@ -3868,15 +3972,261 @@ public Builder clearLockHint() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.RoutingHint routingHint_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder> + routingHintBuilder_; + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + public boolean hasRoutingHint() { + return ((bitField0_ & 0x00004000) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + public com.google.spanner.v1.RoutingHint getRoutingHint() { + if (routingHintBuilder_ == null) { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } else { + return routingHintBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRoutingHint(com.google.spanner.v1.RoutingHint value) { + if (routingHintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + routingHint_ = value; + } else { + routingHintBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRoutingHint(com.google.spanner.v1.RoutingHint.Builder builderForValue) { + if (routingHintBuilder_ == null) { + routingHint_ = builderForValue.build(); + } else { + routingHintBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRoutingHint(com.google.spanner.v1.RoutingHint value) { + if (routingHintBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && routingHint_ != null + && routingHint_ != com.google.spanner.v1.RoutingHint.getDefaultInstance()) { + getRoutingHintBuilder().mergeFrom(value); + } else { + routingHint_ = value; + } + } else { + routingHintBuilder_.mergeFrom(value); + } + if (routingHint_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRoutingHint() { + bitField0_ = (bitField0_ & ~0x00004000); + routingHint_ = null; + if (routingHintBuilder_ != null) { + routingHintBuilder_.dispose(); + routingHintBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RoutingHint.Builder getRoutingHintBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return internalGetRoutingHintFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder() { + if (routingHintBuilder_ != null) { + return routingHintBuilder_.getMessageOrBuilder(); + } else { + return routingHint_ == null + ? com.google.spanner.v1.RoutingHint.getDefaultInstance() + : routingHint_; + } + } + + /** + * + * + *
+     * Optional. Makes the Spanner requests location-aware if present.
+     *
+     * It gives the server hints that can be used to route the request
+     * to an appropriate server, potentially significantly decreasing latency and
+     * improving throughput. To achieve improved performance, most fields must be
+     * filled in with accurate values.
+     * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder> + internalGetRoutingHintFieldBuilder() { + if (routingHintBuilder_ == null) { + routingHintBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RoutingHint, + com.google.spanner.v1.RoutingHint.Builder, + com.google.spanner.v1.RoutingHintOrBuilder>( + getRoutingHint(), getParentForChildren(), isClean()); + routingHint_ = null; + } + return routingHintBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.ReadRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java index 3cf4fa6a43a..812bf0956b6 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ReadRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ReadRequest) @@ -511,4 +513,62 @@ public interface ReadRequestOrBuilder * @return The lockHint. */ com.google.spanner.v1.ReadRequest.LockHint getLockHint(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the routingHint field is set. + */ + boolean hasRoutingHint(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The routingHint. + */ + com.google.spanner.v1.RoutingHint getRoutingHint(); + + /** + * + * + *
+   * Optional. Makes the Spanner requests location-aware if present.
+   *
+   * It gives the server hints that can be used to route the request
+   * to an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   * 
+ * + * + * .google.spanner.v1.RoutingHint routing_hint = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.RoutingHintOrBuilder getRoutingHintOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RecipeList.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RecipeList.java new file mode 100644 index 00000000000..6ff0c098f9f --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RecipeList.java @@ -0,0 +1,1034 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +/** + * + * + *
+ * A `RecipeList` contains a list of `KeyRecipe`s, which share the same
+ * schema generation.
+ * 
+ * + * Protobuf type {@code google.spanner.v1.RecipeList} + */ +@com.google.protobuf.Generated +public final class RecipeList extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.RecipeList) + RecipeListOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RecipeList"); + } + + // Use RecipeList.newBuilder() to construct. + private RecipeList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RecipeList() { + schemaGeneration_ = com.google.protobuf.ByteString.EMPTY; + recipe_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RecipeList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RecipeList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.RecipeList.class, com.google.spanner.v1.RecipeList.Builder.class); + } + + public static final int SCHEMA_GENERATION_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString schemaGeneration_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * The schema generation of the recipes. To be sent to the server in
+   * `RoutingHint.schema_generation` whenever one of the recipes is used.
+   * `schema_generation` values are comparable with each other; if generation A
+   * compares greater than generation B, then A is a more recent schema than B.
+   * Clients should in general aim to cache only the latest schema generation,
+   * and discard more stale recipes.
+   * 
+ * + * bytes schema_generation = 1; + * + * @return The schemaGeneration. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaGeneration() { + return schemaGeneration_; + } + + public static final int RECIPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List recipe_; + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + @java.lang.Override + public java.util.List getRecipeList() { + return recipe_; + } + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + @java.lang.Override + public java.util.List + getRecipeOrBuilderList() { + return recipe_; + } + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + @java.lang.Override + public int getRecipeCount() { + return recipe_.size(); + } + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + @java.lang.Override + public com.google.spanner.v1.KeyRecipe getRecipe(int index) { + return recipe_.get(index); + } + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + @java.lang.Override + public com.google.spanner.v1.KeyRecipeOrBuilder getRecipeOrBuilder(int index) { + return recipe_.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 (!schemaGeneration_.isEmpty()) { + output.writeBytes(1, schemaGeneration_); + } + for (int i = 0; i < recipe_.size(); i++) { + output.writeMessage(3, recipe_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!schemaGeneration_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, schemaGeneration_); + } + for (int i = 0; i < recipe_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, recipe_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.RecipeList)) { + return super.equals(obj); + } + com.google.spanner.v1.RecipeList other = (com.google.spanner.v1.RecipeList) obj; + + if (!getSchemaGeneration().equals(other.getSchemaGeneration())) return false; + if (!getRecipeList().equals(other.getRecipeList())) 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) + SCHEMA_GENERATION_FIELD_NUMBER; + hash = (53 * hash) + getSchemaGeneration().hashCode(); + if (getRecipeCount() > 0) { + hash = (37 * hash) + RECIPE_FIELD_NUMBER; + hash = (53 * hash) + getRecipeList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.RecipeList parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RecipeList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RecipeList parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RecipeList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RecipeList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RecipeList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RecipeList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RecipeList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.RecipeList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RecipeList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.RecipeList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RecipeList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.RecipeList 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A `RecipeList` contains a list of `KeyRecipe`s, which share the same
+   * schema generation.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.RecipeList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.RecipeList) + com.google.spanner.v1.RecipeListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RecipeList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RecipeList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.RecipeList.class, + com.google.spanner.v1.RecipeList.Builder.class); + } + + // Construct using com.google.spanner.v1.RecipeList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schemaGeneration_ = com.google.protobuf.ByteString.EMPTY; + if (recipeBuilder_ == null) { + recipe_ = java.util.Collections.emptyList(); + } else { + recipe_ = null; + recipeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RecipeList_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.RecipeList getDefaultInstanceForType() { + return com.google.spanner.v1.RecipeList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.RecipeList build() { + com.google.spanner.v1.RecipeList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.RecipeList buildPartial() { + com.google.spanner.v1.RecipeList result = new com.google.spanner.v1.RecipeList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.v1.RecipeList result) { + if (recipeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + recipe_ = java.util.Collections.unmodifiableList(recipe_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.recipe_ = recipe_; + } else { + result.recipe_ = recipeBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.v1.RecipeList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schemaGeneration_ = schemaGeneration_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.RecipeList) { + return mergeFrom((com.google.spanner.v1.RecipeList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.RecipeList other) { + if (other == com.google.spanner.v1.RecipeList.getDefaultInstance()) return this; + if (!other.getSchemaGeneration().isEmpty()) { + setSchemaGeneration(other.getSchemaGeneration()); + } + if (recipeBuilder_ == null) { + if (!other.recipe_.isEmpty()) { + if (recipe_.isEmpty()) { + recipe_ = other.recipe_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRecipeIsMutable(); + recipe_.addAll(other.recipe_); + } + onChanged(); + } + } else { + if (!other.recipe_.isEmpty()) { + if (recipeBuilder_.isEmpty()) { + recipeBuilder_.dispose(); + recipeBuilder_ = null; + recipe_ = other.recipe_; + bitField0_ = (bitField0_ & ~0x00000002); + recipeBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRecipeFieldBuilder() + : null; + } else { + recipeBuilder_.addAllMessages(other.recipe_); + } + } + } + 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: + { + schemaGeneration_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + com.google.spanner.v1.KeyRecipe m = + input.readMessage(com.google.spanner.v1.KeyRecipe.parser(), extensionRegistry); + if (recipeBuilder_ == null) { + ensureRecipeIsMutable(); + recipe_.add(m); + } else { + recipeBuilder_.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.ByteString schemaGeneration_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * The schema generation of the recipes. To be sent to the server in
+     * `RoutingHint.schema_generation` whenever one of the recipes is used.
+     * `schema_generation` values are comparable with each other; if generation A
+     * compares greater than generation B, then A is a more recent schema than B.
+     * Clients should in general aim to cache only the latest schema generation,
+     * and discard more stale recipes.
+     * 
+ * + * bytes schema_generation = 1; + * + * @return The schemaGeneration. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaGeneration() { + return schemaGeneration_; + } + + /** + * + * + *
+     * The schema generation of the recipes. To be sent to the server in
+     * `RoutingHint.schema_generation` whenever one of the recipes is used.
+     * `schema_generation` values are comparable with each other; if generation A
+     * compares greater than generation B, then A is a more recent schema than B.
+     * Clients should in general aim to cache only the latest schema generation,
+     * and discard more stale recipes.
+     * 
+ * + * bytes schema_generation = 1; + * + * @param value The schemaGeneration to set. + * @return This builder for chaining. + */ + public Builder setSchemaGeneration(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + schemaGeneration_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The schema generation of the recipes. To be sent to the server in
+     * `RoutingHint.schema_generation` whenever one of the recipes is used.
+     * `schema_generation` values are comparable with each other; if generation A
+     * compares greater than generation B, then A is a more recent schema than B.
+     * Clients should in general aim to cache only the latest schema generation,
+     * and discard more stale recipes.
+     * 
+ * + * bytes schema_generation = 1; + * + * @return This builder for chaining. + */ + public Builder clearSchemaGeneration() { + bitField0_ = (bitField0_ & ~0x00000001); + schemaGeneration_ = getDefaultInstance().getSchemaGeneration(); + onChanged(); + return this; + } + + private java.util.List recipe_ = + java.util.Collections.emptyList(); + + private void ensureRecipeIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + recipe_ = new java.util.ArrayList(recipe_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.KeyRecipe, + com.google.spanner.v1.KeyRecipe.Builder, + com.google.spanner.v1.KeyRecipeOrBuilder> + recipeBuilder_; + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public java.util.List getRecipeList() { + if (recipeBuilder_ == null) { + return java.util.Collections.unmodifiableList(recipe_); + } else { + return recipeBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public int getRecipeCount() { + if (recipeBuilder_ == null) { + return recipe_.size(); + } else { + return recipeBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public com.google.spanner.v1.KeyRecipe getRecipe(int index) { + if (recipeBuilder_ == null) { + return recipe_.get(index); + } else { + return recipeBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public Builder setRecipe(int index, com.google.spanner.v1.KeyRecipe value) { + if (recipeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecipeIsMutable(); + recipe_.set(index, value); + onChanged(); + } else { + recipeBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public Builder setRecipe(int index, com.google.spanner.v1.KeyRecipe.Builder builderForValue) { + if (recipeBuilder_ == null) { + ensureRecipeIsMutable(); + recipe_.set(index, builderForValue.build()); + onChanged(); + } else { + recipeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public Builder addRecipe(com.google.spanner.v1.KeyRecipe value) { + if (recipeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecipeIsMutable(); + recipe_.add(value); + onChanged(); + } else { + recipeBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public Builder addRecipe(int index, com.google.spanner.v1.KeyRecipe value) { + if (recipeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecipeIsMutable(); + recipe_.add(index, value); + onChanged(); + } else { + recipeBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public Builder addRecipe(com.google.spanner.v1.KeyRecipe.Builder builderForValue) { + if (recipeBuilder_ == null) { + ensureRecipeIsMutable(); + recipe_.add(builderForValue.build()); + onChanged(); + } else { + recipeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public Builder addRecipe(int index, com.google.spanner.v1.KeyRecipe.Builder builderForValue) { + if (recipeBuilder_ == null) { + ensureRecipeIsMutable(); + recipe_.add(index, builderForValue.build()); + onChanged(); + } else { + recipeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public Builder addAllRecipe( + java.lang.Iterable values) { + if (recipeBuilder_ == null) { + ensureRecipeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, recipe_); + onChanged(); + } else { + recipeBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public Builder clearRecipe() { + if (recipeBuilder_ == null) { + recipe_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + recipeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public Builder removeRecipe(int index) { + if (recipeBuilder_ == null) { + ensureRecipeIsMutable(); + recipe_.remove(index); + onChanged(); + } else { + recipeBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public com.google.spanner.v1.KeyRecipe.Builder getRecipeBuilder(int index) { + return internalGetRecipeFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public com.google.spanner.v1.KeyRecipeOrBuilder getRecipeOrBuilder(int index) { + if (recipeBuilder_ == null) { + return recipe_.get(index); + } else { + return recipeBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public java.util.List + getRecipeOrBuilderList() { + if (recipeBuilder_ != null) { + return recipeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(recipe_); + } + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public com.google.spanner.v1.KeyRecipe.Builder addRecipeBuilder() { + return internalGetRecipeFieldBuilder() + .addBuilder(com.google.spanner.v1.KeyRecipe.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public com.google.spanner.v1.KeyRecipe.Builder addRecipeBuilder(int index) { + return internalGetRecipeFieldBuilder() + .addBuilder(index, com.google.spanner.v1.KeyRecipe.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of recipes to be cached.
+     * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + public java.util.List getRecipeBuilderList() { + return internalGetRecipeFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.KeyRecipe, + com.google.spanner.v1.KeyRecipe.Builder, + com.google.spanner.v1.KeyRecipeOrBuilder> + internalGetRecipeFieldBuilder() { + if (recipeBuilder_ == null) { + recipeBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.KeyRecipe, + com.google.spanner.v1.KeyRecipe.Builder, + com.google.spanner.v1.KeyRecipeOrBuilder>( + recipe_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + recipe_ = null; + } + return recipeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.RecipeList) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.RecipeList) + private static final com.google.spanner.v1.RecipeList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.RecipeList(); + } + + public static com.google.spanner.v1.RecipeList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecipeList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.RecipeList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RecipeListOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RecipeListOrBuilder.java new file mode 100644 index 00000000000..d05927ae915 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RecipeListOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +@com.google.protobuf.Generated +public interface RecipeListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.RecipeList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The schema generation of the recipes. To be sent to the server in
+   * `RoutingHint.schema_generation` whenever one of the recipes is used.
+   * `schema_generation` values are comparable with each other; if generation A
+   * compares greater than generation B, then A is a more recent schema than B.
+   * Clients should in general aim to cache only the latest schema generation,
+   * and discard more stale recipes.
+   * 
+ * + * bytes schema_generation = 1; + * + * @return The schemaGeneration. + */ + com.google.protobuf.ByteString getSchemaGeneration(); + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + java.util.List getRecipeList(); + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + com.google.spanner.v1.KeyRecipe getRecipe(int index); + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + int getRecipeCount(); + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + java.util.List getRecipeOrBuilderList(); + + /** + * + * + *
+   * A list of recipes to be cached.
+   * 
+ * + * repeated .google.spanner.v1.KeyRecipe recipe = 3; + */ + com.google.spanner.v1.KeyRecipeOrBuilder getRecipeOrBuilder(int index); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptions.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptions.java index aa0e8411d34..6a2afc8f087 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptions.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.RequestOptions} */ -public final class RequestOptions extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RequestOptions extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.RequestOptions) RequestOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RequestOptions"); + } + // Use RequestOptions.newBuilder() to construct. - private RequestOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RequestOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +57,13 @@ private RequestOptions() { transactionTag_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RequestOptions(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_RequestOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_RequestOptions_fieldAccessorTable @@ -77,15 +83,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * guarantee priority or order of execution. For example: * * * Some parts of a write operation always execute at `PRIORITY_HIGH`, - * regardless of the specified priority. This can cause you to see an - * increase in high priority workload even when executing a low priority - * request. This can also potentially cause a priority inversion where a - * lower priority request is fulfilled ahead of a higher priority - * request. + * regardless of the specified priority. This can cause you to see an + * increase in high priority workload even when executing a low priority + * request. This can also potentially cause a priority inversion where a + * lower priority request is fulfilled ahead of a higher priority + * request. * * If a transaction contains multiple operations with different priorities, - * Cloud Spanner doesn't guarantee to process the higher priority - * operations first. There might be other constraints to satisfy, such as - * the order of operations. + * Cloud Spanner doesn't guarantee to process the higher priority + * operations first. There might be other constraints to satisfy, such as + * the order of operations. * * * Protobuf enum {@code google.spanner.v1.RequestOptions.Priority} @@ -134,6 +140,16 @@ public enum Priority implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Priority"); + } + /** * * @@ -238,7 +254,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.RequestOptions.getDescriptor().getEnumTypes().get(0); } @@ -263,6 +279,953 @@ private Priority(int value) { // @@protoc_insertion_point(enum_scope:google.spanner.v1.RequestOptions.Priority) } + public interface ClientContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.RequestOptions.ClientContext) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Map of parameter name to value for this request. These values
+     * will be returned by any SECURE_CONTEXT() calls invoked by this request
+     * (e.g., by queries against Parameterized Secure Views).
+     * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSecureContextCount(); + + /** + * + * + *
+     * Optional. Map of parameter name to value for this request. These values
+     * will be returned by any SECURE_CONTEXT() calls invoked by this request
+     * (e.g., by queries against Parameterized Secure Views).
+     * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsSecureContext(java.lang.String key); + + /** Use {@link #getSecureContextMap()} instead. */ + @java.lang.Deprecated + java.util.Map getSecureContext(); + + /** + * + * + *
+     * Optional. Map of parameter name to value for this request. These values
+     * will be returned by any SECURE_CONTEXT() calls invoked by this request
+     * (e.g., by queries against Parameterized Secure Views).
+     * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getSecureContextMap(); + + /** + * + * + *
+     * Optional. Map of parameter name to value for this request. These values
+     * will be returned by any SECURE_CONTEXT() calls invoked by this request
+     * (e.g., by queries against Parameterized Secure Views).
+     * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.protobuf.Value getSecureContextOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue); + + /** + * + * + *
+     * Optional. Map of parameter name to value for this request. These values
+     * will be returned by any SECURE_CONTEXT() calls invoked by this request
+     * (e.g., by queries against Parameterized Secure Views).
+     * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.Value getSecureContextOrThrow(java.lang.String key); + } + + /** + * + * + *
+   * Container for various pieces of client-owned context attached to a request.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.RequestOptions.ClientContext} + */ + public static final class ClientContext extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.RequestOptions.ClientContext) + ClientContextOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ClientContext"); + } + + // Use ClientContext.newBuilder() to construct. + private ClientContext(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ClientContext() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_RequestOptions_ClientContext_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecureContext(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_RequestOptions_ClientContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.RequestOptions.ClientContext.class, + com.google.spanner.v1.RequestOptions.ClientContext.Builder.class); + } + + public static final int SECURE_CONTEXT_FIELD_NUMBER = 1; + + private static final class SecureContextDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_RequestOptions_ClientContext_SecureContextEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField + secureContext_; + + private com.google.protobuf.MapField + internalGetSecureContext() { + if (secureContext_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SecureContextDefaultEntryHolder.defaultEntry); + } + return secureContext_; + } + + public int getSecureContextCount() { + return internalGetSecureContext().getMap().size(); + } + + /** + * + * + *
+     * Optional. Map of parameter name to value for this request. These values
+     * will be returned by any SECURE_CONTEXT() calls invoked by this request
+     * (e.g., by queries against Parameterized Secure Views).
+     * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsSecureContext(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSecureContext().getMap().containsKey(key); + } + + /** Use {@link #getSecureContextMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecureContext() { + return getSecureContextMap(); + } + + /** + * + * + *
+     * Optional. Map of parameter name to value for this request. These values
+     * will be returned by any SECURE_CONTEXT() calls invoked by this request
+     * (e.g., by queries against Parameterized Secure Views).
+     * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getSecureContextMap() { + return internalGetSecureContext().getMap(); + } + + /** + * + * + *
+     * Optional. Map of parameter name to value for this request. These values
+     * will be returned by any SECURE_CONTEXT() calls invoked by this request
+     * (e.g., by queries against Parameterized Secure Views).
+     * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getSecureContextOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetSecureContext().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Map of parameter name to value for this request. These values
+     * will be returned by any SECURE_CONTEXT() calls invoked by this request
+     * (e.g., by queries against Parameterized Secure Views).
+     * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getSecureContextOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetSecureContext().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 { + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetSecureContext(), SecureContextDefaultEntryHolder.defaultEntry, 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetSecureContext().getMap().entrySet()) { + com.google.protobuf.MapEntry secureContext__ = + SecureContextDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, secureContext__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.RequestOptions.ClientContext)) { + return super.equals(obj); + } + com.google.spanner.v1.RequestOptions.ClientContext other = + (com.google.spanner.v1.RequestOptions.ClientContext) obj; + + if (!internalGetSecureContext().equals(other.internalGetSecureContext())) 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 (!internalGetSecureContext().getMap().isEmpty()) { + hash = (37 * hash) + SECURE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + internalGetSecureContext().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.RequestOptions.ClientContext 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Container for various pieces of client-owned context attached to a request.
+     * 
+ * + * Protobuf type {@code google.spanner.v1.RequestOptions.ClientContext} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.RequestOptions.ClientContext) + com.google.spanner.v1.RequestOptions.ClientContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_RequestOptions_ClientContext_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetSecureContext(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableSecureContext(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_RequestOptions_ClientContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.RequestOptions.ClientContext.class, + com.google.spanner.v1.RequestOptions.ClientContext.Builder.class); + } + + // Construct using com.google.spanner.v1.RequestOptions.ClientContext.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableSecureContext().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.SpannerProto + .internal_static_google_spanner_v1_RequestOptions_ClientContext_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.RequestOptions.ClientContext getDefaultInstanceForType() { + return com.google.spanner.v1.RequestOptions.ClientContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.RequestOptions.ClientContext build() { + com.google.spanner.v1.RequestOptions.ClientContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.RequestOptions.ClientContext buildPartial() { + com.google.spanner.v1.RequestOptions.ClientContext result = + new com.google.spanner.v1.RequestOptions.ClientContext(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.v1.RequestOptions.ClientContext result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.secureContext_ = + internalGetSecureContext().build(SecureContextDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.RequestOptions.ClientContext) { + return mergeFrom((com.google.spanner.v1.RequestOptions.ClientContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.RequestOptions.ClientContext other) { + if (other == com.google.spanner.v1.RequestOptions.ClientContext.getDefaultInstance()) + return this; + internalGetMutableSecureContext().mergeFrom(other.internalGetSecureContext()); + bitField0_ |= 0x00000001; + 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.protobuf.MapEntry + secureContext__ = + input.readMessage( + SecureContextDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableSecureContext() + .ensureBuilderMap() + .put(secureContext__.getKey(), secureContext__.getValue()); + 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 static final class SecureContextConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value> { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { + return (com.google.protobuf.Value) val; + } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return SecureContextDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final SecureContextConverter secureContextConverter = + new SecureContextConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + secureContext_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + internalGetSecureContext() { + if (secureContext_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(secureContextConverter); + } + return secureContext_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + internalGetMutableSecureContext() { + if (secureContext_ == null) { + secureContext_ = new com.google.protobuf.MapFieldBuilder<>(secureContextConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return secureContext_; + } + + public int getSecureContextCount() { + return internalGetSecureContext().ensureBuilderMap().size(); + } + + /** + * + * + *
+       * Optional. Map of parameter name to value for this request. These values
+       * will be returned by any SECURE_CONTEXT() calls invoked by this request
+       * (e.g., by queries against Parameterized Secure Views).
+       * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsSecureContext(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetSecureContext().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getSecureContextMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecureContext() { + return getSecureContextMap(); + } + + /** + * + * + *
+       * Optional. Map of parameter name to value for this request. These values
+       * will be returned by any SECURE_CONTEXT() calls invoked by this request
+       * (e.g., by queries against Parameterized Secure Views).
+       * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getSecureContextMap() { + return internalGetSecureContext().getImmutableMap(); + } + + /** + * + * + *
+       * Optional. Map of parameter name to value for this request. These values
+       * will be returned by any SECURE_CONTEXT() calls invoked by this request
+       * (e.g., by queries against Parameterized Secure Views).
+       * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getSecureContextOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableSecureContext().ensureBuilderMap(); + return map.containsKey(key) ? secureContextConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+       * Optional. Map of parameter name to value for this request. These values
+       * will be returned by any SECURE_CONTEXT() calls invoked by this request
+       * (e.g., by queries against Parameterized Secure Views).
+       * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.Value getSecureContextOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableSecureContext().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return secureContextConverter.build(map.get(key)); + } + + public Builder clearSecureContext() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableSecureContext().clear(); + return this; + } + + /** + * + * + *
+       * Optional. Map of parameter name to value for this request. These values
+       * will be returned by any SECURE_CONTEXT() calls invoked by this request
+       * (e.g., by queries against Parameterized Secure Views).
+       * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeSecureContext(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableSecureContext().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableSecureContext() { + bitField0_ |= 0x00000001; + return internalGetMutableSecureContext().ensureMessageMap(); + } + + /** + * + * + *
+       * Optional. Map of parameter name to value for this request. These values
+       * will be returned by any SECURE_CONTEXT() calls invoked by this request
+       * (e.g., by queries against Parameterized Secure Views).
+       * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putSecureContext(java.lang.String key, com.google.protobuf.Value value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableSecureContext().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + + /** + * + * + *
+       * Optional. Map of parameter name to value for this request. These values
+       * will be returned by any SECURE_CONTEXT() calls invoked by this request
+       * (e.g., by queries against Parameterized Secure Views).
+       * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllSecureContext( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableSecureContext().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + /** + * + * + *
+       * Optional. Map of parameter name to value for this request. These values
+       * will be returned by any SECURE_CONTEXT() calls invoked by this request
+       * (e.g., by queries against Parameterized Secure Views).
+       * 
+ * + * + * map<string, .google.protobuf.Value> secure_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Value.Builder putSecureContextBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = + internalGetMutableSecureContext().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.RequestOptions.ClientContext) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.RequestOptions.ClientContext) + private static final com.google.spanner.v1.RequestOptions.ClientContext DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.RequestOptions.ClientContext(); + } + + public static com.google.spanner.v1.RequestOptions.ClientContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClientContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.RequestOptions.ClientContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; public static final int PRIORITY_FIELD_NUMBER = 1; private int priority_ = 0; @@ -383,8 +1346,9 @@ public com.google.protobuf.ByteString getRequestTagBytes() { * A tag used for statistics collection about this transaction. * Both `request_tag` and `transaction_tag` can be specified for a read or * query that belongs to a transaction. - * The value of transaction_tag should be the same for all requests belonging - * to the same transaction. + * To enable tagging on a transaction, `transaction_tag` must be set to the + * same value for all requests belonging to the same transaction, including + * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. * If this request doesn't belong to any transaction, `transaction_tag` is * ignored. * Legal characters for `transaction_tag` values are all printable characters @@ -417,8 +1381,9 @@ public java.lang.String getTransactionTag() { * A tag used for statistics collection about this transaction. * Both `request_tag` and `transaction_tag` can be specified for a read or * query that belongs to a transaction. - * The value of transaction_tag should be the same for all requests belonging - * to the same transaction. + * To enable tagging on a transaction, `transaction_tag` must be set to the + * same value for all requests belonging to the same transaction, including + * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. * If this request doesn't belong to any transaction, `transaction_tag` is * ignored. * Legal characters for `transaction_tag` values are all printable characters @@ -444,6 +1409,65 @@ public com.google.protobuf.ByteString getTransactionTagBytes() { } } + public static final int CLIENT_CONTEXT_FIELD_NUMBER = 4; + private com.google.spanner.v1.RequestOptions.ClientContext clientContext_; + + /** + * + * + *
+   * Optional. Optional context that may be needed for some requests.
+   * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clientContext field is set. + */ + @java.lang.Override + public boolean hasClientContext() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Optional context that may be needed for some requests.
+   * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clientContext. + */ + @java.lang.Override + public com.google.spanner.v1.RequestOptions.ClientContext getClientContext() { + return clientContext_ == null + ? com.google.spanner.v1.RequestOptions.ClientContext.getDefaultInstance() + : clientContext_; + } + + /** + * + * + *
+   * Optional. Optional context that may be needed for some requests.
+   * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.RequestOptions.ClientContextOrBuilder getClientContextOrBuilder() { + return clientContext_ == null + ? com.google.spanner.v1.RequestOptions.ClientContext.getDefaultInstance() + : clientContext_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -462,11 +1486,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.spanner.v1.RequestOptions.Priority.PRIORITY_UNSPECIFIED.getNumber()) { output.writeEnum(1, priority_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestTag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestTag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestTag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestTag_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionTag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, transactionTag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionTag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, transactionTag_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getClientContext()); } getUnknownFields().writeTo(output); } @@ -481,11 +1508,14 @@ public int getSerializedSize() { != com.google.spanner.v1.RequestOptions.Priority.PRIORITY_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, priority_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestTag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestTag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestTag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestTag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionTag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, transactionTag_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionTag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, transactionTag_); + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getClientContext()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -505,6 +1535,10 @@ public boolean equals(final java.lang.Object obj) { if (priority_ != other.priority_) return false; if (!getRequestTag().equals(other.getRequestTag())) return false; if (!getTransactionTag().equals(other.getTransactionTag())) return false; + if (hasClientContext() != other.hasClientContext()) return false; + if (hasClientContext()) { + if (!getClientContext().equals(other.getClientContext())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -522,6 +1556,10 @@ public int hashCode() { hash = (53 * hash) + getRequestTag().hashCode(); hash = (37 * hash) + TRANSACTION_TAG_FIELD_NUMBER; hash = (53 * hash) + getTransactionTag().hashCode(); + if (hasClientContext()) { + hash = (37 * hash) + CLIENT_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getClientContext().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -563,38 +1601,38 @@ public static com.google.spanner.v1.RequestOptions parseFrom( public static com.google.spanner.v1.RequestOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.RequestOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.RequestOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.RequestOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.RequestOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.RequestOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -617,7 +1655,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -631,7 +1669,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.RequestOptions} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.RequestOptions) com.google.spanner.v1.RequestOptionsOrBuilder { @@ -641,7 +1679,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_RequestOptions_fieldAccessorTable @@ -651,10 +1689,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.spanner.v1.RequestOptions.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetClientContextFieldBuilder(); + } } @java.lang.Override @@ -664,6 +1711,11 @@ public Builder clear() { priority_ = 0; requestTag_ = ""; transactionTag_ = ""; + clientContext_ = null; + if (clientContextBuilder_ != null) { + clientContextBuilder_.dispose(); + clientContextBuilder_ = null; + } return this; } @@ -708,39 +1760,13 @@ private void buildPartial0(com.google.spanner.v1.RequestOptions result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.transactionTag_ = transactionTag_; } - } - - @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); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.clientContext_ = + clientContextBuilder_ == null ? clientContext_ : clientContextBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -768,6 +1794,9 @@ public Builder mergeFrom(com.google.spanner.v1.RequestOptions other) { bitField0_ |= 0x00000004; onChanged(); } + if (other.hasClientContext()) { + mergeClientContext(other.getClientContext()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -812,6 +1841,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + input.readMessage( + internalGetClientContextFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1091,8 +2127,9 @@ public Builder setRequestTagBytes(com.google.protobuf.ByteString value) { * A tag used for statistics collection about this transaction. * Both `request_tag` and `transaction_tag` can be specified for a read or * query that belongs to a transaction. - * The value of transaction_tag should be the same for all requests belonging - * to the same transaction. + * To enable tagging on a transaction, `transaction_tag` must be set to the + * same value for all requests belonging to the same transaction, including + * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. * If this request doesn't belong to any transaction, `transaction_tag` is * ignored. * Legal characters for `transaction_tag` values are all printable characters @@ -1124,8 +2161,9 @@ public java.lang.String getTransactionTag() { * A tag used for statistics collection about this transaction. * Both `request_tag` and `transaction_tag` can be specified for a read or * query that belongs to a transaction. - * The value of transaction_tag should be the same for all requests belonging - * to the same transaction. + * To enable tagging on a transaction, `transaction_tag` must be set to the + * same value for all requests belonging to the same transaction, including + * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. * If this request doesn't belong to any transaction, `transaction_tag` is * ignored. * Legal characters for `transaction_tag` values are all printable characters @@ -1157,8 +2195,9 @@ public com.google.protobuf.ByteString getTransactionTagBytes() { * A tag used for statistics collection about this transaction. * Both `request_tag` and `transaction_tag` can be specified for a read or * query that belongs to a transaction. - * The value of transaction_tag should be the same for all requests belonging - * to the same transaction. + * To enable tagging on a transaction, `transaction_tag` must be set to the + * same value for all requests belonging to the same transaction, including + * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. * If this request doesn't belong to any transaction, `transaction_tag` is * ignored. * Legal characters for `transaction_tag` values are all printable characters @@ -1189,8 +2228,9 @@ public Builder setTransactionTag(java.lang.String value) { * A tag used for statistics collection about this transaction. * Both `request_tag` and `transaction_tag` can be specified for a read or * query that belongs to a transaction. - * The value of transaction_tag should be the same for all requests belonging - * to the same transaction. + * To enable tagging on a transaction, `transaction_tag` must be set to the + * same value for all requests belonging to the same transaction, including + * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. * If this request doesn't belong to any transaction, `transaction_tag` is * ignored. * Legal characters for `transaction_tag` values are all printable characters @@ -1217,8 +2257,9 @@ public Builder clearTransactionTag() { * A tag used for statistics collection about this transaction. * Both `request_tag` and `transaction_tag` can be specified for a read or * query that belongs to a transaction. - * The value of transaction_tag should be the same for all requests belonging - * to the same transaction. + * To enable tagging on a transaction, `transaction_tag` must be set to the + * same value for all requests belonging to the same transaction, including + * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. * If this request doesn't belong to any transaction, `transaction_tag` is * ignored. * Legal characters for `transaction_tag` values are all printable characters @@ -1243,15 +2284,218 @@ public Builder setTransactionTagBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.RequestOptions.ClientContext clientContext_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RequestOptions.ClientContext, + com.google.spanner.v1.RequestOptions.ClientContext.Builder, + com.google.spanner.v1.RequestOptions.ClientContextOrBuilder> + clientContextBuilder_; + + /** + * + * + *
+     * Optional. Optional context that may be needed for some requests.
+     * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clientContext field is set. + */ + public boolean hasClientContext() { + return ((bitField0_ & 0x00000008) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. Optional context that may be needed for some requests.
+     * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clientContext. + */ + public com.google.spanner.v1.RequestOptions.ClientContext getClientContext() { + if (clientContextBuilder_ == null) { + return clientContext_ == null + ? com.google.spanner.v1.RequestOptions.ClientContext.getDefaultInstance() + : clientContext_; + } else { + return clientContextBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Optional context that may be needed for some requests.
+     * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setClientContext(com.google.spanner.v1.RequestOptions.ClientContext value) { + if (clientContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clientContext_ = value; + } else { + clientContextBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional context that may be needed for some requests.
+     * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setClientContext( + com.google.spanner.v1.RequestOptions.ClientContext.Builder builderForValue) { + if (clientContextBuilder_ == null) { + clientContext_ = builderForValue.build(); + } else { + clientContextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional context that may be needed for some requests.
+     * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeClientContext(com.google.spanner.v1.RequestOptions.ClientContext value) { + if (clientContextBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && clientContext_ != null + && clientContext_ + != com.google.spanner.v1.RequestOptions.ClientContext.getDefaultInstance()) { + getClientContextBuilder().mergeFrom(value); + } else { + clientContext_ = value; + } + } else { + clientContextBuilder_.mergeFrom(value); + } + if (clientContext_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Optional context that may be needed for some requests.
+     * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearClientContext() { + bitField0_ = (bitField0_ & ~0x00000008); + clientContext_ = null; + if (clientContextBuilder_ != null) { + clientContextBuilder_.dispose(); + clientContextBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional context that may be needed for some requests.
+     * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RequestOptions.ClientContext.Builder getClientContextBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetClientContextFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Optional context that may be needed for some requests.
+     * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.RequestOptions.ClientContextOrBuilder getClientContextOrBuilder() { + if (clientContextBuilder_ != null) { + return clientContextBuilder_.getMessageOrBuilder(); + } else { + return clientContext_ == null + ? com.google.spanner.v1.RequestOptions.ClientContext.getDefaultInstance() + : clientContext_; + } + } + + /** + * + * + *
+     * Optional. Optional context that may be needed for some requests.
+     * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RequestOptions.ClientContext, + com.google.spanner.v1.RequestOptions.ClientContext.Builder, + com.google.spanner.v1.RequestOptions.ClientContextOrBuilder> + internalGetClientContextFieldBuilder() { + if (clientContextBuilder_ == null) { + clientContextBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.RequestOptions.ClientContext, + com.google.spanner.v1.RequestOptions.ClientContext.Builder, + com.google.spanner.v1.RequestOptions.ClientContextOrBuilder>( + getClientContext(), getParentForChildren(), isClean()); + clientContext_ = null; + } + return clientContextBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.RequestOptions) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptionsOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptionsOrBuilder.java index 49e2d07348c..601c48378eb 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptionsOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RequestOptionsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface RequestOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.RequestOptions) @@ -101,8 +103,9 @@ public interface RequestOptionsOrBuilder * A tag used for statistics collection about this transaction. * Both `request_tag` and `transaction_tag` can be specified for a read or * query that belongs to a transaction. - * The value of transaction_tag should be the same for all requests belonging - * to the same transaction. + * To enable tagging on a transaction, `transaction_tag` must be set to the + * same value for all requests belonging to the same transaction, including + * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. * If this request doesn't belong to any transaction, `transaction_tag` is * ignored. * Legal characters for `transaction_tag` values are all printable characters @@ -124,8 +127,9 @@ public interface RequestOptionsOrBuilder * A tag used for statistics collection about this transaction. * Both `request_tag` and `transaction_tag` can be specified for a read or * query that belongs to a transaction. - * The value of transaction_tag should be the same for all requests belonging - * to the same transaction. + * To enable tagging on a transaction, `transaction_tag` must be set to the + * same value for all requests belonging to the same transaction, including + * [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. * If this request doesn't belong to any transaction, `transaction_tag` is * ignored. * Legal characters for `transaction_tag` values are all printable characters @@ -139,4 +143,47 @@ public interface RequestOptionsOrBuilder * @return The bytes for transactionTag. */ com.google.protobuf.ByteString getTransactionTagBytes(); + + /** + * + * + *
+   * Optional. Optional context that may be needed for some requests.
+   * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clientContext field is set. + */ + boolean hasClientContext(); + + /** + * + * + *
+   * Optional. Optional context that may be needed for some requests.
+   * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clientContext. + */ + com.google.spanner.v1.RequestOptions.ClientContext getClientContext(); + + /** + * + * + *
+   * Optional. Optional context that may be needed for some requests.
+   * 
+ * + * + * .google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.RequestOptions.ClientContextOrBuilder getClientContextOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSet.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSet.java index b156628d752..3c1b8d0b4e0 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSet.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/result_set.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.ResultSet} */ -public final class ResultSet extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ResultSet extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ResultSet) ResultSetOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ResultSet"); + } + // Use ResultSet.newBuilder() to construct. - private ResultSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ResultSet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private ResultSet() { rows_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ResultSet(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_ResultSet_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_ResultSet_fieldAccessorTable @@ -355,6 +361,80 @@ public com.google.spanner.v1.MultiplexedSessionPrecommitToken getPrecommitToken( : precommitToken_; } + public static final int CACHE_UPDATE_FIELD_NUMBER = 6; + private com.google.spanner.v1.CacheUpdate cacheUpdate_; + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + @java.lang.Override + public boolean hasCacheUpdate() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + @java.lang.Override + public com.google.spanner.v1.CacheUpdate getCacheUpdate() { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder() { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -381,6 +461,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(5, getPrecommitToken()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getCacheUpdate()); + } getUnknownFields().writeTo(output); } @@ -402,6 +485,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPrecommitToken()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCacheUpdate()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -430,6 +516,10 @@ public boolean equals(final java.lang.Object obj) { if (hasPrecommitToken()) { if (!getPrecommitToken().equals(other.getPrecommitToken())) return false; } + if (hasCacheUpdate() != other.hasCacheUpdate()) return false; + if (hasCacheUpdate()) { + if (!getCacheUpdate().equals(other.getCacheUpdate())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -457,6 +547,10 @@ public int hashCode() { hash = (37 * hash) + PRECOMMIT_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPrecommitToken().hashCode(); } + if (hasCacheUpdate()) { + hash = (37 * hash) + CACHE_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getCacheUpdate().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -498,38 +592,38 @@ public static com.google.spanner.v1.ResultSet parseFrom( public static com.google.spanner.v1.ResultSet parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ResultSet parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ResultSet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ResultSet parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ResultSet parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ResultSet parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -552,7 +646,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -567,7 +661,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.ResultSet} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ResultSet) com.google.spanner.v1.ResultSetOrBuilder { @@ -577,7 +671,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_ResultSet_fieldAccessorTable @@ -590,17 +684,18 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - getRowsFieldBuilder(); - getStatsFieldBuilder(); - getPrecommitTokenFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMetadataFieldBuilder(); + internalGetRowsFieldBuilder(); + internalGetStatsFieldBuilder(); + internalGetPrecommitTokenFieldBuilder(); + internalGetCacheUpdateFieldBuilder(); } } @@ -630,6 +725,11 @@ public Builder clear() { precommitTokenBuilder_.dispose(); precommitTokenBuilder_ = null; } + cacheUpdate_ = null; + if (cacheUpdateBuilder_ != null) { + cacheUpdateBuilder_.dispose(); + cacheUpdateBuilder_ = null; + } return this; } @@ -692,42 +792,14 @@ private void buildPartial0(com.google.spanner.v1.ResultSet result) { precommitTokenBuilder_ == null ? precommitToken_ : precommitTokenBuilder_.build(); to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cacheUpdate_ = + cacheUpdateBuilder_ == null ? cacheUpdate_ : cacheUpdateBuilder_.build(); + to_bitField0_ |= 0x00000008; + } 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.v1.ResultSet) { @@ -762,8 +834,8 @@ public Builder mergeFrom(com.google.spanner.v1.ResultSet other) { rows_ = other.rows_; bitField0_ = (bitField0_ & ~0x00000002); rowsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRowsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRowsFieldBuilder() : null; } else { rowsBuilder_.addAllMessages(other.rows_); @@ -776,6 +848,9 @@ public Builder mergeFrom(com.google.spanner.v1.ResultSet other) { if (other.hasPrecommitToken()) { mergePrecommitToken(other.getPrecommitToken()); } + if (other.hasCacheUpdate()) { + mergeCacheUpdate(other.getCacheUpdate()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -804,7 +879,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -822,16 +898,24 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getStatsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetStatsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 42: { - input.readMessage(getPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 42 + case 50: + { + input.readMessage( + internalGetCacheUpdateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -852,7 +936,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.v1.ResultSetMetadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetMetadata, com.google.spanner.v1.ResultSetMetadata.Builder, com.google.spanner.v1.ResultSetMetadataOrBuilder> @@ -997,7 +1081,7 @@ public Builder clearMetadata() { public com.google.spanner.v1.ResultSetMetadata.Builder getMetadataBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getMetadataFieldBuilder().getBuilder(); + return internalGetMetadataFieldBuilder().getBuilder(); } /** @@ -1028,14 +1112,14 @@ public com.google.spanner.v1.ResultSetMetadataOrBuilder getMetadataOrBuilder() { * * .google.spanner.v1.ResultSetMetadata metadata = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetMetadata, com.google.spanner.v1.ResultSetMetadata.Builder, com.google.spanner.v1.ResultSetMetadataOrBuilder> - getMetadataFieldBuilder() { + internalGetMetadataFieldBuilder() { if (metadataBuilder_ == null) { metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetMetadata, com.google.spanner.v1.ResultSetMetadata.Builder, com.google.spanner.v1.ResultSetMetadataOrBuilder>( @@ -1054,7 +1138,7 @@ private void ensureRowsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> @@ -1362,7 +1446,7 @@ public Builder removeRows(int index) { * repeated .google.protobuf.ListValue rows = 2; */ public com.google.protobuf.ListValue.Builder getRowsBuilder(int index) { - return getRowsFieldBuilder().getBuilder(index); + return internalGetRowsFieldBuilder().getBuilder(index); } /** @@ -1421,7 +1505,8 @@ public java.util.List getRowsO * repeated .google.protobuf.ListValue rows = 2; */ public com.google.protobuf.ListValue.Builder addRowsBuilder() { - return getRowsFieldBuilder().addBuilder(com.google.protobuf.ListValue.getDefaultInstance()); + return internalGetRowsFieldBuilder() + .addBuilder(com.google.protobuf.ListValue.getDefaultInstance()); } /** @@ -1438,7 +1523,7 @@ public com.google.protobuf.ListValue.Builder addRowsBuilder() { * repeated .google.protobuf.ListValue rows = 2; */ public com.google.protobuf.ListValue.Builder addRowsBuilder(int index) { - return getRowsFieldBuilder() + return internalGetRowsFieldBuilder() .addBuilder(index, com.google.protobuf.ListValue.getDefaultInstance()); } @@ -1456,17 +1541,17 @@ public com.google.protobuf.ListValue.Builder addRowsBuilder(int index) { * repeated .google.protobuf.ListValue rows = 2; */ public java.util.List getRowsBuilderList() { - return getRowsFieldBuilder().getBuilderList(); + return internalGetRowsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder> - getRowsFieldBuilder() { + internalGetRowsFieldBuilder() { if (rowsBuilder_ == null) { rowsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.protobuf.ListValue, com.google.protobuf.ListValue.Builder, com.google.protobuf.ListValueOrBuilder>( @@ -1477,7 +1562,7 @@ public java.util.List getRowsBuilderList( } private com.google.spanner.v1.ResultSetStats stats_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetStats, com.google.spanner.v1.ResultSetStats.Builder, com.google.spanner.v1.ResultSetStatsOrBuilder> @@ -1676,7 +1761,7 @@ public Builder clearStats() { public com.google.spanner.v1.ResultSetStats.Builder getStatsBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getStatsFieldBuilder().getBuilder(); + return internalGetStatsFieldBuilder().getBuilder(); } /** @@ -1721,14 +1806,14 @@ public com.google.spanner.v1.ResultSetStatsOrBuilder getStatsOrBuilder() { * * .google.spanner.v1.ResultSetStats stats = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetStats, com.google.spanner.v1.ResultSetStats.Builder, com.google.spanner.v1.ResultSetStatsOrBuilder> - getStatsFieldBuilder() { + internalGetStatsFieldBuilder() { if (statsBuilder_ == null) { statsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.ResultSetStats, com.google.spanner.v1.ResultSetStats.Builder, com.google.spanner.v1.ResultSetStatsOrBuilder>( @@ -1739,7 +1824,7 @@ public com.google.spanner.v1.ResultSetStatsOrBuilder getStatsOrBuilder() { } private com.google.spanner.v1.MultiplexedSessionPrecommitToken precommitToken_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> @@ -1923,7 +2008,7 @@ public Builder clearPrecommitToken() { getPrecommitTokenBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getPrecommitTokenFieldBuilder().getBuilder(); + return internalGetPrecommitTokenFieldBuilder().getBuilder(); } /** @@ -1965,14 +2050,14 @@ public Builder clearPrecommitToken() { * .google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> - getPrecommitTokenFieldBuilder() { + internalGetPrecommitTokenFieldBuilder() { if (precommitTokenBuilder_ == null) { precommitTokenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder>( @@ -1982,15 +2067,261 @@ public Builder clearPrecommitToken() { return precommitTokenBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.CacheUpdate cacheUpdate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder> + cacheUpdateBuilder_; + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + public boolean hasCacheUpdate() { + return ((bitField0_ & 0x00000010) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + public com.google.spanner.v1.CacheUpdate getCacheUpdate() { + if (cacheUpdateBuilder_ == null) { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } else { + return cacheUpdateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCacheUpdate(com.google.spanner.v1.CacheUpdate value) { + if (cacheUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cacheUpdate_ = value; + } else { + cacheUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCacheUpdate(com.google.spanner.v1.CacheUpdate.Builder builderForValue) { + if (cacheUpdateBuilder_ == null) { + cacheUpdate_ = builderForValue.build(); + } else { + cacheUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCacheUpdate(com.google.spanner.v1.CacheUpdate value) { + if (cacheUpdateBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && cacheUpdate_ != null + && cacheUpdate_ != com.google.spanner.v1.CacheUpdate.getDefaultInstance()) { + getCacheUpdateBuilder().mergeFrom(value); + } else { + cacheUpdate_ = value; + } + } else { + cacheUpdateBuilder_.mergeFrom(value); + } + if (cacheUpdate_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCacheUpdate() { + bitField0_ = (bitField0_ & ~0x00000010); + cacheUpdate_ = null; + if (cacheUpdateBuilder_ != null) { + cacheUpdateBuilder_.dispose(); + cacheUpdateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.CacheUpdate.Builder getCacheUpdateBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetCacheUpdateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder() { + if (cacheUpdateBuilder_ != null) { + return cacheUpdateBuilder_.getMessageOrBuilder(); + } else { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder> + internalGetCacheUpdateFieldBuilder() { + if (cacheUpdateBuilder_ == null) { + cacheUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder>( + getCacheUpdate(), getParentForChildren(), isClean()); + cacheUpdate_ = null; + } + return cacheUpdateBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.ResultSet) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadata.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadata.java index d1e9fa29d21..6cd09c5326b 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadata.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/result_set.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.v1.ResultSetMetadata} */ -public final class ResultSetMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ResultSetMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ResultSetMetadata) ResultSetMetadataOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ResultSetMetadata"); + } + // Use ResultSetMetadata.newBuilder() to construct. - private ResultSetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ResultSetMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ResultSetMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ResultSetMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_ResultSetMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_ResultSetMetadata_fieldAccessorTable @@ -75,10 +81,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -98,10 +104,10 @@ public boolean hasRowType() { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -121,10 +127,10 @@ public com.google.spanner.v1.StructType getRowType() { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -203,10 +209,10 @@ public com.google.spanner.v1.TransactionOrBuilder getTransactionOrBuilder() { * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -228,10 +234,10 @@ public boolean hasUndeclaredParameters() { * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -255,10 +261,10 @@ public com.google.spanner.v1.StructType getUndeclaredParameters() { * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -404,38 +410,38 @@ public static com.google.spanner.v1.ResultSetMetadata parseFrom( public static com.google.spanner.v1.ResultSetMetadata parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ResultSetMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ResultSetMetadata parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ResultSetMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ResultSetMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ResultSetMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -458,7 +464,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -473,7 +479,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.ResultSetMetadata} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ResultSetMetadata) com.google.spanner.v1.ResultSetMetadataOrBuilder { @@ -483,7 +489,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_ResultSetMetadata_fieldAccessorTable @@ -497,16 +503,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRowTypeFieldBuilder(); - getTransactionFieldBuilder(); - getUndeclaredParametersFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRowTypeFieldBuilder(); + internalGetTransactionFieldBuilder(); + internalGetUndeclaredParametersFieldBuilder(); } } @@ -585,39 +591,6 @@ private void buildPartial0(com.google.spanner.v1.ResultSetMetadata result) { 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.v1.ResultSetMetadata) { @@ -667,20 +640,21 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getRowTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetRowTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getTransactionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTransactionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( - getUndeclaredParametersFieldBuilder().getBuilder(), extensionRegistry); + internalGetUndeclaredParametersFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -704,7 +678,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.spanner.v1.StructType rowType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> @@ -718,10 +692,10 @@ public Builder mergeFrom( * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -740,10 +714,10 @@ public boolean hasRowType() { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -766,10 +740,10 @@ public com.google.spanner.v1.StructType getRowType() { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -796,10 +770,10 @@ public Builder setRowType(com.google.spanner.v1.StructType value) { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -823,10 +797,10 @@ public Builder setRowType(com.google.spanner.v1.StructType.Builder builderForVal * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -858,10 +832,10 @@ public Builder mergeRowType(com.google.spanner.v1.StructType value) { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -885,10 +859,10 @@ public Builder clearRowType() { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -896,7 +870,7 @@ public Builder clearRowType() { public com.google.spanner.v1.StructType.Builder getRowTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getRowTypeFieldBuilder().getBuilder(); + return internalGetRowTypeFieldBuilder().getBuilder(); } /** @@ -907,10 +881,10 @@ public com.google.spanner.v1.StructType.Builder getRowTypeBuilder() { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -931,22 +905,22 @@ public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> - getRowTypeFieldBuilder() { + internalGetRowTypeFieldBuilder() { if (rowTypeBuilder_ == null) { rowTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder>( @@ -957,7 +931,7 @@ public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { } private com.google.spanner.v1.Transaction transaction_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Transaction, com.google.spanner.v1.Transaction.Builder, com.google.spanner.v1.TransactionOrBuilder> @@ -1109,7 +1083,7 @@ public Builder clearTransaction() { public com.google.spanner.v1.Transaction.Builder getTransactionBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTransactionFieldBuilder().getBuilder(); + return internalGetTransactionFieldBuilder().getBuilder(); } /** @@ -1142,14 +1116,14 @@ public com.google.spanner.v1.TransactionOrBuilder getTransactionOrBuilder() { * * .google.spanner.v1.Transaction transaction = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Transaction, com.google.spanner.v1.Transaction.Builder, com.google.spanner.v1.TransactionOrBuilder> - getTransactionFieldBuilder() { + internalGetTransactionFieldBuilder() { if (transactionBuilder_ == null) { transactionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Transaction, com.google.spanner.v1.Transaction.Builder, com.google.spanner.v1.TransactionOrBuilder>( @@ -1160,7 +1134,7 @@ public com.google.spanner.v1.TransactionOrBuilder getTransactionOrBuilder() { } private com.google.spanner.v1.StructType undeclaredParameters_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> @@ -1176,10 +1150,10 @@ public com.google.spanner.v1.TransactionOrBuilder getTransactionOrBuilder() { * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -1200,10 +1174,10 @@ public boolean hasUndeclaredParameters() { * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -1230,10 +1204,10 @@ public com.google.spanner.v1.StructType getUndeclaredParameters() { * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -1262,10 +1236,10 @@ public Builder setUndeclaredParameters(com.google.spanner.v1.StructType value) { * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -1292,10 +1266,10 @@ public Builder setUndeclaredParameters( * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -1329,10 +1303,10 @@ public Builder mergeUndeclaredParameters(com.google.spanner.v1.StructType value) * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -1358,10 +1332,10 @@ public Builder clearUndeclaredParameters() { * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -1369,7 +1343,7 @@ public Builder clearUndeclaredParameters() { public com.google.spanner.v1.StructType.Builder getUndeclaredParametersBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getUndeclaredParametersFieldBuilder().getBuilder(); + return internalGetUndeclaredParametersFieldBuilder().getBuilder(); } /** @@ -1382,10 +1356,10 @@ public com.google.spanner.v1.StructType.Builder getUndeclaredParametersBuilder() * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -1410,22 +1384,22 @@ public com.google.spanner.v1.StructTypeOrBuilder getUndeclaredParametersOrBuilde * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> - getUndeclaredParametersFieldBuilder() { + internalGetUndeclaredParametersFieldBuilder() { if (undeclaredParametersBuilder_ == null) { undeclaredParametersBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder>( @@ -1435,17 +1409,6 @@ public com.google.spanner.v1.StructTypeOrBuilder getUndeclaredParametersOrBuilde return undeclaredParametersBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ResultSetMetadata) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadataOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadataOrBuilder.java index 6211490b372..c4943749436 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadataOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/result_set.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ResultSetMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ResultSetMetadata) @@ -32,10 +34,10 @@ public interface ResultSetMetadataOrBuilder * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -52,10 +54,10 @@ public interface ResultSetMetadataOrBuilder * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -72,10 +74,10 @@ public interface ResultSetMetadataOrBuilder * set. For example, a SQL query like `"SELECT UserId, UserName FROM * Users"` could return a `row_type` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType row_type = 1; @@ -132,10 +134,10 @@ public interface ResultSetMetadataOrBuilder * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -154,10 +156,10 @@ public interface ResultSetMetadataOrBuilder * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; @@ -176,10 +178,10 @@ public interface ResultSetMetadataOrBuilder * Users where UserId = @userId and UserName = @userName "` could return a * `undeclared_parameters` value like: * - * "fields": [ - * { "name": "UserId", "type": { "code": "INT64" } }, - * { "name": "UserName", "type": { "code": "STRING" } }, - * ] + * "fields": [ + * { "name": "UserId", "type": { "code": "INT64" } }, + * { "name": "UserName", "type": { "code": "STRING" } }, + * ] * * * .google.spanner.v1.StructType undeclared_parameters = 3; diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetOrBuilder.java index 5465f016666..a3694c8fb99 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/result_set.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ResultSetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ResultSet) @@ -248,4 +250,62 @@ public interface ResultSetOrBuilder * */ com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder getPrecommitTokenOrBuilder(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + boolean hasCacheUpdate(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + com.google.spanner.v1.CacheUpdate getCacheUpdate(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java index 291fd570667..c705555c44d 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/result_set.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; -public final class ResultSetProto { +@com.google.protobuf.Generated +public final class ResultSetProto extends com.google.protobuf.GeneratedFile { private ResultSetProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ResultSetProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,19 +42,19 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ResultSet_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ResultSet_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_PartialResultSet_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_PartialResultSet_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ResultSetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ResultSetMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_ResultSetStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_ResultSetStats_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -53,42 +65,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n" - + "\"google/spanner/v1/result_set.proto\022\021go" + "\n\"google/spanner/v1/result_set.proto\022\021go" + "ogle.spanner.v1\032\037google/api/field_behavi" - + "or.proto\032\034google/protobuf/struct.proto\032\"" - + "google/spanner/v1/query_plan.proto\032#goog" - + "le/spanner/v1/transaction.proto\032\034google/spanner/v1/type.proto\"\362\001\n" - + "\tResultSet\0226\n" - + "\010metadata\030\001 \001(\0132$.google.spanner.v1.ResultSetMetadata\022(\n" - + "\004rows\030\002 \003(\0132\032.google.protobuf.ListValue\0220\n" - + "\005stats\030\003 \001(\0132!.google.spanner.v1.ResultSetStats\022Q\n" - + "\017precommit_token\030\005" - + " \001(\01323.google.spanner.v1.MultiplexedSessionPrecommitTokenB\003\340A\001\"\267\002\n" - + "\020PartialResultSet\0226\n" - + "\010metadata\030\001 \001(\0132$.google.spanner.v1.ResultSetMetadata\022&\n" - + "\006values\030\002 \003(\0132\026.google.protobuf.Value\022\025\n\r" - + "chunked_value\030\003 \001(\010\022\024\n" - + "\014resume_token\030\004 \001(\014\0220\n" - + "\005stats\030\005 \001(\0132!.google.spanner.v1.ResultSetStats\022Q\n" - + "\017precommit_token\030\010 \001(\01323.google.spanner" - + ".v1.MultiplexedSessionPrecommitTokenB\003\340A\001\022\021\n" - + "\004last\030\t \001(\010B\003\340A\001\"\267\001\n" - + "\021ResultSetMetadata\022/\n" - + "\010row_type\030\001 \001(\0132\035.google.spanner.v1.StructType\0223\n" - + "\013transaction\030\002 \001(\0132\036.google.spanner.v1.Transaction\022<\n" - + "\025undeclared_parameters\030\003" - + " \001(\0132\035.google.spanner.v1.StructType\"\271\001\n" - + "\016ResultSetStats\0220\n\n" - + "query_plan\030\001 \001(\0132\034.google.spanner.v1.QueryPlan\022,\n" - + "\013query_stats\030\002 \001(\0132\027.google.protobuf.Struct\022\031\n" - + "\017row_count_exact\030\003 \001(\003H\000\022\037\n" - + "\025row_count_lower_bound\030\004 \001(\003H\000B\013\n" - + "\trow_countB\261\001\n" - + "\025com.google.spanner.v1B\016ResultSetProtoP\001Z5" - + "cloud.google.com/go/spanner/apiv1/spanne" - + "rpb;spannerpb\252\002\027Google.Cloud.Spanner.V1\312" - + "\002\027Google\\Cloud\\Spanner\\V1\352\002\032Google::Cloud::Spanner::V1b\006proto3" + + "or.proto\032\034google/protobuf/struct.proto\032 " + + "google/spanner/v1/location.proto\032\"google" + + "/spanner/v1/query_plan.proto\032#google/spa" + + "nner/v1/transaction.proto\032\034google/spanne" + + "r/v1/type.proto\"\255\002\n\tResultSet\0226\n\010metadat" + + "a\030\001 \001(\0132$.google.spanner.v1.ResultSetMet" + + "adata\022(\n\004rows\030\002 \003(\0132\032.google.protobuf.Li" + + "stValue\0220\n\005stats\030\003 \001(\0132!.google.spanner." + + "v1.ResultSetStats\022Q\n\017precommit_token\030\005 \001" + + "(\01323.google.spanner.v1.MultiplexedSessio" + + "nPrecommitTokenB\003\340A\001\0229\n\014cache_update\030\006 \001" + + "(\0132\036.google.spanner.v1.CacheUpdateB\003\340A\001\"" + + "\362\002\n\020PartialResultSet\0226\n\010metadata\030\001 \001(\0132$" + + ".google.spanner.v1.ResultSetMetadata\022&\n\006" + + "values\030\002 \003(\0132\026.google.protobuf.Value\022\025\n\r" + + "chunked_value\030\003 \001(\010\022\024\n\014resume_token\030\004 \001(" + + "\014\0220\n\005stats\030\005 \001(\0132!.google.spanner.v1.Res" + + "ultSetStats\022Q\n\017precommit_token\030\010 \001(\01323.g" + + "oogle.spanner.v1.MultiplexedSessionPreco" + + "mmitTokenB\003\340A\001\022\021\n\004last\030\t \001(\010B\003\340A\001\0229\n\014cac" + + "he_update\030\n \001(\0132\036.google.spanner.v1.Cach" + + "eUpdateB\003\340A\001\"\267\001\n\021ResultSetMetadata\022/\n\010ro" + + "w_type\030\001 \001(\0132\035.google.spanner.v1.StructT" + + "ype\0223\n\013transaction\030\002 \001(\0132\036.google.spanne" + + "r.v1.Transaction\022<\n\025undeclared_parameter" + + "s\030\003 \001(\0132\035.google.spanner.v1.StructType\"\271" + + "\001\n\016ResultSetStats\0220\n\nquery_plan\030\001 \001(\0132\034." + + "google.spanner.v1.QueryPlan\022,\n\013query_sta" + + "ts\030\002 \001(\0132\027.google.protobuf.Struct\022\031\n\017row" + + "_count_exact\030\003 \001(\003H\000\022\037\n\025row_count_lower_" + + "bound\030\004 \001(\003H\000B\013\n\trow_countB\261\001\n\025com.googl" + + "e.spanner.v1B\016ResultSetProtoP\001Z5cloud.go" + + "ogle.com/go/spanner/apiv1/spannerpb;span" + + "nerpb\252\002\027Google.Cloud.Spanner.V1\312\002\027Google" + + "\\Cloud\\Spanner\\V1\352\002\032Google::Cloud::Spann" + + "er::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -96,22 +110,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), + com.google.spanner.v1.LocationProto.getDescriptor(), com.google.spanner.v1.QueryPlanProto.getDescriptor(), com.google.spanner.v1.TransactionProto.getDescriptor(), com.google.spanner.v1.TypeProto.getDescriptor(), }); - internal_static_google_spanner_v1_ResultSet_descriptor = - getDescriptor().getMessageTypes().get(0); + internal_static_google_spanner_v1_ResultSet_descriptor = getDescriptor().getMessageType(0); internal_static_google_spanner_v1_ResultSet_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ResultSet_descriptor, new java.lang.String[] { - "Metadata", "Rows", "Stats", "PrecommitToken", + "Metadata", "Rows", "Stats", "PrecommitToken", "CacheUpdate", }); internal_static_google_spanner_v1_PartialResultSet_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_spanner_v1_PartialResultSet_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_PartialResultSet_descriptor, new java.lang.String[] { "Metadata", @@ -121,33 +135,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Stats", "PrecommitToken", "Last", + "CacheUpdate", }); internal_static_google_spanner_v1_ResultSetMetadata_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_spanner_v1_ResultSetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ResultSetMetadata_descriptor, new java.lang.String[] { "RowType", "Transaction", "UndeclaredParameters", }); - internal_static_google_spanner_v1_ResultSetStats_descriptor = - getDescriptor().getMessageTypes().get(3); + internal_static_google_spanner_v1_ResultSetStats_descriptor = getDescriptor().getMessageType(3); internal_static_google_spanner_v1_ResultSetStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_ResultSetStats_descriptor, new java.lang.String[] { "QueryPlan", "QueryStats", "RowCountExact", "RowCountLowerBound", "RowCount", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); + descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); + com.google.spanner.v1.LocationProto.getDescriptor(); com.google.spanner.v1.QueryPlanProto.getDescriptor(); com.google.spanner.v1.TransactionProto.getDescriptor(); com.google.spanner.v1.TypeProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java index f6492060a1a..e89b89efbed 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStats.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/result_set.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,32 +30,37 @@ * * Protobuf type {@code google.spanner.v1.ResultSetStats} */ -public final class ResultSetStats extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ResultSetStats extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.ResultSetStats) ResultSetStatsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ResultSetStats"); + } + // Use ResultSetStats.newBuilder() to construct. - private ResultSetStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ResultSetStats(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ResultSetStats() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ResultSetStats(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_ResultSetStats_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_ResultSetStats_fieldAccessorTable @@ -177,11 +183,11 @@ public com.google.spanner.v1.QueryPlanOrBuilder getQueryPlanOrBuilder() { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -201,11 +207,11 @@ public boolean hasQueryStats() { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -225,11 +231,11 @@ public com.google.protobuf.Struct getQueryStats() { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -472,38 +478,38 @@ public static com.google.spanner.v1.ResultSetStats parseFrom( public static com.google.spanner.v1.ResultSetStats parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ResultSetStats parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ResultSetStats parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.ResultSetStats parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.ResultSetStats parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.ResultSetStats parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -526,7 +532,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -541,7 +547,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.ResultSetStats} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.ResultSetStats) com.google.spanner.v1.ResultSetStatsOrBuilder { @@ -551,7 +557,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.ResultSetProto .internal_static_google_spanner_v1_ResultSetStats_fieldAccessorTable @@ -565,15 +571,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getQueryPlanFieldBuilder(); - getQueryStatsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetQueryPlanFieldBuilder(); + internalGetQueryStatsFieldBuilder(); } } @@ -646,39 +652,6 @@ private void buildPartialOneofs(com.google.spanner.v1.ResultSetStats result) { result.rowCount_ = this.rowCount_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.ResultSetStats) { @@ -741,13 +714,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getQueryPlanFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetQueryPlanFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getQueryStatsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetQueryStatsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -797,7 +772,7 @@ public Builder clearRowCount() { private int bitField0_; private com.google.spanner.v1.QueryPlan queryPlan_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.QueryPlan, com.google.spanner.v1.QueryPlan.Builder, com.google.spanner.v1.QueryPlanOrBuilder> @@ -949,7 +924,7 @@ public Builder clearQueryPlan() { public com.google.spanner.v1.QueryPlan.Builder getQueryPlanBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getQueryPlanFieldBuilder().getBuilder(); + return internalGetQueryPlanFieldBuilder().getBuilder(); } /** @@ -982,14 +957,14 @@ public com.google.spanner.v1.QueryPlanOrBuilder getQueryPlanOrBuilder() { * * .google.spanner.v1.QueryPlan query_plan = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.QueryPlan, com.google.spanner.v1.QueryPlan.Builder, com.google.spanner.v1.QueryPlanOrBuilder> - getQueryPlanFieldBuilder() { + internalGetQueryPlanFieldBuilder() { if (queryPlanBuilder_ == null) { queryPlanBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.QueryPlan, com.google.spanner.v1.QueryPlan.Builder, com.google.spanner.v1.QueryPlanOrBuilder>( @@ -1000,7 +975,7 @@ public com.google.spanner.v1.QueryPlanOrBuilder getQueryPlanOrBuilder() { } private com.google.protobuf.Struct queryStats_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> @@ -1014,11 +989,11 @@ public com.google.spanner.v1.QueryPlanOrBuilder getQueryPlanOrBuilder() { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -1037,11 +1012,11 @@ public boolean hasQueryStats() { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -1064,11 +1039,11 @@ public com.google.protobuf.Struct getQueryStats() { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -1095,11 +1070,11 @@ public Builder setQueryStats(com.google.protobuf.Struct value) { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -1123,11 +1098,11 @@ public Builder setQueryStats(com.google.protobuf.Struct.Builder builderForValue) * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -1159,11 +1134,11 @@ public Builder mergeQueryStats(com.google.protobuf.Struct value) { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -1187,11 +1162,11 @@ public Builder clearQueryStats() { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -1199,7 +1174,7 @@ public Builder clearQueryStats() { public com.google.protobuf.Struct.Builder getQueryStatsBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getQueryStatsFieldBuilder().getBuilder(); + return internalGetQueryStatsFieldBuilder().getBuilder(); } /** @@ -1210,11 +1185,11 @@ public com.google.protobuf.Struct.Builder getQueryStatsBuilder() { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -1235,23 +1210,23 @@ public com.google.protobuf.StructOrBuilder getQueryStatsOrBuilder() { * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getQueryStatsFieldBuilder() { + internalGetQueryStatsFieldBuilder() { if (queryStatsBuilder_ == null) { queryStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( @@ -1411,17 +1386,6 @@ public Builder clearRowCountLowerBound() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.ResultSetStats) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java index 26f1ae7c33c..efdc44f7257 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ResultSetStatsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/result_set.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface ResultSetStatsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.ResultSetStats) @@ -72,11 +74,11 @@ public interface ResultSetStatsOrBuilder * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -93,11 +95,11 @@ public interface ResultSetStatsOrBuilder * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; @@ -114,11 +116,11 @@ public interface ResultSetStatsOrBuilder * the query is profiled. For example, a query could return the statistics as * follows: * - * { - * "rows_returned": "3", - * "elapsed_time": "1.22 secs", - * "cpu_time": "1.19 secs" - * } + * { + * "rows_returned": "3", + * "elapsed_time": "1.22 secs", + * "cpu_time": "1.19 secs" + * } * * * .google.protobuf.Struct query_stats = 2; diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequest.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequest.java index 461aa11e5d1..bedf1ee135f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequest.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.RollbackRequest} */ -public final class RollbackRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RollbackRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.RollbackRequest) RollbackRequestOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RollbackRequest"); + } + // Use RollbackRequest.newBuilder() to construct. - private RollbackRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RollbackRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private RollbackRequest() { transactionId_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RollbackRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_RollbackRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_RollbackRequest_fieldAccessorTable @@ -155,8 +161,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); } if (!transactionId_.isEmpty()) { output.writeBytes(2, transactionId_); @@ -170,8 +176,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); } if (!transactionId_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, transactionId_); @@ -249,38 +255,38 @@ public static com.google.spanner.v1.RollbackRequest parseFrom( public static com.google.spanner.v1.RollbackRequest parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.RollbackRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.RollbackRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.RollbackRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.RollbackRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.RollbackRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -303,7 +309,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -317,7 +323,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.RollbackRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.RollbackRequest) com.google.spanner.v1.RollbackRequestOrBuilder { @@ -327,7 +333,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_RollbackRequest_fieldAccessorTable @@ -339,7 +345,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.RollbackRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -393,39 +399,6 @@ private void buildPartial0(com.google.spanner.v1.RollbackRequest result) { } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.RollbackRequest) { @@ -443,7 +416,7 @@ public Builder mergeFrom(com.google.spanner.v1.RollbackRequest other) { bitField0_ |= 0x00000001; onChanged(); } - if (other.getTransactionId() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getTransactionId().isEmpty()) { setTransactionId(other.getTransactionId()); } this.mergeUnknownFields(other.getUnknownFields()); @@ -682,17 +655,6 @@ public Builder clearTransactionId() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.RollbackRequest) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequestOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequestOrBuilder.java index 8de96871f20..10871a3dfb6 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequestOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RollbackRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface RollbackRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.RollbackRequest) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RoutingHint.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RoutingHint.java new file mode 100644 index 00000000000..b4b8b40a23c --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RoutingHint.java @@ -0,0 +1,2777 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +/** + * + * + *
+ * `RoutingHint` can be optionally added to location-aware Spanner
+ * requests. It gives the server hints that can be used to route the request to
+ * an appropriate server, potentially significantly decreasing latency and
+ * improving throughput. To achieve improved performance, most fields must be
+ * filled in with accurate values.
+ *
+ * The presence of a valid `RoutingHint` tells the server that the client
+ * is location-aware.
+ *
+ * `RoutingHint` does not change the semantics of the request; it is
+ * purely a performance hint; the request will perform the same actions on the
+ * database's data as if `RoutingHint` were not present. However, if
+ * the `RoutingHint` is incomplete or incorrect, the response may include
+ * a `CacheUpdate` the client can use to correct its location cache.
+ * 
+ * + * Protobuf type {@code google.spanner.v1.RoutingHint} + */ +@com.google.protobuf.Generated +public final class RoutingHint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.RoutingHint) + RoutingHintOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RoutingHint"); + } + + // Use RoutingHint.newBuilder() to construct. + private RoutingHint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RoutingHint() { + schemaGeneration_ = com.google.protobuf.ByteString.EMPTY; + key_ = com.google.protobuf.ByteString.EMPTY; + limitKey_ = com.google.protobuf.ByteString.EMPTY; + skippedTabletUid_ = java.util.Collections.emptyList(); + clientLocation_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.RoutingHint.class, + com.google.spanner.v1.RoutingHint.Builder.class); + } + + public interface SkippedTabletOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.RoutingHint.SkippedTablet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The tablet UID of the tablet that was skipped. See `Tablet.tablet_uid`.
+     * 
+ * + * uint64 tablet_uid = 1; + * + * @return The tabletUid. + */ + long getTabletUid(); + + /** + * + * + *
+     * The incarnation of the tablet that was skipped. See `Tablet.incarnation`.
+     * 
+ * + * bytes incarnation = 2; + * + * @return The incarnation. + */ + com.google.protobuf.ByteString getIncarnation(); + } + + /** + * + * + *
+   * A tablet that was skipped by the client. See `Tablet.tablet_uid` and
+   * `Tablet.incarnation`.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.RoutingHint.SkippedTablet} + */ + public static final class SkippedTablet extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.RoutingHint.SkippedTablet) + SkippedTabletOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SkippedTablet"); + } + + // Use SkippedTablet.newBuilder() to construct. + private SkippedTablet(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SkippedTablet() { + incarnation_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_SkippedTablet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_SkippedTablet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.RoutingHint.SkippedTablet.class, + com.google.spanner.v1.RoutingHint.SkippedTablet.Builder.class); + } + + public static final int TABLET_UID_FIELD_NUMBER = 1; + private long tabletUid_ = 0L; + + /** + * + * + *
+     * The tablet UID of the tablet that was skipped. See `Tablet.tablet_uid`.
+     * 
+ * + * uint64 tablet_uid = 1; + * + * @return The tabletUid. + */ + @java.lang.Override + public long getTabletUid() { + return tabletUid_; + } + + public static final int INCARNATION_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString incarnation_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * The incarnation of the tablet that was skipped. See `Tablet.incarnation`.
+     * 
+ * + * bytes incarnation = 2; + * + * @return The incarnation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIncarnation() { + return incarnation_; + } + + 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 (tabletUid_ != 0L) { + output.writeUInt64(1, tabletUid_); + } + if (!incarnation_.isEmpty()) { + output.writeBytes(2, incarnation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tabletUid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(1, tabletUid_); + } + if (!incarnation_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, incarnation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.RoutingHint.SkippedTablet)) { + return super.equals(obj); + } + com.google.spanner.v1.RoutingHint.SkippedTablet other = + (com.google.spanner.v1.RoutingHint.SkippedTablet) obj; + + if (getTabletUid() != other.getTabletUid()) return false; + if (!getIncarnation().equals(other.getIncarnation())) 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) + TABLET_UID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTabletUid()); + hash = (37 * hash) + INCARNATION_FIELD_NUMBER; + hash = (53 * hash) + getIncarnation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.RoutingHint.SkippedTablet 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A tablet that was skipped by the client. See `Tablet.tablet_uid` and
+     * `Tablet.incarnation`.
+     * 
+ * + * Protobuf type {@code google.spanner.v1.RoutingHint.SkippedTablet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.RoutingHint.SkippedTablet) + com.google.spanner.v1.RoutingHint.SkippedTabletOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_SkippedTablet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_SkippedTablet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.RoutingHint.SkippedTablet.class, + com.google.spanner.v1.RoutingHint.SkippedTablet.Builder.class); + } + + // Construct using com.google.spanner.v1.RoutingHint.SkippedTablet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tabletUid_ = 0L; + incarnation_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_SkippedTablet_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.RoutingHint.SkippedTablet getDefaultInstanceForType() { + return com.google.spanner.v1.RoutingHint.SkippedTablet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.RoutingHint.SkippedTablet build() { + com.google.spanner.v1.RoutingHint.SkippedTablet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.RoutingHint.SkippedTablet buildPartial() { + com.google.spanner.v1.RoutingHint.SkippedTablet result = + new com.google.spanner.v1.RoutingHint.SkippedTablet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.v1.RoutingHint.SkippedTablet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tabletUid_ = tabletUid_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.incarnation_ = incarnation_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.RoutingHint.SkippedTablet) { + return mergeFrom((com.google.spanner.v1.RoutingHint.SkippedTablet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.RoutingHint.SkippedTablet other) { + if (other == com.google.spanner.v1.RoutingHint.SkippedTablet.getDefaultInstance()) + return this; + if (other.getTabletUid() != 0L) { + setTabletUid(other.getTabletUid()); + } + if (!other.getIncarnation().isEmpty()) { + setIncarnation(other.getIncarnation()); + } + 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: + { + tabletUid_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + incarnation_ = input.readBytes(); + 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 long tabletUid_; + + /** + * + * + *
+       * The tablet UID of the tablet that was skipped. See `Tablet.tablet_uid`.
+       * 
+ * + * uint64 tablet_uid = 1; + * + * @return The tabletUid. + */ + @java.lang.Override + public long getTabletUid() { + return tabletUid_; + } + + /** + * + * + *
+       * The tablet UID of the tablet that was skipped. See `Tablet.tablet_uid`.
+       * 
+ * + * uint64 tablet_uid = 1; + * + * @param value The tabletUid to set. + * @return This builder for chaining. + */ + public Builder setTabletUid(long value) { + + tabletUid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The tablet UID of the tablet that was skipped. See `Tablet.tablet_uid`.
+       * 
+ * + * uint64 tablet_uid = 1; + * + * @return This builder for chaining. + */ + public Builder clearTabletUid() { + bitField0_ = (bitField0_ & ~0x00000001); + tabletUid_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString incarnation_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+       * The incarnation of the tablet that was skipped. See `Tablet.incarnation`.
+       * 
+ * + * bytes incarnation = 2; + * + * @return The incarnation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIncarnation() { + return incarnation_; + } + + /** + * + * + *
+       * The incarnation of the tablet that was skipped. See `Tablet.incarnation`.
+       * 
+ * + * bytes incarnation = 2; + * + * @param value The incarnation to set. + * @return This builder for chaining. + */ + public Builder setIncarnation(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + incarnation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The incarnation of the tablet that was skipped. See `Tablet.incarnation`.
+       * 
+ * + * bytes incarnation = 2; + * + * @return This builder for chaining. + */ + public Builder clearIncarnation() { + bitField0_ = (bitField0_ & ~0x00000002); + incarnation_ = getDefaultInstance().getIncarnation(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.RoutingHint.SkippedTablet) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.RoutingHint.SkippedTablet) + private static final com.google.spanner.v1.RoutingHint.SkippedTablet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.RoutingHint.SkippedTablet(); + } + + public static com.google.spanner.v1.RoutingHint.SkippedTablet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SkippedTablet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.RoutingHint.SkippedTablet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int OPERATION_UID_FIELD_NUMBER = 1; + private long operationUid_ = 0L; + + /** + * + * + *
+   * A session-scoped unique ID for the operation, computed client-side.
+   * Requests with the same `operation_uid` should have a shared 'shape',
+   * meaning that some fields are expected to be the same, such as the SQL
+   * query, the target table/columns (for reads) etc. Requests with the same
+   * `operation_uid` are meant to differ only in fields like keys/key
+   * ranges/query parameters, transaction IDs, etc.
+   *
+   * `operation_uid` must be non-zero for `RoutingHint` to be valid.
+   * 
+ * + * uint64 operation_uid = 1; + * + * @return The operationUid. + */ + @java.lang.Override + public long getOperationUid() { + return operationUid_; + } + + public static final int DATABASE_ID_FIELD_NUMBER = 2; + private long databaseId_ = 0L; + + /** + * + * + *
+   * The database ID of the database being accessed, see
+   * `CacheUpdate.database_id`. Should match the cache entries that were used
+   * to generate the rest of the fields in this `RoutingHint`.
+   * 
+ * + * uint64 database_id = 2; + * + * @return The databaseId. + */ + @java.lang.Override + public long getDatabaseId() { + return databaseId_; + } + + public static final int SCHEMA_GENERATION_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString schemaGeneration_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * The schema generation of the recipe that was used to generate `key` and
+   * `limit_key`. See also `RecipeList.schema_generation`.
+   * 
+ * + * bytes schema_generation = 3; + * + * @return The schemaGeneration. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaGeneration() { + return schemaGeneration_; + } + + public static final int KEY_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * The key / key range that this request accesses. For operations that
+   * access a single key, `key` should be set and `limit_key` should be empty.
+   * For operations that access a key range, `key` and `limit_key` should both
+   * be set, to the inclusive start and exclusive end of the range respectively.
+   *
+   * The keys are encoded in "sortable string format" (ssformat), using a
+   * `KeyRecipe` that is appropriate for the request. See `KeyRecipe` for more
+   * details.
+   * 
+ * + * bytes key = 4; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + public static final int LIMIT_KEY_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString limitKey_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * If this request targets a key range, this is the exclusive end of the
+   * range. See `key` for more details.
+   * 
+ * + * bytes limit_key = 5; + * + * @return The limitKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLimitKey() { + return limitKey_; + } + + public static final int GROUP_UID_FIELD_NUMBER = 6; + private long groupUid_ = 0L; + + /** + * + * + *
+   * The group UID of the group that the client believes serves the range
+   * defined by `key` and `limit_key`. See `Range.group_uid` for more details.
+   * 
+ * + * uint64 group_uid = 6; + * + * @return The groupUid. + */ + @java.lang.Override + public long getGroupUid() { + return groupUid_; + } + + public static final int SPLIT_ID_FIELD_NUMBER = 7; + private long splitId_ = 0L; + + /** + * + * + *
+   * The split ID of the split that the client believes contains the range
+   * defined by `key` and `limit_key`. See `Range.split_id` for more details.
+   * 
+ * + * uint64 split_id = 7; + * + * @return The splitId. + */ + @java.lang.Override + public long getSplitId() { + return splitId_; + } + + public static final int TABLET_UID_FIELD_NUMBER = 8; + private long tabletUid_ = 0L; + + /** + * + * + *
+   * The tablet UID of the tablet from group `group_uid` that the client
+   * believes is best to serve this request. See `Group.local_tablet_uids` and
+   * `Group.leader_tablet_uid`.
+   * 
+ * + * uint64 tablet_uid = 8; + * + * @return The tabletUid. + */ + @java.lang.Override + public long getTabletUid() { + return tabletUid_; + } + + public static final int SKIPPED_TABLET_UID_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List skippedTabletUid_; + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + @java.lang.Override + public java.util.List getSkippedTabletUidList() { + return skippedTabletUid_; + } + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + @java.lang.Override + public java.util.List + getSkippedTabletUidOrBuilderList() { + return skippedTabletUid_; + } + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + @java.lang.Override + public int getSkippedTabletUidCount() { + return skippedTabletUid_.size(); + } + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHint.SkippedTablet getSkippedTabletUid(int index) { + return skippedTabletUid_.get(index); + } + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + @java.lang.Override + public com.google.spanner.v1.RoutingHint.SkippedTabletOrBuilder getSkippedTabletUidOrBuilder( + int index) { + return skippedTabletUid_.get(index); + } + + public static final int CLIENT_LOCATION_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientLocation_ = ""; + + /** + * + * + *
+   * If present, the client's current location. This should be the name of a
+   * Google Cloud zone or region, such as "us-central1".
+   *
+   * If absent, the client's location will be assumed to be the same as the
+   * location of the server the client ends up connected to.
+   *
+   * Locations are primarily valuable for clients that connect from regions
+   * other than the ones that contain the Spanner database.
+   * 
+ * + * string client_location = 10; + * + * @return The clientLocation. + */ + @java.lang.Override + public java.lang.String getClientLocation() { + java.lang.Object ref = clientLocation_; + 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(); + clientLocation_ = s; + return s; + } + } + + /** + * + * + *
+   * If present, the client's current location. This should be the name of a
+   * Google Cloud zone or region, such as "us-central1".
+   *
+   * If absent, the client's location will be assumed to be the same as the
+   * location of the server the client ends up connected to.
+   *
+   * Locations are primarily valuable for clients that connect from regions
+   * other than the ones that contain the Spanner database.
+   * 
+ * + * string client_location = 10; + * + * @return The bytes for clientLocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientLocationBytes() { + java.lang.Object ref = clientLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientLocation_ = 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 (operationUid_ != 0L) { + output.writeUInt64(1, operationUid_); + } + if (databaseId_ != 0L) { + output.writeUInt64(2, databaseId_); + } + if (!schemaGeneration_.isEmpty()) { + output.writeBytes(3, schemaGeneration_); + } + if (!key_.isEmpty()) { + output.writeBytes(4, key_); + } + if (!limitKey_.isEmpty()) { + output.writeBytes(5, limitKey_); + } + if (groupUid_ != 0L) { + output.writeUInt64(6, groupUid_); + } + if (splitId_ != 0L) { + output.writeUInt64(7, splitId_); + } + if (tabletUid_ != 0L) { + output.writeUInt64(8, tabletUid_); + } + for (int i = 0; i < skippedTabletUid_.size(); i++) { + output.writeMessage(9, skippedTabletUid_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientLocation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, clientLocation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (operationUid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(1, operationUid_); + } + if (databaseId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(2, databaseId_); + } + if (!schemaGeneration_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, schemaGeneration_); + } + if (!key_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, key_); + } + if (!limitKey_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, limitKey_); + } + if (groupUid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(6, groupUid_); + } + if (splitId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(7, splitId_); + } + if (tabletUid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(8, tabletUid_); + } + for (int i = 0; i < skippedTabletUid_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, skippedTabletUid_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientLocation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, clientLocation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.RoutingHint)) { + return super.equals(obj); + } + com.google.spanner.v1.RoutingHint other = (com.google.spanner.v1.RoutingHint) obj; + + if (getOperationUid() != other.getOperationUid()) return false; + if (getDatabaseId() != other.getDatabaseId()) return false; + if (!getSchemaGeneration().equals(other.getSchemaGeneration())) return false; + if (!getKey().equals(other.getKey())) return false; + if (!getLimitKey().equals(other.getLimitKey())) return false; + if (getGroupUid() != other.getGroupUid()) return false; + if (getSplitId() != other.getSplitId()) return false; + if (getTabletUid() != other.getTabletUid()) return false; + if (!getSkippedTabletUidList().equals(other.getSkippedTabletUidList())) return false; + if (!getClientLocation().equals(other.getClientLocation())) 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_UID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOperationUid()); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDatabaseId()); + hash = (37 * hash) + SCHEMA_GENERATION_FIELD_NUMBER; + hash = (53 * hash) + getSchemaGeneration().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + LIMIT_KEY_FIELD_NUMBER; + hash = (53 * hash) + getLimitKey().hashCode(); + hash = (37 * hash) + GROUP_UID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGroupUid()); + hash = (37 * hash) + SPLIT_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSplitId()); + hash = (37 * hash) + TABLET_UID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTabletUid()); + if (getSkippedTabletUidCount() > 0) { + hash = (37 * hash) + SKIPPED_TABLET_UID_FIELD_NUMBER; + hash = (53 * hash) + getSkippedTabletUidList().hashCode(); + } + hash = (37 * hash) + CLIENT_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getClientLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.RoutingHint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RoutingHint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RoutingHint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.RoutingHint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RoutingHint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RoutingHint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.RoutingHint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.RoutingHint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.RoutingHint 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * `RoutingHint` can be optionally added to location-aware Spanner
+   * requests. It gives the server hints that can be used to route the request to
+   * an appropriate server, potentially significantly decreasing latency and
+   * improving throughput. To achieve improved performance, most fields must be
+   * filled in with accurate values.
+   *
+   * The presence of a valid `RoutingHint` tells the server that the client
+   * is location-aware.
+   *
+   * `RoutingHint` does not change the semantics of the request; it is
+   * purely a performance hint; the request will perform the same actions on the
+   * database's data as if `RoutingHint` were not present. However, if
+   * the `RoutingHint` is incomplete or incorrect, the response may include
+   * a `CacheUpdate` the client can use to correct its location cache.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.RoutingHint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.RoutingHint) + com.google.spanner.v1.RoutingHintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.RoutingHint.class, + com.google.spanner.v1.RoutingHint.Builder.class); + } + + // Construct using com.google.spanner.v1.RoutingHint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operationUid_ = 0L; + databaseId_ = 0L; + schemaGeneration_ = com.google.protobuf.ByteString.EMPTY; + key_ = com.google.protobuf.ByteString.EMPTY; + limitKey_ = com.google.protobuf.ByteString.EMPTY; + groupUid_ = 0L; + splitId_ = 0L; + tabletUid_ = 0L; + if (skippedTabletUidBuilder_ == null) { + skippedTabletUid_ = java.util.Collections.emptyList(); + } else { + skippedTabletUid_ = null; + skippedTabletUidBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + clientLocation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_RoutingHint_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.RoutingHint getDefaultInstanceForType() { + return com.google.spanner.v1.RoutingHint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.RoutingHint build() { + com.google.spanner.v1.RoutingHint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.RoutingHint buildPartial() { + com.google.spanner.v1.RoutingHint result = new com.google.spanner.v1.RoutingHint(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.v1.RoutingHint result) { + if (skippedTabletUidBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + skippedTabletUid_ = java.util.Collections.unmodifiableList(skippedTabletUid_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.skippedTabletUid_ = skippedTabletUid_; + } else { + result.skippedTabletUid_ = skippedTabletUidBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.v1.RoutingHint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operationUid_ = operationUid_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.databaseId_ = databaseId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.schemaGeneration_ = schemaGeneration_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.limitKey_ = limitKey_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.groupUid_ = groupUid_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.splitId_ = splitId_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.tabletUid_ = tabletUid_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.clientLocation_ = clientLocation_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.RoutingHint) { + return mergeFrom((com.google.spanner.v1.RoutingHint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.RoutingHint other) { + if (other == com.google.spanner.v1.RoutingHint.getDefaultInstance()) return this; + if (other.getOperationUid() != 0L) { + setOperationUid(other.getOperationUid()); + } + if (other.getDatabaseId() != 0L) { + setDatabaseId(other.getDatabaseId()); + } + if (!other.getSchemaGeneration().isEmpty()) { + setSchemaGeneration(other.getSchemaGeneration()); + } + if (!other.getKey().isEmpty()) { + setKey(other.getKey()); + } + if (!other.getLimitKey().isEmpty()) { + setLimitKey(other.getLimitKey()); + } + if (other.getGroupUid() != 0L) { + setGroupUid(other.getGroupUid()); + } + if (other.getSplitId() != 0L) { + setSplitId(other.getSplitId()); + } + if (other.getTabletUid() != 0L) { + setTabletUid(other.getTabletUid()); + } + if (skippedTabletUidBuilder_ == null) { + if (!other.skippedTabletUid_.isEmpty()) { + if (skippedTabletUid_.isEmpty()) { + skippedTabletUid_ = other.skippedTabletUid_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureSkippedTabletUidIsMutable(); + skippedTabletUid_.addAll(other.skippedTabletUid_); + } + onChanged(); + } + } else { + if (!other.skippedTabletUid_.isEmpty()) { + if (skippedTabletUidBuilder_.isEmpty()) { + skippedTabletUidBuilder_.dispose(); + skippedTabletUidBuilder_ = null; + skippedTabletUid_ = other.skippedTabletUid_; + bitField0_ = (bitField0_ & ~0x00000100); + skippedTabletUidBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSkippedTabletUidFieldBuilder() + : null; + } else { + skippedTabletUidBuilder_.addAllMessages(other.skippedTabletUid_); + } + } + } + if (!other.getClientLocation().isEmpty()) { + clientLocation_ = other.clientLocation_; + bitField0_ |= 0x00000200; + 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: + { + operationUid_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + databaseId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + schemaGeneration_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + key_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + limitKey_ = input.readBytes(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + groupUid_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + splitId_ = input.readUInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + tabletUid_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: + { + com.google.spanner.v1.RoutingHint.SkippedTablet m = + input.readMessage( + com.google.spanner.v1.RoutingHint.SkippedTablet.parser(), + extensionRegistry); + if (skippedTabletUidBuilder_ == null) { + ensureSkippedTabletUidIsMutable(); + skippedTabletUid_.add(m); + } else { + skippedTabletUidBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + clientLocation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + 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 long operationUid_; + + /** + * + * + *
+     * A session-scoped unique ID for the operation, computed client-side.
+     * Requests with the same `operation_uid` should have a shared 'shape',
+     * meaning that some fields are expected to be the same, such as the SQL
+     * query, the target table/columns (for reads) etc. Requests with the same
+     * `operation_uid` are meant to differ only in fields like keys/key
+     * ranges/query parameters, transaction IDs, etc.
+     *
+     * `operation_uid` must be non-zero for `RoutingHint` to be valid.
+     * 
+ * + * uint64 operation_uid = 1; + * + * @return The operationUid. + */ + @java.lang.Override + public long getOperationUid() { + return operationUid_; + } + + /** + * + * + *
+     * A session-scoped unique ID for the operation, computed client-side.
+     * Requests with the same `operation_uid` should have a shared 'shape',
+     * meaning that some fields are expected to be the same, such as the SQL
+     * query, the target table/columns (for reads) etc. Requests with the same
+     * `operation_uid` are meant to differ only in fields like keys/key
+     * ranges/query parameters, transaction IDs, etc.
+     *
+     * `operation_uid` must be non-zero for `RoutingHint` to be valid.
+     * 
+ * + * uint64 operation_uid = 1; + * + * @param value The operationUid to set. + * @return This builder for chaining. + */ + public Builder setOperationUid(long value) { + + operationUid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * A session-scoped unique ID for the operation, computed client-side.
+     * Requests with the same `operation_uid` should have a shared 'shape',
+     * meaning that some fields are expected to be the same, such as the SQL
+     * query, the target table/columns (for reads) etc. Requests with the same
+     * `operation_uid` are meant to differ only in fields like keys/key
+     * ranges/query parameters, transaction IDs, etc.
+     *
+     * `operation_uid` must be non-zero for `RoutingHint` to be valid.
+     * 
+ * + * uint64 operation_uid = 1; + * + * @return This builder for chaining. + */ + public Builder clearOperationUid() { + bitField0_ = (bitField0_ & ~0x00000001); + operationUid_ = 0L; + onChanged(); + return this; + } + + private long databaseId_; + + /** + * + * + *
+     * The database ID of the database being accessed, see
+     * `CacheUpdate.database_id`. Should match the cache entries that were used
+     * to generate the rest of the fields in this `RoutingHint`.
+     * 
+ * + * uint64 database_id = 2; + * + * @return The databaseId. + */ + @java.lang.Override + public long getDatabaseId() { + return databaseId_; + } + + /** + * + * + *
+     * The database ID of the database being accessed, see
+     * `CacheUpdate.database_id`. Should match the cache entries that were used
+     * to generate the rest of the fields in this `RoutingHint`.
+     * 
+ * + * uint64 database_id = 2; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(long value) { + + databaseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The database ID of the database being accessed, see
+     * `CacheUpdate.database_id`. Should match the cache entries that were used
+     * to generate the rest of the fields in this `RoutingHint`.
+     * 
+ * + * uint64 database_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + bitField0_ = (bitField0_ & ~0x00000002); + databaseId_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString schemaGeneration_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * The schema generation of the recipe that was used to generate `key` and
+     * `limit_key`. See also `RecipeList.schema_generation`.
+     * 
+ * + * bytes schema_generation = 3; + * + * @return The schemaGeneration. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaGeneration() { + return schemaGeneration_; + } + + /** + * + * + *
+     * The schema generation of the recipe that was used to generate `key` and
+     * `limit_key`. See also `RecipeList.schema_generation`.
+     * 
+ * + * bytes schema_generation = 3; + * + * @param value The schemaGeneration to set. + * @return This builder for chaining. + */ + public Builder setSchemaGeneration(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + schemaGeneration_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The schema generation of the recipe that was used to generate `key` and
+     * `limit_key`. See also `RecipeList.schema_generation`.
+     * 
+ * + * bytes schema_generation = 3; + * + * @return This builder for chaining. + */ + public Builder clearSchemaGeneration() { + bitField0_ = (bitField0_ & ~0x00000004); + schemaGeneration_ = getDefaultInstance().getSchemaGeneration(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * The key / key range that this request accesses. For operations that
+     * access a single key, `key` should be set and `limit_key` should be empty.
+     * For operations that access a key range, `key` and `limit_key` should both
+     * be set, to the inclusive start and exclusive end of the range respectively.
+     *
+     * The keys are encoded in "sortable string format" (ssformat), using a
+     * `KeyRecipe` that is appropriate for the request. See `KeyRecipe` for more
+     * details.
+     * 
+ * + * bytes key = 4; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + /** + * + * + *
+     * The key / key range that this request accesses. For operations that
+     * access a single key, `key` should be set and `limit_key` should be empty.
+     * For operations that access a key range, `key` and `limit_key` should both
+     * be set, to the inclusive start and exclusive end of the range respectively.
+     *
+     * The keys are encoded in "sortable string format" (ssformat), using a
+     * `KeyRecipe` that is appropriate for the request. See `KeyRecipe` for more
+     * details.
+     * 
+ * + * bytes key = 4; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The key / key range that this request accesses. For operations that
+     * access a single key, `key` should be set and `limit_key` should be empty.
+     * For operations that access a key range, `key` and `limit_key` should both
+     * be set, to the inclusive start and exclusive end of the range respectively.
+     *
+     * The keys are encoded in "sortable string format" (ssformat), using a
+     * `KeyRecipe` that is appropriate for the request. See `KeyRecipe` for more
+     * details.
+     * 
+ * + * bytes key = 4; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000008); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString limitKey_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * If this request targets a key range, this is the exclusive end of the
+     * range. See `key` for more details.
+     * 
+ * + * bytes limit_key = 5; + * + * @return The limitKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLimitKey() { + return limitKey_; + } + + /** + * + * + *
+     * If this request targets a key range, this is the exclusive end of the
+     * range. See `key` for more details.
+     * 
+ * + * bytes limit_key = 5; + * + * @param value The limitKey to set. + * @return This builder for chaining. + */ + public Builder setLimitKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + limitKey_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * If this request targets a key range, this is the exclusive end of the
+     * range. See `key` for more details.
+     * 
+ * + * bytes limit_key = 5; + * + * @return This builder for chaining. + */ + public Builder clearLimitKey() { + bitField0_ = (bitField0_ & ~0x00000010); + limitKey_ = getDefaultInstance().getLimitKey(); + onChanged(); + return this; + } + + private long groupUid_; + + /** + * + * + *
+     * The group UID of the group that the client believes serves the range
+     * defined by `key` and `limit_key`. See `Range.group_uid` for more details.
+     * 
+ * + * uint64 group_uid = 6; + * + * @return The groupUid. + */ + @java.lang.Override + public long getGroupUid() { + return groupUid_; + } + + /** + * + * + *
+     * The group UID of the group that the client believes serves the range
+     * defined by `key` and `limit_key`. See `Range.group_uid` for more details.
+     * 
+ * + * uint64 group_uid = 6; + * + * @param value The groupUid to set. + * @return This builder for chaining. + */ + public Builder setGroupUid(long value) { + + groupUid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * The group UID of the group that the client believes serves the range
+     * defined by `key` and `limit_key`. See `Range.group_uid` for more details.
+     * 
+ * + * uint64 group_uid = 6; + * + * @return This builder for chaining. + */ + public Builder clearGroupUid() { + bitField0_ = (bitField0_ & ~0x00000020); + groupUid_ = 0L; + onChanged(); + return this; + } + + private long splitId_; + + /** + * + * + *
+     * The split ID of the split that the client believes contains the range
+     * defined by `key` and `limit_key`. See `Range.split_id` for more details.
+     * 
+ * + * uint64 split_id = 7; + * + * @return The splitId. + */ + @java.lang.Override + public long getSplitId() { + return splitId_; + } + + /** + * + * + *
+     * The split ID of the split that the client believes contains the range
+     * defined by `key` and `limit_key`. See `Range.split_id` for more details.
+     * 
+ * + * uint64 split_id = 7; + * + * @param value The splitId to set. + * @return This builder for chaining. + */ + public Builder setSplitId(long value) { + + splitId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * The split ID of the split that the client believes contains the range
+     * defined by `key` and `limit_key`. See `Range.split_id` for more details.
+     * 
+ * + * uint64 split_id = 7; + * + * @return This builder for chaining. + */ + public Builder clearSplitId() { + bitField0_ = (bitField0_ & ~0x00000040); + splitId_ = 0L; + onChanged(); + return this; + } + + private long tabletUid_; + + /** + * + * + *
+     * The tablet UID of the tablet from group `group_uid` that the client
+     * believes is best to serve this request. See `Group.local_tablet_uids` and
+     * `Group.leader_tablet_uid`.
+     * 
+ * + * uint64 tablet_uid = 8; + * + * @return The tabletUid. + */ + @java.lang.Override + public long getTabletUid() { + return tabletUid_; + } + + /** + * + * + *
+     * The tablet UID of the tablet from group `group_uid` that the client
+     * believes is best to serve this request. See `Group.local_tablet_uids` and
+     * `Group.leader_tablet_uid`.
+     * 
+ * + * uint64 tablet_uid = 8; + * + * @param value The tabletUid to set. + * @return This builder for chaining. + */ + public Builder setTabletUid(long value) { + + tabletUid_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * The tablet UID of the tablet from group `group_uid` that the client
+     * believes is best to serve this request. See `Group.local_tablet_uids` and
+     * `Group.leader_tablet_uid`.
+     * 
+ * + * uint64 tablet_uid = 8; + * + * @return This builder for chaining. + */ + public Builder clearTabletUid() { + bitField0_ = (bitField0_ & ~0x00000080); + tabletUid_ = 0L; + onChanged(); + return this; + } + + private java.util.List skippedTabletUid_ = + java.util.Collections.emptyList(); + + private void ensureSkippedTabletUidIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + skippedTabletUid_ = + new java.util.ArrayList( + skippedTabletUid_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.RoutingHint.SkippedTablet, + com.google.spanner.v1.RoutingHint.SkippedTablet.Builder, + com.google.spanner.v1.RoutingHint.SkippedTabletOrBuilder> + skippedTabletUidBuilder_; + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public java.util.List + getSkippedTabletUidList() { + if (skippedTabletUidBuilder_ == null) { + return java.util.Collections.unmodifiableList(skippedTabletUid_); + } else { + return skippedTabletUidBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public int getSkippedTabletUidCount() { + if (skippedTabletUidBuilder_ == null) { + return skippedTabletUid_.size(); + } else { + return skippedTabletUidBuilder_.getCount(); + } + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public com.google.spanner.v1.RoutingHint.SkippedTablet getSkippedTabletUid(int index) { + if (skippedTabletUidBuilder_ == null) { + return skippedTabletUid_.get(index); + } else { + return skippedTabletUidBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public Builder setSkippedTabletUid( + int index, com.google.spanner.v1.RoutingHint.SkippedTablet value) { + if (skippedTabletUidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkippedTabletUidIsMutable(); + skippedTabletUid_.set(index, value); + onChanged(); + } else { + skippedTabletUidBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public Builder setSkippedTabletUid( + int index, com.google.spanner.v1.RoutingHint.SkippedTablet.Builder builderForValue) { + if (skippedTabletUidBuilder_ == null) { + ensureSkippedTabletUidIsMutable(); + skippedTabletUid_.set(index, builderForValue.build()); + onChanged(); + } else { + skippedTabletUidBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public Builder addSkippedTabletUid(com.google.spanner.v1.RoutingHint.SkippedTablet value) { + if (skippedTabletUidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkippedTabletUidIsMutable(); + skippedTabletUid_.add(value); + onChanged(); + } else { + skippedTabletUidBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public Builder addSkippedTabletUid( + int index, com.google.spanner.v1.RoutingHint.SkippedTablet value) { + if (skippedTabletUidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkippedTabletUidIsMutable(); + skippedTabletUid_.add(index, value); + onChanged(); + } else { + skippedTabletUidBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public Builder addSkippedTabletUid( + com.google.spanner.v1.RoutingHint.SkippedTablet.Builder builderForValue) { + if (skippedTabletUidBuilder_ == null) { + ensureSkippedTabletUidIsMutable(); + skippedTabletUid_.add(builderForValue.build()); + onChanged(); + } else { + skippedTabletUidBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public Builder addSkippedTabletUid( + int index, com.google.spanner.v1.RoutingHint.SkippedTablet.Builder builderForValue) { + if (skippedTabletUidBuilder_ == null) { + ensureSkippedTabletUidIsMutable(); + skippedTabletUid_.add(index, builderForValue.build()); + onChanged(); + } else { + skippedTabletUidBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public Builder addAllSkippedTabletUid( + java.lang.Iterable values) { + if (skippedTabletUidBuilder_ == null) { + ensureSkippedTabletUidIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, skippedTabletUid_); + onChanged(); + } else { + skippedTabletUidBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public Builder clearSkippedTabletUid() { + if (skippedTabletUidBuilder_ == null) { + skippedTabletUid_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + skippedTabletUidBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public Builder removeSkippedTabletUid(int index) { + if (skippedTabletUidBuilder_ == null) { + ensureSkippedTabletUidIsMutable(); + skippedTabletUid_.remove(index); + onChanged(); + } else { + skippedTabletUidBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public com.google.spanner.v1.RoutingHint.SkippedTablet.Builder getSkippedTabletUidBuilder( + int index) { + return internalGetSkippedTabletUidFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public com.google.spanner.v1.RoutingHint.SkippedTabletOrBuilder getSkippedTabletUidOrBuilder( + int index) { + if (skippedTabletUidBuilder_ == null) { + return skippedTabletUid_.get(index); + } else { + return skippedTabletUidBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public java.util.List + getSkippedTabletUidOrBuilderList() { + if (skippedTabletUidBuilder_ != null) { + return skippedTabletUidBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(skippedTabletUid_); + } + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public com.google.spanner.v1.RoutingHint.SkippedTablet.Builder addSkippedTabletUidBuilder() { + return internalGetSkippedTabletUidFieldBuilder() + .addBuilder(com.google.spanner.v1.RoutingHint.SkippedTablet.getDefaultInstance()); + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public com.google.spanner.v1.RoutingHint.SkippedTablet.Builder addSkippedTabletUidBuilder( + int index) { + return internalGetSkippedTabletUidFieldBuilder() + .addBuilder(index, com.google.spanner.v1.RoutingHint.SkippedTablet.getDefaultInstance()); + } + + /** + * + * + *
+     * If the client had multiple options for tablet selection, and some of its
+     * first choices were unhealthy (e.g., the server is unreachable, or
+     * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+     * tablets, with their incarnations. The server may include a `CacheUpdate`
+     * with new locations for those tablets.
+     * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + public java.util.List + getSkippedTabletUidBuilderList() { + return internalGetSkippedTabletUidFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.RoutingHint.SkippedTablet, + com.google.spanner.v1.RoutingHint.SkippedTablet.Builder, + com.google.spanner.v1.RoutingHint.SkippedTabletOrBuilder> + internalGetSkippedTabletUidFieldBuilder() { + if (skippedTabletUidBuilder_ == null) { + skippedTabletUidBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.spanner.v1.RoutingHint.SkippedTablet, + com.google.spanner.v1.RoutingHint.SkippedTablet.Builder, + com.google.spanner.v1.RoutingHint.SkippedTabletOrBuilder>( + skippedTabletUid_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + skippedTabletUid_ = null; + } + return skippedTabletUidBuilder_; + } + + private java.lang.Object clientLocation_ = ""; + + /** + * + * + *
+     * If present, the client's current location. This should be the name of a
+     * Google Cloud zone or region, such as "us-central1".
+     *
+     * If absent, the client's location will be assumed to be the same as the
+     * location of the server the client ends up connected to.
+     *
+     * Locations are primarily valuable for clients that connect from regions
+     * other than the ones that contain the Spanner database.
+     * 
+ * + * string client_location = 10; + * + * @return The clientLocation. + */ + public java.lang.String getClientLocation() { + java.lang.Object ref = clientLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * If present, the client's current location. This should be the name of a
+     * Google Cloud zone or region, such as "us-central1".
+     *
+     * If absent, the client's location will be assumed to be the same as the
+     * location of the server the client ends up connected to.
+     *
+     * Locations are primarily valuable for clients that connect from regions
+     * other than the ones that contain the Spanner database.
+     * 
+ * + * string client_location = 10; + * + * @return The bytes for clientLocation. + */ + public com.google.protobuf.ByteString getClientLocationBytes() { + java.lang.Object ref = clientLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * If present, the client's current location. This should be the name of a
+     * Google Cloud zone or region, such as "us-central1".
+     *
+     * If absent, the client's location will be assumed to be the same as the
+     * location of the server the client ends up connected to.
+     *
+     * Locations are primarily valuable for clients that connect from regions
+     * other than the ones that contain the Spanner database.
+     * 
+ * + * string client_location = 10; + * + * @param value The clientLocation to set. + * @return This builder for chaining. + */ + public Builder setClientLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientLocation_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * If present, the client's current location. This should be the name of a
+     * Google Cloud zone or region, such as "us-central1".
+     *
+     * If absent, the client's location will be assumed to be the same as the
+     * location of the server the client ends up connected to.
+     *
+     * Locations are primarily valuable for clients that connect from regions
+     * other than the ones that contain the Spanner database.
+     * 
+ * + * string client_location = 10; + * + * @return This builder for chaining. + */ + public Builder clearClientLocation() { + clientLocation_ = getDefaultInstance().getClientLocation(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * If present, the client's current location. This should be the name of a
+     * Google Cloud zone or region, such as "us-central1".
+     *
+     * If absent, the client's location will be assumed to be the same as the
+     * location of the server the client ends up connected to.
+     *
+     * Locations are primarily valuable for clients that connect from regions
+     * other than the ones that contain the Spanner database.
+     * 
+ * + * string client_location = 10; + * + * @param value The bytes for clientLocation to set. + * @return This builder for chaining. + */ + public Builder setClientLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientLocation_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.RoutingHint) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.RoutingHint) + private static final com.google.spanner.v1.RoutingHint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.RoutingHint(); + } + + public static com.google.spanner.v1.RoutingHint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RoutingHint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.RoutingHint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RoutingHintOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RoutingHintOrBuilder.java new file mode 100644 index 00000000000..eb685eaa894 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/RoutingHintOrBuilder.java @@ -0,0 +1,270 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +@com.google.protobuf.Generated +public interface RoutingHintOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.RoutingHint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A session-scoped unique ID for the operation, computed client-side.
+   * Requests with the same `operation_uid` should have a shared 'shape',
+   * meaning that some fields are expected to be the same, such as the SQL
+   * query, the target table/columns (for reads) etc. Requests with the same
+   * `operation_uid` are meant to differ only in fields like keys/key
+   * ranges/query parameters, transaction IDs, etc.
+   *
+   * `operation_uid` must be non-zero for `RoutingHint` to be valid.
+   * 
+ * + * uint64 operation_uid = 1; + * + * @return The operationUid. + */ + long getOperationUid(); + + /** + * + * + *
+   * The database ID of the database being accessed, see
+   * `CacheUpdate.database_id`. Should match the cache entries that were used
+   * to generate the rest of the fields in this `RoutingHint`.
+   * 
+ * + * uint64 database_id = 2; + * + * @return The databaseId. + */ + long getDatabaseId(); + + /** + * + * + *
+   * The schema generation of the recipe that was used to generate `key` and
+   * `limit_key`. See also `RecipeList.schema_generation`.
+   * 
+ * + * bytes schema_generation = 3; + * + * @return The schemaGeneration. + */ + com.google.protobuf.ByteString getSchemaGeneration(); + + /** + * + * + *
+   * The key / key range that this request accesses. For operations that
+   * access a single key, `key` should be set and `limit_key` should be empty.
+   * For operations that access a key range, `key` and `limit_key` should both
+   * be set, to the inclusive start and exclusive end of the range respectively.
+   *
+   * The keys are encoded in "sortable string format" (ssformat), using a
+   * `KeyRecipe` that is appropriate for the request. See `KeyRecipe` for more
+   * details.
+   * 
+ * + * bytes key = 4; + * + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * + * + *
+   * If this request targets a key range, this is the exclusive end of the
+   * range. See `key` for more details.
+   * 
+ * + * bytes limit_key = 5; + * + * @return The limitKey. + */ + com.google.protobuf.ByteString getLimitKey(); + + /** + * + * + *
+   * The group UID of the group that the client believes serves the range
+   * defined by `key` and `limit_key`. See `Range.group_uid` for more details.
+   * 
+ * + * uint64 group_uid = 6; + * + * @return The groupUid. + */ + long getGroupUid(); + + /** + * + * + *
+   * The split ID of the split that the client believes contains the range
+   * defined by `key` and `limit_key`. See `Range.split_id` for more details.
+   * 
+ * + * uint64 split_id = 7; + * + * @return The splitId. + */ + long getSplitId(); + + /** + * + * + *
+   * The tablet UID of the tablet from group `group_uid` that the client
+   * believes is best to serve this request. See `Group.local_tablet_uids` and
+   * `Group.leader_tablet_uid`.
+   * 
+ * + * uint64 tablet_uid = 8; + * + * @return The tabletUid. + */ + long getTabletUid(); + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + java.util.List getSkippedTabletUidList(); + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + com.google.spanner.v1.RoutingHint.SkippedTablet getSkippedTabletUid(int index); + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + int getSkippedTabletUidCount(); + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + java.util.List + getSkippedTabletUidOrBuilderList(); + + /** + * + * + *
+   * If the client had multiple options for tablet selection, and some of its
+   * first choices were unhealthy (e.g., the server is unreachable, or
+   * `Tablet.skip` is true), this field will contain the tablet UIDs of those
+   * tablets, with their incarnations. The server may include a `CacheUpdate`
+   * with new locations for those tablets.
+   * 
+ * + * repeated .google.spanner.v1.RoutingHint.SkippedTablet skipped_tablet_uid = 9; + */ + com.google.spanner.v1.RoutingHint.SkippedTabletOrBuilder getSkippedTabletUidOrBuilder(int index); + + /** + * + * + *
+   * If present, the client's current location. This should be the name of a
+   * Google Cloud zone or region, such as "us-central1".
+   *
+   * If absent, the client's location will be assumed to be the same as the
+   * location of the server the client ends up connected to.
+   *
+   * Locations are primarily valuable for clients that connect from regions
+   * other than the ones that contain the Spanner database.
+   * 
+ * + * string client_location = 10; + * + * @return The clientLocation. + */ + java.lang.String getClientLocation(); + + /** + * + * + *
+   * If present, the client's current location. This should be the name of a
+   * Google Cloud zone or region, such as "us-central1".
+   *
+   * If absent, the client's location will be assumed to be the same as the
+   * location of the server the client ends up connected to.
+   *
+   * Locations are primarily valuable for clients that connect from regions
+   * other than the ones that contain the Spanner database.
+   * 
+ * + * string client_location = 10; + * + * @return The bytes for clientLocation. + */ + com.google.protobuf.ByteString getClientLocationBytes(); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java index c4c2be7437a..ffddd0a0470 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Session.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/spanner.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.Session} */ -public final class Session extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Session extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.Session) SessionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Session"); + } + // Use Session.newBuilder() to construct. - private Session(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Session(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,12 +56,6 @@ private Session() { creatorRole_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Session(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.SpannerProto.internal_static_google_spanner_v1_Session_descriptor; } @@ -67,7 +73,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.SpannerProto .internal_static_google_spanner_v1_Session_fieldAccessorTable @@ -162,11 +168,11 @@ public int getLabelsCount() { *
    * The labels for the session.
    *
-   *  * Label keys must be between 1 and 63 characters long and must conform to
-   *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   *  * Label values must be between 0 and 63 characters long and must conform
-   *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   *  * No more than 64 labels can be associated with a given session.
+   * * Label keys must be between 1 and 63 characters long and must conform to
+   * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * * No more than 64 labels can be associated with a given session.
    *
    * See https://goo.gl/xmQnxf for more information on and examples of labels.
    * 
@@ -194,11 +200,11 @@ public java.util.Map getLabels() { *
    * The labels for the session.
    *
-   *  * Label keys must be between 1 and 63 characters long and must conform to
-   *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   *  * Label values must be between 0 and 63 characters long and must conform
-   *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   *  * No more than 64 labels can be associated with a given session.
+   * * Label keys must be between 1 and 63 characters long and must conform to
+   * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * * No more than 64 labels can be associated with a given session.
    *
    * See https://goo.gl/xmQnxf for more information on and examples of labels.
    * 
@@ -216,11 +222,11 @@ public java.util.Map getLabelsMap() { *
    * The labels for the session.
    *
-   *  * Label keys must be between 1 and 63 characters long and must conform to
-   *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   *  * Label values must be between 0 and 63 characters long and must conform
-   *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   *  * No more than 64 labels can be associated with a given session.
+   * * Label keys must be between 1 and 63 characters long and must conform to
+   * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * * No more than 64 labels can be associated with a given session.
    *
    * See https://goo.gl/xmQnxf for more information on and examples of labels.
    * 
@@ -245,11 +251,11 @@ public java.util.Map getLabelsMap() { *
    * The labels for the session.
    *
-   *  * Label keys must be between 1 and 63 characters long and must conform to
-   *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   *  * Label values must be between 0 and 63 characters long and must conform
-   *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   *  * No more than 64 labels can be associated with a given session.
+   * * Label keys must be between 1 and 63 characters long and must conform to
+   * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * * No more than 64 labels can be associated with a given session.
    *
    * See https://goo.gl/xmQnxf for more information on and examples of labels.
    * 
@@ -443,8 +449,8 @@ public com.google.protobuf.ByteString getCreatorRoleBytes() { * *
    * Optional. If `true`, specifies a multiplexed session. Use a multiplexed
-   * session for multiple, concurrent read-only operations. Don't use them for
-   * read-write transactions, partitioned reads, or partitioned queries. Use
+   * session for multiple, concurrent operations including any combination of
+   * read-only and read-write transactions. Use
    * [`sessions.create`][google.spanner.v1.Spanner.CreateSession] to create
    * multiplexed sessions. Don't use
    * [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions] to
@@ -475,10 +481,10 @@ public final boolean isInitialized() {
 
   @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.GeneratedMessage.isStringEmpty(name_)) {
+      com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
     }
-    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
+    com.google.protobuf.GeneratedMessage.serializeStringMapTo(
         output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2);
     if (((bitField0_ & 0x00000001) != 0)) {
       output.writeMessage(3, getCreateTime());
@@ -486,8 +492,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (((bitField0_ & 0x00000002) != 0)) {
       output.writeMessage(4, getApproximateLastUseTime());
     }
-    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creatorRole_)) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, creatorRole_);
+    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(creatorRole_)) {
+      com.google.protobuf.GeneratedMessage.writeString(output, 5, creatorRole_);
     }
     if (multiplexed_ != false) {
       output.writeBool(6, multiplexed_);
@@ -501,8 +507,8 @@ public int getSerializedSize() {
     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.GeneratedMessage.isStringEmpty(name_)) {
+      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
     }
     for (java.util.Map.Entry entry :
         internalGetLabels().getMap().entrySet()) {
@@ -521,8 +527,8 @@ public int getSerializedSize() {
       size +=
           com.google.protobuf.CodedOutputStream.computeMessageSize(4, getApproximateLastUseTime());
     }
-    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creatorRole_)) {
-      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, creatorRole_);
+    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(creatorRole_)) {
+      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, creatorRole_);
     }
     if (multiplexed_ != false) {
       size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, multiplexed_);
@@ -624,38 +630,38 @@ public static com.google.spanner.v1.Session parseFrom(
 
   public static com.google.spanner.v1.Session parseFrom(java.io.InputStream input)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
   }
 
   public static com.google.spanner.v1.Session parseFrom(
       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+    return com.google.protobuf.GeneratedMessage.parseWithIOException(
         PARSER, input, extensionRegistry);
   }
 
   public static com.google.spanner.v1.Session parseDelimitedFrom(java.io.InputStream input)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
   }
 
   public static com.google.spanner.v1.Session parseDelimitedFrom(
       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
         PARSER, input, extensionRegistry);
   }
 
   public static com.google.spanner.v1.Session parseFrom(com.google.protobuf.CodedInputStream input)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
   }
 
   public static com.google.spanner.v1.Session parseFrom(
       com.google.protobuf.CodedInputStream input,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+    return com.google.protobuf.GeneratedMessage.parseWithIOException(
         PARSER, input, extensionRegistry);
   }
 
@@ -678,7 +684,7 @@ public Builder toBuilder() {
   }
 
   @java.lang.Override
-  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
     Builder builder = new Builder(parent);
     return builder;
   }
@@ -692,7 +698,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    *
    * Protobuf type {@code google.spanner.v1.Session}
    */
-  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+  public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
       implements
       // @@protoc_insertion_point(builder_implements:google.spanner.v1.Session)
       com.google.spanner.v1.SessionOrBuilder {
@@ -724,7 +730,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return com.google.spanner.v1.SpannerProto
           .internal_static_google_spanner_v1_Session_fieldAccessorTable
@@ -737,15 +743,15 @@ private Builder() {
       maybeForceBuilderInitialization();
     }
 
-    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+    private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       super(parent);
       maybeForceBuilderInitialization();
     }
 
     private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-        getCreateTimeFieldBuilder();
-        getApproximateLastUseTimeFieldBuilder();
+      if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+        internalGetCreateTimeFieldBuilder();
+        internalGetApproximateLastUseTimeFieldBuilder();
       }
     }
 
@@ -830,39 +836,6 @@ private void buildPartial0(com.google.spanner.v1.Session result) {
       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.v1.Session) {
@@ -942,14 +915,16 @@ public Builder mergeFrom(
               } // case 18
             case 26:
               {
-                input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
+                input.readMessage(
+                    internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                 bitField0_ |= 0x00000004;
                 break;
               } // case 26
             case 34:
               {
                 input.readMessage(
-                    getApproximateLastUseTimeFieldBuilder().getBuilder(), extensionRegistry);
+                    internalGetApproximateLastUseTimeFieldBuilder().getBuilder(),
+                    extensionRegistry);
                 bitField0_ |= 0x00000008;
                 break;
               } // case 34
@@ -1127,11 +1102,11 @@ public int getLabelsCount() {
      * 
      * The labels for the session.
      *
-     *  * Label keys must be between 1 and 63 characters long and must conform to
-     *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     *  * Label values must be between 0 and 63 characters long and must conform
-     *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     *  * No more than 64 labels can be associated with a given session.
+     * * Label keys must be between 1 and 63 characters long and must conform to
+     * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * * No more than 64 labels can be associated with a given session.
      *
      * See https://goo.gl/xmQnxf for more information on and examples of labels.
      * 
@@ -1159,11 +1134,11 @@ public java.util.Map getLabels() { *
      * The labels for the session.
      *
-     *  * Label keys must be between 1 and 63 characters long and must conform to
-     *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     *  * Label values must be between 0 and 63 characters long and must conform
-     *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     *  * No more than 64 labels can be associated with a given session.
+     * * Label keys must be between 1 and 63 characters long and must conform to
+     * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * * No more than 64 labels can be associated with a given session.
      *
      * See https://goo.gl/xmQnxf for more information on and examples of labels.
      * 
@@ -1181,11 +1156,11 @@ public java.util.Map getLabelsMap() { *
      * The labels for the session.
      *
-     *  * Label keys must be between 1 and 63 characters long and must conform to
-     *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     *  * Label values must be between 0 and 63 characters long and must conform
-     *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     *  * No more than 64 labels can be associated with a given session.
+     * * Label keys must be between 1 and 63 characters long and must conform to
+     * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * * No more than 64 labels can be associated with a given session.
      *
      * See https://goo.gl/xmQnxf for more information on and examples of labels.
      * 
@@ -1210,11 +1185,11 @@ public java.util.Map getLabelsMap() { *
      * The labels for the session.
      *
-     *  * Label keys must be between 1 and 63 characters long and must conform to
-     *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     *  * Label values must be between 0 and 63 characters long and must conform
-     *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     *  * No more than 64 labels can be associated with a given session.
+     * * Label keys must be between 1 and 63 characters long and must conform to
+     * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * * No more than 64 labels can be associated with a given session.
      *
      * See https://goo.gl/xmQnxf for more information on and examples of labels.
      * 
@@ -1245,11 +1220,11 @@ public Builder clearLabels() { *
      * The labels for the session.
      *
-     *  * Label keys must be between 1 and 63 characters long and must conform to
-     *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     *  * Label values must be between 0 and 63 characters long and must conform
-     *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     *  * No more than 64 labels can be associated with a given session.
+     * * Label keys must be between 1 and 63 characters long and must conform to
+     * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * * No more than 64 labels can be associated with a given session.
      *
      * See https://goo.gl/xmQnxf for more information on and examples of labels.
      * 
@@ -1277,11 +1252,11 @@ public java.util.Map getMutableLabels() { *
      * The labels for the session.
      *
-     *  * Label keys must be between 1 and 63 characters long and must conform to
-     *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     *  * Label values must be between 0 and 63 characters long and must conform
-     *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     *  * No more than 64 labels can be associated with a given session.
+     * * Label keys must be between 1 and 63 characters long and must conform to
+     * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * * No more than 64 labels can be associated with a given session.
      *
      * See https://goo.gl/xmQnxf for more information on and examples of labels.
      * 
@@ -1306,11 +1281,11 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { *
      * The labels for the session.
      *
-     *  * Label keys must be between 1 and 63 characters long and must conform to
-     *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     *  * Label values must be between 0 and 63 characters long and must conform
-     *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     *  * No more than 64 labels can be associated with a given session.
+     * * Label keys must be between 1 and 63 characters long and must conform to
+     * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * * No more than 64 labels can be associated with a given session.
      *
      * See https://goo.gl/xmQnxf for more information on and examples of labels.
      * 
@@ -1324,7 +1299,7 @@ public Builder putAllLabels(java.util.Map va } private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1483,7 +1458,7 @@ public Builder clearCreateTime() { public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } /** @@ -1518,14 +1493,14 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { + internalGetCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1536,7 +1511,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { } private com.google.protobuf.Timestamp approximateLastUseTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1703,7 +1678,7 @@ public Builder clearApproximateLastUseTime() { public com.google.protobuf.Timestamp.Builder getApproximateLastUseTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getApproximateLastUseTimeFieldBuilder().getBuilder(); + return internalGetApproximateLastUseTimeFieldBuilder().getBuilder(); } /** @@ -1740,14 +1715,14 @@ public com.google.protobuf.TimestampOrBuilder getApproximateLastUseTimeOrBuilder * .google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getApproximateLastUseTimeFieldBuilder() { + internalGetApproximateLastUseTimeFieldBuilder() { if (approximateLastUseTimeBuilder_ == null) { approximateLastUseTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1875,8 +1850,8 @@ public Builder setCreatorRoleBytes(com.google.protobuf.ByteString value) { * *
      * Optional. If `true`, specifies a multiplexed session. Use a multiplexed
-     * session for multiple, concurrent read-only operations. Don't use them for
-     * read-write transactions, partitioned reads, or partitioned queries. Use
+     * session for multiple, concurrent operations including any combination of
+     * read-only and read-write transactions. Use
      * [`sessions.create`][google.spanner.v1.Spanner.CreateSession] to create
      * multiplexed sessions. Don't use
      * [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions] to
@@ -1898,8 +1873,8 @@ public boolean getMultiplexed() {
      *
      * 
      * Optional. If `true`, specifies a multiplexed session. Use a multiplexed
-     * session for multiple, concurrent read-only operations. Don't use them for
-     * read-write transactions, partitioned reads, or partitioned queries. Use
+     * session for multiple, concurrent operations including any combination of
+     * read-only and read-write transactions. Use
      * [`sessions.create`][google.spanner.v1.Spanner.CreateSession] to create
      * multiplexed sessions. Don't use
      * [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions] to
@@ -1925,8 +1900,8 @@ public Builder setMultiplexed(boolean value) {
      *
      * 
      * Optional. If `true`, specifies a multiplexed session. Use a multiplexed
-     * session for multiple, concurrent read-only operations. Don't use them for
-     * read-write transactions, partitioned reads, or partitioned queries. Use
+     * session for multiple, concurrent operations including any combination of
+     * read-only and read-write transactions. Use
      * [`sessions.create`][google.spanner.v1.Spanner.CreateSession] to create
      * multiplexed sessions. Don't use
      * [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions] to
@@ -1945,17 +1920,6 @@ public Builder clearMultiplexed() {
       return this;
     }
 
-    @java.lang.Override
-    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.setUnknownFields(unknownFields);
-    }
-
-    @java.lang.Override
-    public final Builder mergeUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.mergeUnknownFields(unknownFields);
-    }
-
     // @@protoc_insertion_point(builder_scope:google.spanner.v1.Session)
   }
 
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java
index cd3f8cc0813..a71cf0eac13 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionName.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2025 Google LLC
+ * Copyright 2026 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java
index 127dea4f253..fc02633e834 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SessionOrBuilder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2025 Google LLC
+ * Copyright 2026 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,11 +14,13 @@
  * limitations under the License.
  */
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
 // source: google/spanner/v1/spanner.proto
+// Protobuf Java Version: 4.33.2
 
-// Protobuf Java Version: 3.25.8
 package com.google.spanner.v1;
 
+@com.google.protobuf.Generated
 public interface SessionOrBuilder
     extends
     // @@protoc_insertion_point(interface_extends:google.spanner.v1.Session)
@@ -56,11 +58,11 @@ public interface SessionOrBuilder
    * 
    * The labels for the session.
    *
-   *  * Label keys must be between 1 and 63 characters long and must conform to
-   *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   *  * Label values must be between 0 and 63 characters long and must conform
-   *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   *  * No more than 64 labels can be associated with a given session.
+   * * Label keys must be between 1 and 63 characters long and must conform to
+   * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * * No more than 64 labels can be associated with a given session.
    *
    * See https://goo.gl/xmQnxf for more information on and examples of labels.
    * 
@@ -75,11 +77,11 @@ public interface SessionOrBuilder *
    * The labels for the session.
    *
-   *  * Label keys must be between 1 and 63 characters long and must conform to
-   *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   *  * Label values must be between 0 and 63 characters long and must conform
-   *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   *  * No more than 64 labels can be associated with a given session.
+   * * Label keys must be between 1 and 63 characters long and must conform to
+   * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * * No more than 64 labels can be associated with a given session.
    *
    * See https://goo.gl/xmQnxf for more information on and examples of labels.
    * 
@@ -98,11 +100,11 @@ public interface SessionOrBuilder *
    * The labels for the session.
    *
-   *  * Label keys must be between 1 and 63 characters long and must conform to
-   *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   *  * Label values must be between 0 and 63 characters long and must conform
-   *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   *  * No more than 64 labels can be associated with a given session.
+   * * Label keys must be between 1 and 63 characters long and must conform to
+   * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * * No more than 64 labels can be associated with a given session.
    *
    * See https://goo.gl/xmQnxf for more information on and examples of labels.
    * 
@@ -117,11 +119,11 @@ public interface SessionOrBuilder *
    * The labels for the session.
    *
-   *  * Label keys must be between 1 and 63 characters long and must conform to
-   *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   *  * Label values must be between 0 and 63 characters long and must conform
-   *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   *  * No more than 64 labels can be associated with a given session.
+   * * Label keys must be between 1 and 63 characters long and must conform to
+   * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * * No more than 64 labels can be associated with a given session.
    *
    * See https://goo.gl/xmQnxf for more information on and examples of labels.
    * 
@@ -140,11 +142,11 @@ java.lang.String getLabelsOrDefault( *
    * The labels for the session.
    *
-   *  * Label keys must be between 1 and 63 characters long and must conform to
-   *    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   *  * Label values must be between 0 and 63 characters long and must conform
-   *    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   *  * No more than 64 labels can be associated with a given session.
+   * * Label keys must be between 1 and 63 characters long and must conform to
+   * the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * * No more than 64 labels can be associated with a given session.
    *
    * See https://goo.gl/xmQnxf for more information on and examples of labels.
    * 
@@ -270,8 +272,8 @@ java.lang.String getLabelsOrDefault( * *
    * Optional. If `true`, specifies a multiplexed session. Use a multiplexed
-   * session for multiple, concurrent read-only operations. Don't use them for
-   * read-write transactions, partitioned reads, or partitioned queries. Use
+   * session for multiple, concurrent operations including any combination of
+   * read-only and read-write transactions. Use
    * [`sessions.create`][google.spanner.v1.Spanner.CreateSession] to create
    * multiplexed sessions. Don't use
    * [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions] to
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
index 2774c37b023..e69777ee73f 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2025 Google LLC
+ * Copyright 2026 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,14 +14,26 @@
  * limitations under the License.
  */
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
 // source: google/spanner/v1/spanner.proto
+// Protobuf Java Version: 4.33.2
 
-// Protobuf Java Version: 3.25.8
 package com.google.spanner.v1;
 
-public final class SpannerProto {
+@com.google.protobuf.Generated
+public final class SpannerProto extends com.google.protobuf.GeneratedFile {
   private SpannerProto() {}
 
+  static {
+    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 33,
+        /* patch= */ 2,
+        /* suffix= */ "",
+        "SpannerProto");
+  }
+
   public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
 
   public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
@@ -30,139 +42,147 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
 
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_CreateSessionRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_CreateSessionRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_BatchCreateSessionsRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_BatchCreateSessionsRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_BatchCreateSessionsResponse_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_BatchCreateSessionsResponse_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_Session_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_Session_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_Session_LabelsEntry_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_Session_LabelsEntry_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_GetSessionRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_GetSessionRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ListSessionsRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ListSessionsRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ListSessionsResponse_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ListSessionsResponse_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_DeleteSessionRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_DeleteSessionRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_RequestOptions_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_RequestOptions_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_spanner_v1_RequestOptions_ClientContext_descriptor;
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_google_spanner_v1_RequestOptions_ClientContext_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_spanner_v1_RequestOptions_ClientContext_SecureContextEntry_descriptor;
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_google_spanner_v1_RequestOptions_ClientContext_SecureContextEntry_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_DirectedReadOptions_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_DirectedReadOptions_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_DirectedReadOptions_ReplicaSelection_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_DirectedReadOptions_ReplicaSelection_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_DirectedReadOptions_IncludeReplicas_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_DirectedReadOptions_IncludeReplicas_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_DirectedReadOptions_ExcludeReplicas_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_DirectedReadOptions_ExcludeReplicas_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ExecuteSqlRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ExecuteSqlRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ExecuteSqlRequest_QueryOptions_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ExecuteSqlRequest_QueryOptions_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ExecuteSqlRequest_ParamTypesEntry_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ExecuteSqlRequest_ParamTypesEntry_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ExecuteBatchDmlRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ExecuteBatchDmlRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ExecuteBatchDmlRequest_Statement_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ExecuteBatchDmlRequest_Statement_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ExecuteBatchDmlRequest_Statement_ParamTypesEntry_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ExecuteBatchDmlRequest_Statement_ParamTypesEntry_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ExecuteBatchDmlResponse_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ExecuteBatchDmlResponse_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_PartitionOptions_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_PartitionOptions_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_PartitionQueryRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_PartitionQueryRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_PartitionQueryRequest_ParamTypesEntry_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_PartitionQueryRequest_ParamTypesEntry_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_PartitionReadRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_PartitionReadRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_Partition_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_Partition_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_PartitionResponse_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_PartitionResponse_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_ReadRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_ReadRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_BeginTransactionRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_BeginTransactionRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_CommitRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_CommitRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_RollbackRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_RollbackRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_BatchWriteRequest_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_BatchWriteRequest_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_BatchWriteRequest_MutationGroup_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_spanner_v1_BatchWriteResponse_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_google_spanner_v1_BatchWriteResponse_fieldAccessorTable;
 
   public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
@@ -183,9 +203,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\032\033google/protobuf/empty.proto\032\034google/pr"
           + "otobuf/struct.proto\032\037google/protobuf/tim"
           + "estamp.proto\032\027google/rpc/status.proto\032\034google/spanner/v1/keys.proto\032"
-          + " google/spanner/v1/mutation.proto\032\"google/spanner/v1"
-          + "/result_set.proto\032#google/spanner/v1/tra"
-          + "nsaction.proto\032\034google/spanner/v1/type.proto\"\203\001\n"
+          + " google/spanner/v1/location.proto\032 google/spanner/v1"
+          + "/mutation.proto\032\"google/spanner/v1/resul"
+          + "t_set.proto\032#google/spanner/v1/transacti"
+          + "on.proto\032\034google/spanner/v1/type.proto\"\203\001\n"
           + "\024CreateSessionRequest\0229\n"
           + "\010database\030\001 \001(\tB\'\340A\002\372A!\n"
           + "\037spanner.googleapis.com/Database\0220\n"
@@ -208,8 +229,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\013LabelsEntry\022\013\n"
           + "\003key\030\001 \001(\t\022\r\n"
           + "\005value\030\002 \001(\t:\0028\001:\210\001\352A\204\001\n"
-          + "\036spanner.googleapis.com/Session\022Oprojects/{project}/instances/"
-          + "{instance}/databases/{database}/sessions/{session}*\010sessions2\007session\"I\n"
+          + "\036spanner.googleapis.com/Session\022Oprojects/{project}/instances/{insta"
+          + "nce}/databases/{database}/sessions/{session}*\010sessions2\007session\"I\n"
           + "\021GetSessionRequest\0224\n"
           + "\004name\030\001 \001(\tB&\340A\002\372A \n"
           + "\036spanner.googleapis.com/Session\"\207\001\n"
@@ -224,45 +245,53 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\017next_page_token\030\002 \001(\t\"L\n"
           + "\024DeleteSessionRequest\0224\n"
           + "\004name\030\001 \001(\tB&\340A\002\372A \n"
-          + "\036spanner.googleapis.com/Session\"\334\001\n"
+          + "\036spanner.googleapis.com/Session\"\353\003\n"
           + "\016RequestOptions\022<\n"
           + "\010priority\030\001 \001(\0162*.google.spanner.v1.RequestOptions.Priority\022\023\n"
           + "\013request_tag\030\002 \001(\t\022\027\n"
-          + "\017transaction_tag\030\003 \001(\t\"^\n"
+          + "\017transaction_tag\030\003 \001(\t\022L\n"
+          + "\016client_context\030\004 \001(\013"
+          + "2/.google.spanner.v1.RequestOptions.ClientContextB\003\340A\001\032\276\001\n\r"
+          + "ClientContext\022_\n"
+          + "\016secure_context\030\001 \003(\0132B.google.spanner.v1.Req"
+          + "uestOptions.ClientContext.SecureContextEntryB\003\340A\001\032L\n"
+          + "\022SecureContextEntry\022\013\n"
+          + "\003key\030\001 \001(\t\022%\n"
+          + "\005value\030\002 \001(\0132\026.google.protobuf.Value:\0028\001\"^\n"
           + "\010Priority\022\030\n"
           + "\024PRIORITY_UNSPECIFIED\020\000\022\020\n"
           + "\014PRIORITY_LOW\020\001\022\023\n"
           + "\017PRIORITY_MEDIUM\020\002\022\021\n\r"
           + "PRIORITY_HIGH\020\003\"\352\004\n"
           + "\023DirectedReadOptions\022R\n"
-          + "\020include_replicas\030\001"
-          + " \001(\01326.google.spanner.v1.DirectedReadOptions.IncludeReplicasH\000\022R\n"
-          + "\020exclude_replicas\030\002"
-          + " \001(\01326.google.spanner.v1.DirectedReadOptions.ExcludeReplicasH\000\032\255\001\n"
+          + "\020include_replicas\030\001 \001(\01326.goog"
+          + "le.spanner.v1.DirectedReadOptions.IncludeReplicasH\000\022R\n"
+          + "\020exclude_replicas\030\002 \001(\01326."
+          + "google.spanner.v1.DirectedReadOptions.ExcludeReplicasH\000\032\255\001\n"
           + "\020ReplicaSelection\022\020\n"
           + "\010location\030\001 \001(\t\022J\n"
-          + "\004type\030\002 "
-          + "\001(\0162<.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Type\";\n"
+          + "\004type\030\002 \001(\0162<.google.sp"
+          + "anner.v1.DirectedReadOptions.ReplicaSelection.Type\";\n"
           + "\004Type\022\024\n"
           + "\020TYPE_UNSPECIFIED\020\000\022\016\n\n"
           + "READ_WRITE\020\001\022\r\n"
           + "\tREAD_ONLY\020\002\032\206\001\n"
           + "\017IncludeReplicas\022S\n"
-          + "\022replica_selections\030\001"
-          + " \003(\01327.google.spanner.v1.DirectedReadOptions.ReplicaSelection\022\036\n"
+          + "\022replica_selections\030\001 \003(\0132"
+          + "7.google.spanner.v1.DirectedReadOptions.ReplicaSelection\022\036\n"
           + "\026auto_failover_disabled\030\002 \001(\010\032f\n"
           + "\017ExcludeReplicas\022S\n"
-          + "\022replica_selections\030\001 \003(\01327.google."
-          + "spanner.v1.DirectedReadOptions.ReplicaSelectionB\n\n"
-          + "\010replicas\"\215\007\n"
+          + "\022replica_selections\030\001"
+          + " \003(\01327.google.spanner.v1.DirectedReadOptions.ReplicaSelectionB\n\n"
+          + "\010replicas\"\310\007\n"
           + "\021ExecuteSqlRequest\0227\n"
           + "\007session\030\001 \001(\tB&\340A\002\372A \n"
           + "\036spanner.googleapis.com/Session\022;\n"
           + "\013transaction\030\002 \001(\0132&.google.spanner.v1.TransactionSelector\022\020\n"
           + "\003sql\030\003 \001(\tB\003\340A\002\022\'\n"
           + "\006params\030\004 \001(\0132\027.google.protobuf.Struct\022I\n"
-          + "\013param_types\030\005 \003(\0132"
-          + "4.google.spanner.v1.ExecuteSqlRequest.ParamTypesEntry\022\024\n"
+          + "\013param_types\030\005 \003(\01324.google.spanne"
+          + "r.v1.ExecuteSqlRequest.ParamTypesEntry\022\024\n"
           + "\014resume_token\030\006 \001(\014\022B\n\n"
           + "query_mode\030\007 \001(\0162..google.spanner.v1.ExecuteSqlRequest.QueryMode\022\027\n"
           + "\017partition_token\030\010 \001(\014\022\r\n"
@@ -273,7 +302,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\025directed_read_options\030\017"
           + " \001(\0132&.google.spanner.v1.DirectedReadOptions\022\032\n"
           + "\022data_boost_enabled\030\020 \001(\010\022\033\n"
-          + "\016last_statement\030\021 \001(\010B\003\340A\001\032O\n"
+          + "\016last_statement\030\021 \001(\010B\003\340A\001\0229\n"
+          + "\014routing_hint\030\022"
+          + " \001(\0132\036.google.spanner.v1.RoutingHintB\003\340A\001\032O\n"
           + "\014QueryOptions\022\031\n"
           + "\021optimizer_version\030\001 \001(\t\022$\n"
           + "\034optimizer_statistics_package\030\002 \001(\t\032J\n"
@@ -289,18 +320,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\026ExecuteBatchDmlRequest\0227\n"
           + "\007session\030\001 \001(\tB&\340A\002\372A \n"
           + "\036spanner.googleapis.com/Session\022@\n"
-          + "\013transaction\030\002 \001(\0132&.g"
-          + "oogle.spanner.v1.TransactionSelectorB\003\340A\002\022L\n\n"
-          + "statements\030\003 \003(\01323.google.spanner.v"
-          + "1.ExecuteBatchDmlRequest.StatementB\003\340A\002\022\022\n"
+          + "\013transaction\030\002 \001(\013"
+          + "2&.google.spanner.v1.TransactionSelectorB\003\340A\002\022L\n\n"
+          + "statements\030\003 \003(\01323.google.spann"
+          + "er.v1.ExecuteBatchDmlRequest.StatementB\003\340A\002\022\022\n"
           + "\005seqno\030\004 \001(\003B\003\340A\002\022:\n"
           + "\017request_options\030\005 \001(\0132!.google.spanner.v1.RequestOptions\022\034\n"
           + "\017last_statements\030\006 \001(\010B\003\340A\001\032\354\001\n"
           + "\tStatement\022\020\n"
           + "\003sql\030\001 \001(\tB\003\340A\002\022\'\n"
           + "\006params\030\002 \001(\0132\027.google.protobuf.Struct\022X\n"
-          + "\013param_types\030\003 "
-          + "\003(\0132C.google.spanner.v1.ExecuteBatchDmlRequest.Statement.ParamTypesEntry\032J\n"
+          + "\013param_types\030\003"
+          + " \003(\0132C.google.spanner.v1.ExecuteBatchDmlRequest.Statement.ParamTypesEntry\032J\n"
           + "\017ParamTypesEntry\022\013\n"
           + "\003key\030\001 \001(\t\022&\n"
           + "\005value\030\002 \001(\0132\027.google.spanner.v1.Type:\0028\001\"\303\001\n"
@@ -311,15 +342,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + " \001(\01323.google.spanner.v1.MultiplexedSessionPrecommitTokenB\003\340A\001\"H\n"
           + "\020PartitionOptions\022\034\n"
           + "\024partition_size_bytes\030\001 \001(\003\022\026\n"
-          + "\016max_partitions\030\002 \001(\003\"\243\003\n"
+          + "\016max_partitions\030\002 \001(\003\"\255\003\n"
           + "\025PartitionQueryRequest\0227\n"
           + "\007session\030\001 \001(\tB&\340A\002\372A \n"
           + "\036spanner.googleapis.com/Session\022;\n"
           + "\013transaction\030\002 \001(\0132&.google.spanner.v1.TransactionSelector\022\020\n"
-          + "\003sql\030\003 \001(\tB\003\340A\002\022\'\n"
-          + "\006params\030\004 \001(\0132\027.google.protobuf.Struct\022M\n"
+          + "\003sql\030\003 \001(\tB\003\340A\002\022,\n"
+          + "\006params\030\004 \001(\0132\027.google.protobuf.StructB\003\340A\001\022R\n"
           + "\013param_types\030\005"
-          + " \003(\01328.google.spanner.v1.PartitionQueryRequest.ParamTypesEntry\022>\n"
+          + " \003(\01328.google.spanner.v1.PartitionQueryRequest.ParamTypesEntryB\003\340A\001\022>\n"
           + "\021partition_options\030\006 \001(\0132#.google.spanner.v1.PartitionOptions\032J\n"
           + "\017ParamTypesEntry\022\013\n"
           + "\003key\030\001 \001(\t\022&\n"
@@ -337,7 +368,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\017partition_token\030\001 \001(\014\"z\n"
           + "\021PartitionResponse\0220\n\n"
           + "partitions\030\001 \003(\0132\034.google.spanner.v1.Partition\0223\n"
-          + "\013transaction\030\002 \001(\0132\036.google.spanner.v1.Transaction\"\366\005\n"
+          + "\013transaction\030\002 \001(\0132\036.google.spanner.v1.Transaction\"\261\006\n"
           + "\013ReadRequest\0227\n"
           + "\007session\030\001 \001(\tB&\340A\002\372A \n"
           + "\036spanner.googleapis.com/Session\022;\n"
@@ -351,13 +382,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\017partition_token\030\n"
           + " \001(\014\022:\n"
           + "\017request_options\030\013 \001(\0132!.google.spanner.v1.RequestOptions\022E\n"
-          + "\025directed_read_options\030\016"
-          + " \001(\0132&.google.spanner.v1.DirectedReadOptions\022\032\n"
+          + "\025directed_read_options\030\016 \001(\0132"
+          + "&.google.spanner.v1.DirectedReadOptions\022\032\n"
           + "\022data_boost_enabled\030\017 \001(\010\022=\n"
           + "\010order_by\030\020"
           + " \001(\0162&.google.spanner.v1.ReadRequest.OrderByB\003\340A\001\022?\n"
           + "\tlock_hint\030\021"
-          + " \001(\0162\'.google.spanner.v1.ReadRequest.LockHintB\003\340A\001\"T\n"
+          + " \001(\0162\'.google.spanner.v1.ReadRequest.LockHintB\003\340A\001\0229\n"
+          + "\014routing_hint\030\022"
+          + " \001(\0132\036.google.spanner.v1.RoutingHintB\003\340A\001\"T\n"
           + "\007OrderBy\022\030\n"
           + "\024ORDER_BY_UNSPECIFIED\020\000\022\030\n"
           + "\024ORDER_BY_PRIMARY_KEY\020\001\022\025\n"
@@ -365,7 +398,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\010LockHint\022\031\n"
           + "\025LOCK_HINT_UNSPECIFIED\020\000\022\024\n"
           + "\020LOCK_HINT_SHARED\020\001\022\027\n"
-          + "\023LOCK_HINT_EXCLUSIVE\020\002\"\203\002\n"
+          + "\023LOCK_HINT_EXCLUSIVE\020\002\"\276\002\n"
           + "\027BeginTransactionRequest\0227\n"
           + "\007session\030\001 \001(\tB&\340A\002\372A \n"
           + "\036spanner.googleapis.com/Session\022;\n"
@@ -373,20 +406,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + " \001(\0132%.google.spanner.v1.TransactionOptionsB\003\340A\002\022:\n"
           + "\017request_options\030\003 \001(\0132!.google.spanner.v1.RequestOptions\0226\n"
           + "\014mutation_key\030\004"
-          + " \001(\0132\033.google.spanner.v1.MutationB\003\340A\001\"\320\003\n\r"
+          + " \001(\0132\033.google.spanner.v1.MutationB\003\340A\001\0229\n"
+          + "\014routing_hint\030\005"
+          + " \001(\0132\036.google.spanner.v1.RoutingHintB\003\340A\001\"\213\004\n\r"
           + "CommitRequest\0227\n"
           + "\007session\030\001 \001(\tB&\340A\002\372A \n"
           + "\036spanner.googleapis.com/Session\022\030\n"
           + "\016transaction_id\030\002 \001(\014H\000\022G\n"
-          + "\026single_use_transaction\030\003"
-          + " \001(\0132%.google.spanner.v1.TransactionOptionsH\000\022.\n"
+          + "\026single_use_transaction\030\003 \001(\013"
+          + "2%.google.spanner.v1.TransactionOptionsH\000\022.\n"
           + "\tmutations\030\004 \003(\0132\033.google.spanner.v1.Mutation\022\033\n"
           + "\023return_commit_stats\030\005 \001(\010\0228\n"
           + "\020max_commit_delay\030\010"
           + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\022:\n"
           + "\017request_options\030\006 \001(\0132!.google.spanner.v1.RequestOptions\022Q\n"
-          + "\017precommit_token\030\t"
-          + " \001(\01323.google.spanner.v1.MultiplexedSessionPrecommitTokenB\003\340A\001B\r\n"
+          + "\017precommit_token\030\t \001(\01323.google.spanner.v"
+          + "1.MultiplexedSessionPrecommitTokenB\003\340A\001\0229\n"
+          + "\014routing_hint\030\n"
+          + " \001(\0132\036.google.spanner.v1.RoutingHintB\003\340A\001B\r\n"
           + "\013transaction\"g\n"
           + "\017RollbackRequest\0227\n"
           + "\007session\030\001 \001(\tB&\340A\002\372A \n"
@@ -396,8 +433,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\007session\030\001 \001(\tB&\340A\002\372A \n"
           + "\036spanner.googleapis.com/Session\022:\n"
           + "\017request_options\030\003 \001(\0132!.google.spanner.v1.RequestOptions\022P\n"
-          + "\017mutation_groups\030\004 \003(\01322.google"
-          + ".spanner.v1.BatchWriteRequest.MutationGroupB\003\340A\002\022,\n"
+          + "\017mutation_groups\030\004 \003(\01322.google.spanner."
+          + "v1.BatchWriteRequest.MutationGroupB\003\340A\002\022,\n"
           + "\037exclude_txn_from_change_streams\030\005 \001(\010B\003\340A\001\032D\n\r"
           + "MutationGroup\0223\n"
           + "\tmutations\030\001 \003(\0132\033.google.spanner.v1.MutationB\003\340A\002\"\177\n"
@@ -406,73 +443,73 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "\006status\030\002 \001(\0132\022.google.rpc.Status\0224\n"
           + "\020commit_timestamp\030\003 \001(\0132\032.google.protobuf.Timestamp2\213\030\n"
           + "\007Spanner\022\246\001\n\r"
-          + "CreateSession\022\'.google.spanner.v1.CreateSessionReq"
-          + "uest\032\032.google.spanner.v1.Session\"P\332A\010dat"
-          + "abase\202\323\344\223\002?\":/v1/{database=projects/*/instances/*/databases/*}/sessions:\001*\022\340\001\n"
-          + "\023BatchCreateSessions\022-.google.spanner.v1.B"
-          + "atchCreateSessionsRequest\032..google.spann"
-          + "er.v1.BatchCreateSessionsResponse\"j\332A\026da"
-          + "tabase,session_count\202\323\344\223\002K\"F/v1/{databas"
-          + "e=projects/*/instances/*/databases/*}/sessions:batchCreate:\001*\022\227\001\n\n"
-          + "GetSession\022$.google.spanner.v1.GetSessionRequest\032\032.goo"
-          + "gle.spanner.v1.Session\"G\332A\004name\202\323\344\223\002:\0228/"
-          + "v1/{name=projects/*/instances/*/databases/*/sessions/*}\022\256\001\n"
-          + "\014ListSessions\022&.google.spanner.v1.ListSessionsRequest\032\'.googl"
-          + "e.spanner.v1.ListSessionsResponse\"M\332A\010da"
-          + "tabase\202\323\344\223\002<\022:/v1/{database=projects/*/instances/*/databases/*}/sessions\022\231\001\n\r"
-          + "DeleteSession\022\'.google.spanner.v1.DeleteSes"
-          + "sionRequest\032\026.google.protobuf.Empty\"G\332A\004"
-          + "name\202\323\344\223\002:*8/v1/{name=projects/*/instances/*/databases/*/sessions/*}\022\243\001\n\n"
-          + "ExecuteSql\022$.google.spanner.v1.ExecuteSqlReques"
-          + "t\032\034.google.spanner.v1.ResultSet\"Q\202\323\344\223\002K\""
-          + "F/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql:\001*\022\276\001\n"
-          + "\023ExecuteStreamingSql\022$.google.spanner.v1.E"
-          + "xecuteSqlRequest\032#.google.spanner.v1.Par"
-          + "tialResultSet\"Z\202\323\344\223\002T\"O/v1/{session=proj"
-          + "ects/*/instances/*/databases/*/sessions/*}:executeStreamingSql:\001*0\001\022\300\001\n"
-          + "\017ExecuteBatchDml\022).google.spanner.v1.ExecuteBatch"
-          + "DmlRequest\032*.google.spanner.v1.ExecuteBa"
-          + "tchDmlResponse\"V\202\323\344\223\002P\"K/v1/{session=pro"
-          + "jects/*/instances/*/databases/*/sessions/*}:executeBatchDml:\001*\022\221\001\n"
-          + "\004Read\022\036.google.spanner.v1.ReadRequest\032\034.google.spanner"
-          + ".v1.ResultSet\"K\202\323\344\223\002E\"@/v1/{session=proj"
-          + "ects/*/instances/*/databases/*/sessions/*}:read:\001*\022\254\001\n\r"
-          + "StreamingRead\022\036.google.spanner.v1.ReadRequest\032#.google.spanner.v1"
-          + ".PartialResultSet\"T\202\323\344\223\002N\"I/v1/{session="
-          + "projects/*/instances/*/databases/*/sessions/*}:streamingRead:\001*0\001\022\311\001\n"
-          + "\020BeginTransaction\022*.google.spanner.v1.BeginTransact"
-          + "ionRequest\032\036.google.spanner.v1.Transacti"
-          + "on\"i\332A\017session,options\202\323\344\223\002Q\"L/v1/{sessi"
-          + "on=projects/*/instances/*/databases/*/sessions/*}:beginTransaction:\001*\022\353\001\n"
-          + "\006Commit\022"
-          + " .google.spanner.v1.CommitRequest\032!.google.spanner.v1.CommitResponse\"\233\001\332A"
-          + " session,transaction_id,mutations\332A(session,si"
-          + "ngle_use_transaction,mutations\202\323\344\223\002G\"B/v"
-          + "1/{session=projects/*/instances/*/databases/*/sessions/*}:commit:\001*\022\260\001\n"
-          + "\010Rollback\022\".google.spanner.v1.RollbackRequest\032\026.g"
-          + "oogle.protobuf.Empty\"h\332A\026session,transac"
-          + "tion_id\202\323\344\223\002I\"D/v1/{session=projects/*/i"
-          + "nstances/*/databases/*/sessions/*}:rollback:\001*\022\267\001\n"
-          + "\016PartitionQuery\022(.google.spanner.v1.PartitionQueryRequest\032$.google.spa"
-          + "nner.v1.PartitionResponse\"U\202\323\344\223\002O\"J/v1/{"
-          + "session=projects/*/instances/*/databases/*/sessions/*}:partitionQuery:\001*\022\264\001\n\r"
-          + "PartitionRead\022\'.google.spanner.v1.Partition"
-          + "ReadRequest\032$.google.spanner.v1.Partitio"
-          + "nResponse\"T\202\323\344\223\002N\"I/v1/{session=projects"
-          + "/*/instances/*/databases/*/sessions/*}:partitionRead:\001*\022\310\001\n\n"
-          + "BatchWrite\022$.google.spanner.v1.BatchWriteRequest\032%.google.sp"
-          + "anner.v1.BatchWriteResponse\"k\332A\027session,"
-          + "mutation_groups\202\323\344\223\002K\"F/v1/{session=proj"
-          + "ects/*/instances/*/databases/*/sessions/"
-          + "*}:batchWrite:\001*0\001\032w\312A\026spanner.googleapi"
-          + "s.com\322A[https://www.googleapis.com/auth/"
-          + "cloud-platform,https://www.googleapis.com/auth/spanner.dataB\221\002\n"
-          + "\025com.google.spanner.v1B\014SpannerProtoP\001Z5cloud.google.com/"
-          + "go/spanner/apiv1/spannerpb;spannerpb\252\002\027G"
-          + "oogle.Cloud.Spanner.V1\312\002\027Google\\Cloud\\Sp"
-          + "anner\\V1\352\002\032Google::Cloud::Spanner::V1\352A_\n"
-          + "\037spanner.googleapis.com/Database\022 builder) {
+  private StructType(com.google.protobuf.GeneratedMessage.Builder builder) {
     super(builder);
   }
 
@@ -44,18 +56,12 @@ private StructType() {
     fields_ = java.util.Collections.emptyList();
   }
 
-  @java.lang.Override
-  @SuppressWarnings({"unused"})
-  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
-    return new StructType();
-  }
-
   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     return com.google.spanner.v1.TypeProto.internal_static_google_spanner_v1_StructType_descriptor;
   }
 
   @java.lang.Override
-  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internalGetFieldAccessorTable() {
     return com.google.spanner.v1.TypeProto
         .internal_static_google_spanner_v1_StructType_fieldAccessorTable
@@ -153,14 +159,24 @@ public interface FieldOrBuilder
    *
    * Protobuf type {@code google.spanner.v1.StructType.Field}
    */
-  public static final class Field extends com.google.protobuf.GeneratedMessageV3
+  public static final class Field extends com.google.protobuf.GeneratedMessage
       implements
       // @@protoc_insertion_point(message_implements:google.spanner.v1.StructType.Field)
       FieldOrBuilder {
     private static final long serialVersionUID = 0L;
 
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+          /* major= */ 4,
+          /* minor= */ 33,
+          /* patch= */ 2,
+          /* suffix= */ "",
+          "Field");
+    }
+
     // Use Field.newBuilder() to construct.
-    private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private Field(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
 
@@ -168,19 +184,13 @@ private Field() {
       name_ = "";
     }
 
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
-      return new Field();
-    }
-
     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
       return com.google.spanner.v1.TypeProto
           .internal_static_google_spanner_v1_StructType_Field_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return com.google.spanner.v1.TypeProto
           .internal_static_google_spanner_v1_StructType_Field_fieldAccessorTable
@@ -318,8 +328,8 @@ public final boolean isInitialized() {
 
     @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.GeneratedMessage.isStringEmpty(name_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
       }
       if (((bitField0_ & 0x00000001) != 0)) {
         output.writeMessage(2, getType());
@@ -333,8 +343,8 @@ public int getSerializedSize() {
       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.GeneratedMessage.isStringEmpty(name_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
       }
       if (((bitField0_ & 0x00000001) != 0)) {
         size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType());
@@ -418,38 +428,38 @@ public static com.google.spanner.v1.StructType.Field parseFrom(
 
     public static com.google.spanner.v1.StructType.Field parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+      return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
     }
 
     public static com.google.spanner.v1.StructType.Field parseFrom(
         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+      return com.google.protobuf.GeneratedMessage.parseWithIOException(
           PARSER, input, extensionRegistry);
     }
 
     public static com.google.spanner.v1.StructType.Field parseDelimitedFrom(
         java.io.InputStream input) throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+      return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
     }
 
     public static com.google.spanner.v1.StructType.Field parseDelimitedFrom(
         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+      return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
           PARSER, input, extensionRegistry);
     }
 
     public static com.google.spanner.v1.StructType.Field parseFrom(
         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+      return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
     }
 
     public static com.google.spanner.v1.StructType.Field parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+      return com.google.protobuf.GeneratedMessage.parseWithIOException(
           PARSER, input, extensionRegistry);
     }
 
@@ -472,8 +482,7 @@ public Builder toBuilder() {
     }
 
     @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+    protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -487,8 +496,7 @@ protected Builder newBuilderForType(
      *
      * Protobuf type {@code google.spanner.v1.StructType.Field}
      */
-    public static final class Builder
-        extends com.google.protobuf.GeneratedMessageV3.Builder
+    public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
         implements
         // @@protoc_insertion_point(builder_implements:google.spanner.v1.StructType.Field)
         com.google.spanner.v1.StructType.FieldOrBuilder {
@@ -498,7 +506,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return com.google.spanner.v1.TypeProto
             .internal_static_google_spanner_v1_StructType_Field_fieldAccessorTable
@@ -512,14 +520,14 @@ private Builder() {
         maybeForceBuilderInitialization();
       }
 
-      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
         maybeForceBuilderInitialization();
       }
 
       private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-          getTypeFieldBuilder();
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+          internalGetTypeFieldBuilder();
         }
       }
 
@@ -580,41 +588,6 @@ private void buildPartial0(com.google.spanner.v1.StructType.Field result) {
         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.v1.StructType.Field) {
@@ -669,7 +642,7 @@ public Builder mergeFrom(
                 } // case 10
               case 18:
                 {
-                  input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry);
+                  input.readMessage(internalGetTypeFieldBuilder().getBuilder(), extensionRegistry);
                   bitField0_ |= 0x00000002;
                   break;
                 } // case 18
@@ -834,7 +807,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
       }
 
       private com.google.spanner.v1.Type type_;
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
               com.google.spanner.v1.Type,
               com.google.spanner.v1.Type.Builder,
               com.google.spanner.v1.TypeOrBuilder>
@@ -977,7 +950,7 @@ public Builder clearType() {
       public com.google.spanner.v1.Type.Builder getTypeBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
-        return getTypeFieldBuilder().getBuilder();
+        return internalGetTypeFieldBuilder().getBuilder();
       }
 
       /**
@@ -1006,14 +979,14 @@ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() {
        *
        * .google.spanner.v1.Type type = 2;
        */
-      private com.google.protobuf.SingleFieldBuilderV3<
+      private com.google.protobuf.SingleFieldBuilder<
               com.google.spanner.v1.Type,
               com.google.spanner.v1.Type.Builder,
               com.google.spanner.v1.TypeOrBuilder>
-          getTypeFieldBuilder() {
+          internalGetTypeFieldBuilder() {
         if (typeBuilder_ == null) {
           typeBuilder_ =
-              new com.google.protobuf.SingleFieldBuilderV3<
+              new com.google.protobuf.SingleFieldBuilder<
                   com.google.spanner.v1.Type,
                   com.google.spanner.v1.Type.Builder,
                   com.google.spanner.v1.TypeOrBuilder>(
@@ -1023,18 +996,6 @@ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() {
         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.v1.StructType.Field)
     }
 
@@ -1289,38 +1250,38 @@ public static com.google.spanner.v1.StructType parseFrom(
 
   public static com.google.spanner.v1.StructType parseFrom(java.io.InputStream input)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
   }
 
   public static com.google.spanner.v1.StructType parseFrom(
       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+    return com.google.protobuf.GeneratedMessage.parseWithIOException(
         PARSER, input, extensionRegistry);
   }
 
   public static com.google.spanner.v1.StructType parseDelimitedFrom(java.io.InputStream input)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
   }
 
   public static com.google.spanner.v1.StructType parseDelimitedFrom(
       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
         PARSER, input, extensionRegistry);
   }
 
   public static com.google.spanner.v1.StructType parseFrom(
       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
   }
 
   public static com.google.spanner.v1.StructType parseFrom(
       com.google.protobuf.CodedInputStream input,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+    return com.google.protobuf.GeneratedMessage.parseWithIOException(
         PARSER, input, extensionRegistry);
   }
 
@@ -1343,7 +1304,7 @@ public Builder toBuilder() {
   }
 
   @java.lang.Override
-  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
     Builder builder = new Builder(parent);
     return builder;
   }
@@ -1358,7 +1319,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    *
    * Protobuf type {@code google.spanner.v1.StructType}
    */
-  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+  public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
       implements
       // @@protoc_insertion_point(builder_implements:google.spanner.v1.StructType)
       com.google.spanner.v1.StructTypeOrBuilder {
@@ -1368,7 +1329,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return com.google.spanner.v1.TypeProto
           .internal_static_google_spanner_v1_StructType_fieldAccessorTable
@@ -1380,7 +1341,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     // Construct using com.google.spanner.v1.StructType.newBuilder()
     private Builder() {}
 
-    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+    private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       super(parent);
     }
 
@@ -1445,39 +1406,6 @@ private void buildPartial0(com.google.spanner.v1.StructType result) {
       int from_bitField0_ = bitField0_;
     }
 
-    @java.lang.Override
-    public Builder clone() {
-      return super.clone();
-    }
-
-    @java.lang.Override
-    public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-      return super.setField(field, value);
-    }
-
-    @java.lang.Override
-    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
-      return super.clearField(field);
-    }
-
-    @java.lang.Override
-    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-      return super.clearOneof(oneof);
-    }
-
-    @java.lang.Override
-    public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
-      return super.setRepeatedField(field, index, value);
-    }
-
-    @java.lang.Override
-    public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
-      return super.addRepeatedField(field, value);
-    }
-
     @java.lang.Override
     public Builder mergeFrom(com.google.protobuf.Message other) {
       if (other instanceof com.google.spanner.v1.StructType) {
@@ -1509,8 +1437,8 @@ public Builder mergeFrom(com.google.spanner.v1.StructType other) {
             fields_ = other.fields_;
             bitField0_ = (bitField0_ & ~0x00000001);
             fieldsBuilder_ =
-                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
-                    ? getFieldsFieldBuilder()
+                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders
+                    ? internalGetFieldsFieldBuilder()
                     : null;
           } else {
             fieldsBuilder_.addAllMessages(other.fields_);
@@ -1585,7 +1513,7 @@ private void ensureFieldsIsMutable() {
       }
     }
 
-    private com.google.protobuf.RepeatedFieldBuilderV3<
+    private com.google.protobuf.RepeatedFieldBuilder<
             com.google.spanner.v1.StructType.Field,
             com.google.spanner.v1.StructType.Field.Builder,
             com.google.spanner.v1.StructType.FieldOrBuilder>
@@ -1909,7 +1837,7 @@ public Builder removeFields(int index) {
      * repeated .google.spanner.v1.StructType.Field fields = 1;
      */
     public com.google.spanner.v1.StructType.Field.Builder getFieldsBuilder(int index) {
-      return getFieldsFieldBuilder().getBuilder(index);
+      return internalGetFieldsFieldBuilder().getBuilder(index);
     }
 
     /**
@@ -1972,7 +1900,7 @@ public com.google.spanner.v1.StructType.FieldOrBuilder getFieldsOrBuilder(int in
      * repeated .google.spanner.v1.StructType.Field fields = 1;
      */
     public com.google.spanner.v1.StructType.Field.Builder addFieldsBuilder() {
-      return getFieldsFieldBuilder()
+      return internalGetFieldsFieldBuilder()
           .addBuilder(com.google.spanner.v1.StructType.Field.getDefaultInstance());
     }
 
@@ -1991,7 +1919,7 @@ public com.google.spanner.v1.StructType.Field.Builder addFieldsBuilder() {
      * repeated .google.spanner.v1.StructType.Field fields = 1;
      */
     public com.google.spanner.v1.StructType.Field.Builder addFieldsBuilder(int index) {
-      return getFieldsFieldBuilder()
+      return internalGetFieldsFieldBuilder()
           .addBuilder(index, com.google.spanner.v1.StructType.Field.getDefaultInstance());
     }
 
@@ -2010,17 +1938,17 @@ public com.google.spanner.v1.StructType.Field.Builder addFieldsBuilder(int index
      * repeated .google.spanner.v1.StructType.Field fields = 1;
      */
     public java.util.List getFieldsBuilderList() {
-      return getFieldsFieldBuilder().getBuilderList();
+      return internalGetFieldsFieldBuilder().getBuilderList();
     }
 
-    private com.google.protobuf.RepeatedFieldBuilderV3<
+    private com.google.protobuf.RepeatedFieldBuilder<
             com.google.spanner.v1.StructType.Field,
             com.google.spanner.v1.StructType.Field.Builder,
             com.google.spanner.v1.StructType.FieldOrBuilder>
-        getFieldsFieldBuilder() {
+        internalGetFieldsFieldBuilder() {
       if (fieldsBuilder_ == null) {
         fieldsBuilder_ =
-            new com.google.protobuf.RepeatedFieldBuilderV3<
+            new com.google.protobuf.RepeatedFieldBuilder<
                 com.google.spanner.v1.StructType.Field,
                 com.google.spanner.v1.StructType.Field.Builder,
                 com.google.spanner.v1.StructType.FieldOrBuilder>(
@@ -2030,17 +1958,6 @@ public java.util.List getFieldsB
       return fieldsBuilder_;
     }
 
-    @java.lang.Override
-    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.setUnknownFields(unknownFields);
-    }
-
-    @java.lang.Override
-    public final Builder mergeUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
-      return super.mergeUnknownFields(unknownFields);
-    }
-
     // @@protoc_insertion_point(builder_scope:google.spanner.v1.StructType)
   }
 
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/StructTypeOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/StructTypeOrBuilder.java
index 7c92ac22f68..a3f5422bf31 100644
--- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/StructTypeOrBuilder.java
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/StructTypeOrBuilder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2025 Google LLC
+ * Copyright 2026 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,11 +14,13 @@
  * limitations under the License.
  */
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
 // source: google/spanner/v1/type.proto
+// Protobuf Java Version: 4.33.2
 
-// Protobuf Java Version: 3.25.8
 package com.google.spanner.v1;
 
+@com.google.protobuf.Generated
 public interface StructTypeOrBuilder
     extends
     // @@protoc_insertion_point(interface_extends:google.spanner.v1.StructType)
diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Tablet.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Tablet.java
new file mode 100644
index 00000000000..5983e78b52b
--- /dev/null
+++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Tablet.java
@@ -0,0 +1,1673 @@
+/*
+ * Copyright 2026 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!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: google/spanner/v1/location.proto
+// Protobuf Java Version: 4.33.2
+
+package com.google.spanner.v1;
+
+/**
+ *
+ *
+ * 
+ * A `Tablet` represents a single replica of a `Group`. A tablet is served by a
+ * single server at a time, and can move between servers due to server death or
+ * simply load balancing.
+ * 
+ * + * Protobuf type {@code google.spanner.v1.Tablet} + */ +@com.google.protobuf.Generated +public final class Tablet extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.Tablet) + TabletOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Tablet"); + } + + // Use Tablet.newBuilder() to construct. + private Tablet(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Tablet() { + serverAddress_ = ""; + location_ = ""; + role_ = 0; + incarnation_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto.internal_static_google_spanner_v1_Tablet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_Tablet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Tablet.class, com.google.spanner.v1.Tablet.Builder.class); + } + + /** + * + * + *
+   * Indicates the role of the tablet.
+   * 
+ * + * Protobuf enum {@code google.spanner.v1.Tablet.Role} + */ + public enum Role implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified.
+     * 
+ * + * ROLE_UNSPECIFIED = 0; + */ + ROLE_UNSPECIFIED(0), + /** + * + * + *
+     * The tablet can perform reads and (if elected leader) writes.
+     * 
+ * + * READ_WRITE = 1; + */ + READ_WRITE(1), + /** + * + * + *
+     * The tablet can only perform reads.
+     * 
+ * + * READ_ONLY = 2; + */ + READ_ONLY(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Role"); + } + + /** + * + * + *
+     * Not specified.
+     * 
+ * + * ROLE_UNSPECIFIED = 0; + */ + public static final int ROLE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The tablet can perform reads and (if elected leader) writes.
+     * 
+ * + * READ_WRITE = 1; + */ + public static final int READ_WRITE_VALUE = 1; + + /** + * + * + *
+     * The tablet can only perform reads.
+     * 
+ * + * READ_ONLY = 2; + */ + public static final int READ_ONLY_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 Role 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 Role forNumber(int value) { + switch (value) { + case 0: + return ROLE_UNSPECIFIED; + case 1: + return READ_WRITE; + case 2: + return READ_ONLY; + 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 Role findValueByNumber(int number) { + return Role.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.spanner.v1.Tablet.getDescriptor().getEnumTypes().get(0); + } + + private static final Role[] VALUES = values(); + + public static Role 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 Role(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.spanner.v1.Tablet.Role) + } + + public static final int TABLET_UID_FIELD_NUMBER = 1; + private long tabletUid_ = 0L; + + /** + * + * + *
+   * The UID of the tablet, unique within the database. Matches the
+   * `tablet_uids` and `leader_tablet_uid` fields in `Group`.
+   * 
+ * + * uint64 tablet_uid = 1; + * + * @return The tabletUid. + */ + @java.lang.Override + public long getTabletUid() { + return tabletUid_; + } + + public static final int SERVER_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object serverAddress_ = ""; + + /** + * + * + *
+   * The address of the server that is serving this tablet -- either an IP
+   * address or DNS hostname and a port number.
+   * 
+ * + * string server_address = 2; + * + * @return The serverAddress. + */ + @java.lang.Override + public java.lang.String getServerAddress() { + java.lang.Object ref = serverAddress_; + 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(); + serverAddress_ = s; + return s; + } + } + + /** + * + * + *
+   * The address of the server that is serving this tablet -- either an IP
+   * address or DNS hostname and a port number.
+   * 
+ * + * string server_address = 2; + * + * @return The bytes for serverAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServerAddressBytes() { + java.lang.Object ref = serverAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serverAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
+   * Where this tablet is located. This is the name of a Google Cloud region,
+   * such as "us-central1".
+   * 
+ * + * string location = 3; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + + /** + * + * + *
+   * Where this tablet is located. This is the name of a Google Cloud region,
+   * such as "us-central1".
+   * 
+ * + * string location = 3; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLE_FIELD_NUMBER = 4; + private int role_ = 0; + + /** + * + * + *
+   * The role of the tablet.
+   * 
+ * + * .google.spanner.v1.Tablet.Role role = 4; + * + * @return The enum numeric value on the wire for role. + */ + @java.lang.Override + public int getRoleValue() { + return role_; + } + + /** + * + * + *
+   * The role of the tablet.
+   * 
+ * + * .google.spanner.v1.Tablet.Role role = 4; + * + * @return The role. + */ + @java.lang.Override + public com.google.spanner.v1.Tablet.Role getRole() { + com.google.spanner.v1.Tablet.Role result = com.google.spanner.v1.Tablet.Role.forNumber(role_); + return result == null ? com.google.spanner.v1.Tablet.Role.UNRECOGNIZED : result; + } + + public static final int INCARNATION_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString incarnation_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+   * `incarnation` indicates the freshness of the tablet information contained
+   * in this proto. Incarnations can be compared lexicographically; if
+   * incarnation A is greater than incarnation B, then the `Tablet`
+   * corresponding to A is newer than the `Tablet` corresponding to B, and
+   * should be used preferentially.
+   * 
+ * + * bytes incarnation = 5; + * + * @return The incarnation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIncarnation() { + return incarnation_; + } + + public static final int DISTANCE_FIELD_NUMBER = 6; + private int distance_ = 0; + + /** + * + * + *
+   * Distances help the client pick the closest tablet out of the list of
+   * tablets for a given request. Tablets with lower distances should generally
+   * be preferred. Tablets with the same distance are approximately equally
+   * close; the client can choose arbitrarily.
+   *
+   * Distances do not correspond precisely to expected latency, geographical
+   * distance, or anything else. Distances should be compared only between
+   * tablets of the same group; they are not meaningful between different
+   * groups.
+   *
+   * A value of zero indicates that the tablet may be in the same zone as
+   * the client, and have minimum network latency. A value less than or equal to
+   * five indicates that the tablet is thought to be in the same region as the
+   * client, and may have a few milliseconds of network latency. Values greater
+   * than five are most likely in a different region, with non-trivial network
+   * latency.
+   *
+   * Clients should use the following algorithm:
+   * * If the request is using a directed read, eliminate any tablets that
+   * do not match the directed read's target zone and/or replica type.
+   * * (Read-write transactions only) Choose leader tablet if it has an
+   * distance <=5.
+   * * Group and sort tablets by distance. Choose a random
+   * tablet with the lowest distance. If the request
+   * is not a directed read, only consider replicas with distances <=5.
+   * * Send the request to the fallback endpoint.
+   *
+   * The tablet picked by this algorithm may be skipped, either because it is
+   * marked as `skip` by the server or because the corresponding server is
+   * unreachable, flow controlled, etc. Skipped tablets should be added to the
+   * `skipped_tablet_uid` field in `RoutingHint`; the algorithm above should
+   * then be re-run without including the skipped tablet(s) to pick the next
+   * best tablet.
+   * 
+ * + * uint32 distance = 6; + * + * @return The distance. + */ + @java.lang.Override + public int getDistance() { + return distance_; + } + + public static final int SKIP_FIELD_NUMBER = 7; + private boolean skip_ = false; + + /** + * + * + *
+   * If true, the tablet should not be chosen by the client. Typically, this
+   * signals that the tablet is unhealthy in some way. Tablets with `skip`
+   * set to true should be reported back to the server in
+   * `RoutingHint.skipped_tablet_uid`; this cues the server to send updated
+   * information for this tablet should it become usable again.
+   * 
+ * + * bool skip = 7; + * + * @return The skip. + */ + @java.lang.Override + public boolean getSkip() { + return skip_; + } + + 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 (tabletUid_ != 0L) { + output.writeUInt64(1, tabletUid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverAddress_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, serverAddress_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, location_); + } + if (role_ != com.google.spanner.v1.Tablet.Role.ROLE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, role_); + } + if (!incarnation_.isEmpty()) { + output.writeBytes(5, incarnation_); + } + if (distance_ != 0) { + output.writeUInt32(6, distance_); + } + if (skip_ != false) { + output.writeBool(7, skip_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tabletUid_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(1, tabletUid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverAddress_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, serverAddress_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, location_); + } + if (role_ != com.google.spanner.v1.Tablet.Role.ROLE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, role_); + } + if (!incarnation_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, incarnation_); + } + if (distance_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(6, distance_); + } + if (skip_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, skip_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.v1.Tablet)) { + return super.equals(obj); + } + com.google.spanner.v1.Tablet other = (com.google.spanner.v1.Tablet) obj; + + if (getTabletUid() != other.getTabletUid()) return false; + if (!getServerAddress().equals(other.getServerAddress())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (role_ != other.role_) return false; + if (!getIncarnation().equals(other.getIncarnation())) return false; + if (getDistance() != other.getDistance()) return false; + if (getSkip() != other.getSkip()) 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) + TABLET_UID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTabletUid()); + hash = (37 * hash) + SERVER_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getServerAddress().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + role_; + hash = (37 * hash) + INCARNATION_FIELD_NUMBER; + hash = (53 * hash) + getIncarnation().hashCode(); + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + getDistance(); + hash = (37 * hash) + SKIP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkip()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.v1.Tablet parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Tablet parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Tablet parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Tablet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Tablet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.v1.Tablet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.v1.Tablet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Tablet parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Tablet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Tablet parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.v1.Tablet parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.v1.Tablet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.spanner.v1.Tablet 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A `Tablet` represents a single replica of a `Group`. A tablet is served by a
+   * single server at a time, and can move between servers due to server death or
+   * simply load balancing.
+   * 
+ * + * Protobuf type {@code google.spanner.v1.Tablet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.v1.Tablet) + com.google.spanner.v1.TabletOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_Tablet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_Tablet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.Tablet.class, com.google.spanner.v1.Tablet.Builder.class); + } + + // Construct using com.google.spanner.v1.Tablet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tabletUid_ = 0L; + serverAddress_ = ""; + location_ = ""; + role_ = 0; + incarnation_ = com.google.protobuf.ByteString.EMPTY; + distance_ = 0; + skip_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.v1.LocationProto + .internal_static_google_spanner_v1_Tablet_descriptor; + } + + @java.lang.Override + public com.google.spanner.v1.Tablet getDefaultInstanceForType() { + return com.google.spanner.v1.Tablet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.v1.Tablet build() { + com.google.spanner.v1.Tablet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.v1.Tablet buildPartial() { + com.google.spanner.v1.Tablet result = new com.google.spanner.v1.Tablet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.v1.Tablet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tabletUid_ = tabletUid_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serverAddress_ = serverAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.role_ = role_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.incarnation_ = incarnation_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.distance_ = distance_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.skip_ = skip_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.v1.Tablet) { + return mergeFrom((com.google.spanner.v1.Tablet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.v1.Tablet other) { + if (other == com.google.spanner.v1.Tablet.getDefaultInstance()) return this; + if (other.getTabletUid() != 0L) { + setTabletUid(other.getTabletUid()); + } + if (!other.getServerAddress().isEmpty()) { + serverAddress_ = other.serverAddress_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.role_ != 0) { + setRoleValue(other.getRoleValue()); + } + if (!other.getIncarnation().isEmpty()) { + setIncarnation(other.getIncarnation()); + } + if (other.getDistance() != 0) { + setDistance(other.getDistance()); + } + if (other.getSkip() != false) { + setSkip(other.getSkip()); + } + 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: + { + tabletUid_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + serverAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + role_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + incarnation_ = input.readBytes(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + distance_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + skip_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + 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 long tabletUid_; + + /** + * + * + *
+     * The UID of the tablet, unique within the database. Matches the
+     * `tablet_uids` and `leader_tablet_uid` fields in `Group`.
+     * 
+ * + * uint64 tablet_uid = 1; + * + * @return The tabletUid. + */ + @java.lang.Override + public long getTabletUid() { + return tabletUid_; + } + + /** + * + * + *
+     * The UID of the tablet, unique within the database. Matches the
+     * `tablet_uids` and `leader_tablet_uid` fields in `Group`.
+     * 
+ * + * uint64 tablet_uid = 1; + * + * @param value The tabletUid to set. + * @return This builder for chaining. + */ + public Builder setTabletUid(long value) { + + tabletUid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The UID of the tablet, unique within the database. Matches the
+     * `tablet_uids` and `leader_tablet_uid` fields in `Group`.
+     * 
+ * + * uint64 tablet_uid = 1; + * + * @return This builder for chaining. + */ + public Builder clearTabletUid() { + bitField0_ = (bitField0_ & ~0x00000001); + tabletUid_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object serverAddress_ = ""; + + /** + * + * + *
+     * The address of the server that is serving this tablet -- either an IP
+     * address or DNS hostname and a port number.
+     * 
+ * + * string server_address = 2; + * + * @return The serverAddress. + */ + public java.lang.String getServerAddress() { + java.lang.Object ref = serverAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The address of the server that is serving this tablet -- either an IP
+     * address or DNS hostname and a port number.
+     * 
+ * + * string server_address = 2; + * + * @return The bytes for serverAddress. + */ + public com.google.protobuf.ByteString getServerAddressBytes() { + java.lang.Object ref = serverAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serverAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The address of the server that is serving this tablet -- either an IP
+     * address or DNS hostname and a port number.
+     * 
+ * + * string server_address = 2; + * + * @param value The serverAddress to set. + * @return This builder for chaining. + */ + public Builder setServerAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serverAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The address of the server that is serving this tablet -- either an IP
+     * address or DNS hostname and a port number.
+     * 
+ * + * string server_address = 2; + * + * @return This builder for chaining. + */ + public Builder clearServerAddress() { + serverAddress_ = getDefaultInstance().getServerAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The address of the server that is serving this tablet -- either an IP
+     * address or DNS hostname and a port number.
+     * 
+ * + * string server_address = 2; + * + * @param value The bytes for serverAddress to set. + * @return This builder for chaining. + */ + public Builder setServerAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serverAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
+     * Where this tablet is located. This is the name of a Google Cloud region,
+     * such as "us-central1".
+     * 
+ * + * string location = 3; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Where this tablet is located. This is the name of a Google Cloud region,
+     * such as "us-central1".
+     * 
+ * + * string location = 3; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Where this tablet is located. This is the name of a Google Cloud region,
+     * such as "us-central1".
+     * 
+ * + * string location = 3; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Where this tablet is located. This is the name of a Google Cloud region,
+     * such as "us-central1".
+     * 
+ * + * string location = 3; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Where this tablet is located. This is the name of a Google Cloud region,
+     * such as "us-central1".
+     * 
+ * + * string location = 3; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int role_ = 0; + + /** + * + * + *
+     * The role of the tablet.
+     * 
+ * + * .google.spanner.v1.Tablet.Role role = 4; + * + * @return The enum numeric value on the wire for role. + */ + @java.lang.Override + public int getRoleValue() { + return role_; + } + + /** + * + * + *
+     * The role of the tablet.
+     * 
+ * + * .google.spanner.v1.Tablet.Role role = 4; + * + * @param value The enum numeric value on the wire for role to set. + * @return This builder for chaining. + */ + public Builder setRoleValue(int value) { + role_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The role of the tablet.
+     * 
+ * + * .google.spanner.v1.Tablet.Role role = 4; + * + * @return The role. + */ + @java.lang.Override + public com.google.spanner.v1.Tablet.Role getRole() { + com.google.spanner.v1.Tablet.Role result = com.google.spanner.v1.Tablet.Role.forNumber(role_); + return result == null ? com.google.spanner.v1.Tablet.Role.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * The role of the tablet.
+     * 
+ * + * .google.spanner.v1.Tablet.Role role = 4; + * + * @param value The role to set. + * @return This builder for chaining. + */ + public Builder setRole(com.google.spanner.v1.Tablet.Role value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + role_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The role of the tablet.
+     * 
+ * + * .google.spanner.v1.Tablet.Role role = 4; + * + * @return This builder for chaining. + */ + public Builder clearRole() { + bitField0_ = (bitField0_ & ~0x00000008); + role_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString incarnation_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
+     * `incarnation` indicates the freshness of the tablet information contained
+     * in this proto. Incarnations can be compared lexicographically; if
+     * incarnation A is greater than incarnation B, then the `Tablet`
+     * corresponding to A is newer than the `Tablet` corresponding to B, and
+     * should be used preferentially.
+     * 
+ * + * bytes incarnation = 5; + * + * @return The incarnation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIncarnation() { + return incarnation_; + } + + /** + * + * + *
+     * `incarnation` indicates the freshness of the tablet information contained
+     * in this proto. Incarnations can be compared lexicographically; if
+     * incarnation A is greater than incarnation B, then the `Tablet`
+     * corresponding to A is newer than the `Tablet` corresponding to B, and
+     * should be used preferentially.
+     * 
+ * + * bytes incarnation = 5; + * + * @param value The incarnation to set. + * @return This builder for chaining. + */ + public Builder setIncarnation(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + incarnation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * `incarnation` indicates the freshness of the tablet information contained
+     * in this proto. Incarnations can be compared lexicographically; if
+     * incarnation A is greater than incarnation B, then the `Tablet`
+     * corresponding to A is newer than the `Tablet` corresponding to B, and
+     * should be used preferentially.
+     * 
+ * + * bytes incarnation = 5; + * + * @return This builder for chaining. + */ + public Builder clearIncarnation() { + bitField0_ = (bitField0_ & ~0x00000010); + incarnation_ = getDefaultInstance().getIncarnation(); + onChanged(); + return this; + } + + private int distance_; + + /** + * + * + *
+     * Distances help the client pick the closest tablet out of the list of
+     * tablets for a given request. Tablets with lower distances should generally
+     * be preferred. Tablets with the same distance are approximately equally
+     * close; the client can choose arbitrarily.
+     *
+     * Distances do not correspond precisely to expected latency, geographical
+     * distance, or anything else. Distances should be compared only between
+     * tablets of the same group; they are not meaningful between different
+     * groups.
+     *
+     * A value of zero indicates that the tablet may be in the same zone as
+     * the client, and have minimum network latency. A value less than or equal to
+     * five indicates that the tablet is thought to be in the same region as the
+     * client, and may have a few milliseconds of network latency. Values greater
+     * than five are most likely in a different region, with non-trivial network
+     * latency.
+     *
+     * Clients should use the following algorithm:
+     * * If the request is using a directed read, eliminate any tablets that
+     * do not match the directed read's target zone and/or replica type.
+     * * (Read-write transactions only) Choose leader tablet if it has an
+     * distance <=5.
+     * * Group and sort tablets by distance. Choose a random
+     * tablet with the lowest distance. If the request
+     * is not a directed read, only consider replicas with distances <=5.
+     * * Send the request to the fallback endpoint.
+     *
+     * The tablet picked by this algorithm may be skipped, either because it is
+     * marked as `skip` by the server or because the corresponding server is
+     * unreachable, flow controlled, etc. Skipped tablets should be added to the
+     * `skipped_tablet_uid` field in `RoutingHint`; the algorithm above should
+     * then be re-run without including the skipped tablet(s) to pick the next
+     * best tablet.
+     * 
+ * + * uint32 distance = 6; + * + * @return The distance. + */ + @java.lang.Override + public int getDistance() { + return distance_; + } + + /** + * + * + *
+     * Distances help the client pick the closest tablet out of the list of
+     * tablets for a given request. Tablets with lower distances should generally
+     * be preferred. Tablets with the same distance are approximately equally
+     * close; the client can choose arbitrarily.
+     *
+     * Distances do not correspond precisely to expected latency, geographical
+     * distance, or anything else. Distances should be compared only between
+     * tablets of the same group; they are not meaningful between different
+     * groups.
+     *
+     * A value of zero indicates that the tablet may be in the same zone as
+     * the client, and have minimum network latency. A value less than or equal to
+     * five indicates that the tablet is thought to be in the same region as the
+     * client, and may have a few milliseconds of network latency. Values greater
+     * than five are most likely in a different region, with non-trivial network
+     * latency.
+     *
+     * Clients should use the following algorithm:
+     * * If the request is using a directed read, eliminate any tablets that
+     * do not match the directed read's target zone and/or replica type.
+     * * (Read-write transactions only) Choose leader tablet if it has an
+     * distance <=5.
+     * * Group and sort tablets by distance. Choose a random
+     * tablet with the lowest distance. If the request
+     * is not a directed read, only consider replicas with distances <=5.
+     * * Send the request to the fallback endpoint.
+     *
+     * The tablet picked by this algorithm may be skipped, either because it is
+     * marked as `skip` by the server or because the corresponding server is
+     * unreachable, flow controlled, etc. Skipped tablets should be added to the
+     * `skipped_tablet_uid` field in `RoutingHint`; the algorithm above should
+     * then be re-run without including the skipped tablet(s) to pick the next
+     * best tablet.
+     * 
+ * + * uint32 distance = 6; + * + * @param value The distance to set. + * @return This builder for chaining. + */ + public Builder setDistance(int value) { + + distance_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Distances help the client pick the closest tablet out of the list of
+     * tablets for a given request. Tablets with lower distances should generally
+     * be preferred. Tablets with the same distance are approximately equally
+     * close; the client can choose arbitrarily.
+     *
+     * Distances do not correspond precisely to expected latency, geographical
+     * distance, or anything else. Distances should be compared only between
+     * tablets of the same group; they are not meaningful between different
+     * groups.
+     *
+     * A value of zero indicates that the tablet may be in the same zone as
+     * the client, and have minimum network latency. A value less than or equal to
+     * five indicates that the tablet is thought to be in the same region as the
+     * client, and may have a few milliseconds of network latency. Values greater
+     * than five are most likely in a different region, with non-trivial network
+     * latency.
+     *
+     * Clients should use the following algorithm:
+     * * If the request is using a directed read, eliminate any tablets that
+     * do not match the directed read's target zone and/or replica type.
+     * * (Read-write transactions only) Choose leader tablet if it has an
+     * distance <=5.
+     * * Group and sort tablets by distance. Choose a random
+     * tablet with the lowest distance. If the request
+     * is not a directed read, only consider replicas with distances <=5.
+     * * Send the request to the fallback endpoint.
+     *
+     * The tablet picked by this algorithm may be skipped, either because it is
+     * marked as `skip` by the server or because the corresponding server is
+     * unreachable, flow controlled, etc. Skipped tablets should be added to the
+     * `skipped_tablet_uid` field in `RoutingHint`; the algorithm above should
+     * then be re-run without including the skipped tablet(s) to pick the next
+     * best tablet.
+     * 
+ * + * uint32 distance = 6; + * + * @return This builder for chaining. + */ + public Builder clearDistance() { + bitField0_ = (bitField0_ & ~0x00000020); + distance_ = 0; + onChanged(); + return this; + } + + private boolean skip_; + + /** + * + * + *
+     * If true, the tablet should not be chosen by the client. Typically, this
+     * signals that the tablet is unhealthy in some way. Tablets with `skip`
+     * set to true should be reported back to the server in
+     * `RoutingHint.skipped_tablet_uid`; this cues the server to send updated
+     * information for this tablet should it become usable again.
+     * 
+ * + * bool skip = 7; + * + * @return The skip. + */ + @java.lang.Override + public boolean getSkip() { + return skip_; + } + + /** + * + * + *
+     * If true, the tablet should not be chosen by the client. Typically, this
+     * signals that the tablet is unhealthy in some way. Tablets with `skip`
+     * set to true should be reported back to the server in
+     * `RoutingHint.skipped_tablet_uid`; this cues the server to send updated
+     * information for this tablet should it become usable again.
+     * 
+ * + * bool skip = 7; + * + * @param value The skip to set. + * @return This builder for chaining. + */ + public Builder setSkip(boolean value) { + + skip_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * If true, the tablet should not be chosen by the client. Typically, this
+     * signals that the tablet is unhealthy in some way. Tablets with `skip`
+     * set to true should be reported back to the server in
+     * `RoutingHint.skipped_tablet_uid`; this cues the server to send updated
+     * information for this tablet should it become usable again.
+     * 
+ * + * bool skip = 7; + * + * @return This builder for chaining. + */ + public Builder clearSkip() { + bitField0_ = (bitField0_ & ~0x00000040); + skip_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.spanner.v1.Tablet) + } + + // @@protoc_insertion_point(class_scope:google.spanner.v1.Tablet) + private static final com.google.spanner.v1.Tablet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.v1.Tablet(); + } + + public static com.google.spanner.v1.Tablet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tablet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.v1.Tablet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TabletOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TabletOrBuilder.java new file mode 100644 index 00000000000..df919eebae5 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TabletOrBuilder.java @@ -0,0 +1,203 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/spanner/v1/location.proto +// Protobuf Java Version: 4.33.2 + +package com.google.spanner.v1; + +@com.google.protobuf.Generated +public interface TabletOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.Tablet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The UID of the tablet, unique within the database. Matches the
+   * `tablet_uids` and `leader_tablet_uid` fields in `Group`.
+   * 
+ * + * uint64 tablet_uid = 1; + * + * @return The tabletUid. + */ + long getTabletUid(); + + /** + * + * + *
+   * The address of the server that is serving this tablet -- either an IP
+   * address or DNS hostname and a port number.
+   * 
+ * + * string server_address = 2; + * + * @return The serverAddress. + */ + java.lang.String getServerAddress(); + + /** + * + * + *
+   * The address of the server that is serving this tablet -- either an IP
+   * address or DNS hostname and a port number.
+   * 
+ * + * string server_address = 2; + * + * @return The bytes for serverAddress. + */ + com.google.protobuf.ByteString getServerAddressBytes(); + + /** + * + * + *
+   * Where this tablet is located. This is the name of a Google Cloud region,
+   * such as "us-central1".
+   * 
+ * + * string location = 3; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
+   * Where this tablet is located. This is the name of a Google Cloud region,
+   * such as "us-central1".
+   * 
+ * + * string location = 3; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * The role of the tablet.
+   * 
+ * + * .google.spanner.v1.Tablet.Role role = 4; + * + * @return The enum numeric value on the wire for role. + */ + int getRoleValue(); + + /** + * + * + *
+   * The role of the tablet.
+   * 
+ * + * .google.spanner.v1.Tablet.Role role = 4; + * + * @return The role. + */ + com.google.spanner.v1.Tablet.Role getRole(); + + /** + * + * + *
+   * `incarnation` indicates the freshness of the tablet information contained
+   * in this proto. Incarnations can be compared lexicographically; if
+   * incarnation A is greater than incarnation B, then the `Tablet`
+   * corresponding to A is newer than the `Tablet` corresponding to B, and
+   * should be used preferentially.
+   * 
+ * + * bytes incarnation = 5; + * + * @return The incarnation. + */ + com.google.protobuf.ByteString getIncarnation(); + + /** + * + * + *
+   * Distances help the client pick the closest tablet out of the list of
+   * tablets for a given request. Tablets with lower distances should generally
+   * be preferred. Tablets with the same distance are approximately equally
+   * close; the client can choose arbitrarily.
+   *
+   * Distances do not correspond precisely to expected latency, geographical
+   * distance, or anything else. Distances should be compared only between
+   * tablets of the same group; they are not meaningful between different
+   * groups.
+   *
+   * A value of zero indicates that the tablet may be in the same zone as
+   * the client, and have minimum network latency. A value less than or equal to
+   * five indicates that the tablet is thought to be in the same region as the
+   * client, and may have a few milliseconds of network latency. Values greater
+   * than five are most likely in a different region, with non-trivial network
+   * latency.
+   *
+   * Clients should use the following algorithm:
+   * * If the request is using a directed read, eliminate any tablets that
+   * do not match the directed read's target zone and/or replica type.
+   * * (Read-write transactions only) Choose leader tablet if it has an
+   * distance <=5.
+   * * Group and sort tablets by distance. Choose a random
+   * tablet with the lowest distance. If the request
+   * is not a directed read, only consider replicas with distances <=5.
+   * * Send the request to the fallback endpoint.
+   *
+   * The tablet picked by this algorithm may be skipped, either because it is
+   * marked as `skip` by the server or because the corresponding server is
+   * unreachable, flow controlled, etc. Skipped tablets should be added to the
+   * `skipped_tablet_uid` field in `RoutingHint`; the algorithm above should
+   * then be re-run without including the skipped tablet(s) to pick the next
+   * best tablet.
+   * 
+ * + * uint32 distance = 6; + * + * @return The distance. + */ + int getDistance(); + + /** + * + * + *
+   * If true, the tablet should not be chosen by the client. Typically, this
+   * signals that the tablet is unhealthy in some way. Tablets with `skip`
+   * set to true should be reported back to the server in
+   * `RoutingHint.skipped_tablet_uid`; this cues the server to send updated
+   * information for this tablet should it become usable again.
+   * 
+ * + * bool skip = 7; + * + * @return The skip. + */ + boolean getSkip(); +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Transaction.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Transaction.java index 1745b741255..8cf66a0d30f 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Transaction.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Transaction.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/transaction.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.Transaction} */ -public final class Transaction extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Transaction extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.Transaction) TransactionOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Transaction"); + } + // Use Transaction.newBuilder() to construct. - private Transaction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Transaction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private Transaction() { id_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Transaction(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_Transaction_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_Transaction_fieldAccessorTable @@ -231,6 +237,80 @@ public com.google.spanner.v1.MultiplexedSessionPrecommitToken getPrecommitToken( : precommitToken_; } + public static final int CACHE_UPDATE_FIELD_NUMBER = 5; + private com.google.spanner.v1.CacheUpdate cacheUpdate_; + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + @java.lang.Override + public boolean hasCacheUpdate() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + @java.lang.Override + public com.google.spanner.v1.CacheUpdate getCacheUpdate() { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder() { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -254,6 +334,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getPrecommitToken()); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getCacheUpdate()); + } getUnknownFields().writeTo(output); } @@ -272,6 +355,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPrecommitToken()); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCacheUpdate()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -296,6 +382,10 @@ public boolean equals(final java.lang.Object obj) { if (hasPrecommitToken()) { if (!getPrecommitToken().equals(other.getPrecommitToken())) return false; } + if (hasCacheUpdate() != other.hasCacheUpdate()) return false; + if (hasCacheUpdate()) { + if (!getCacheUpdate().equals(other.getCacheUpdate())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,6 +407,10 @@ public int hashCode() { hash = (37 * hash) + PRECOMMIT_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPrecommitToken().hashCode(); } + if (hasCacheUpdate()) { + hash = (37 * hash) + CACHE_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getCacheUpdate().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -358,38 +452,38 @@ public static com.google.spanner.v1.Transaction parseFrom( public static com.google.spanner.v1.Transaction parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Transaction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Transaction parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.Transaction parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Transaction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Transaction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -412,7 +506,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -426,7 +520,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.Transaction} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.Transaction) com.google.spanner.v1.TransactionOrBuilder { @@ -436,7 +530,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_Transaction_fieldAccessorTable @@ -450,15 +544,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getReadTimestampFieldBuilder(); - getPrecommitTokenFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetReadTimestampFieldBuilder(); + internalGetPrecommitTokenFieldBuilder(); + internalGetCacheUpdateFieldBuilder(); } } @@ -477,6 +572,11 @@ public Builder clear() { precommitTokenBuilder_.dispose(); precommitTokenBuilder_ = null; } + cacheUpdate_ = null; + if (cacheUpdateBuilder_ != null) { + cacheUpdateBuilder_.dispose(); + cacheUpdateBuilder_ = null; + } return this; } @@ -526,42 +626,14 @@ private void buildPartial0(com.google.spanner.v1.Transaction result) { precommitTokenBuilder_ == null ? precommitToken_ : precommitTokenBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cacheUpdate_ = + cacheUpdateBuilder_ == null ? cacheUpdate_ : cacheUpdateBuilder_.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.v1.Transaction) { @@ -574,7 +646,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.spanner.v1.Transaction other) { if (other == com.google.spanner.v1.Transaction.getDefaultInstance()) return this; - if (other.getId() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getId().isEmpty()) { setId(other.getId()); } if (other.hasReadTimestamp()) { @@ -583,6 +655,9 @@ public Builder mergeFrom(com.google.spanner.v1.Transaction other) { if (other.hasPrecommitToken()) { mergePrecommitToken(other.getPrecommitToken()); } + if (other.hasCacheUpdate()) { + mergeCacheUpdate(other.getCacheUpdate()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -617,16 +692,25 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getReadTimestampFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetReadTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPrecommitTokenFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 + case 42: + { + input.readMessage( + internalGetCacheUpdateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -726,7 +810,7 @@ public Builder clearId() { } private com.google.protobuf.Timestamp readTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -906,7 +990,7 @@ public Builder clearReadTimestamp() { public com.google.protobuf.Timestamp.Builder getReadTimestampBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getReadTimestampFieldBuilder().getBuilder(); + return internalGetReadTimestampFieldBuilder().getBuilder(); } /** @@ -947,14 +1031,14 @@ public com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder() { * * .google.protobuf.Timestamp read_timestamp = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimestampFieldBuilder() { + internalGetReadTimestampFieldBuilder() { if (readTimestampBuilder_ == null) { readTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -965,7 +1049,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder() { } private com.google.spanner.v1.MultiplexedSessionPrecommitToken precommitToken_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> @@ -1156,7 +1240,7 @@ public Builder clearPrecommitToken() { getPrecommitTokenBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getPrecommitTokenFieldBuilder().getBuilder(); + return internalGetPrecommitTokenFieldBuilder().getBuilder(); } /** @@ -1200,14 +1284,14 @@ public Builder clearPrecommitToken() { * * .google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder> - getPrecommitTokenFieldBuilder() { + internalGetPrecommitTokenFieldBuilder() { if (precommitTokenBuilder_ == null) { precommitTokenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.MultiplexedSessionPrecommitToken, com.google.spanner.v1.MultiplexedSessionPrecommitToken.Builder, com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder>( @@ -1217,15 +1301,261 @@ public Builder clearPrecommitToken() { return precommitTokenBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.spanner.v1.CacheUpdate cacheUpdate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder> + cacheUpdateBuilder_; + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + public boolean hasCacheUpdate() { + return ((bitField0_ & 0x00000008) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + public com.google.spanner.v1.CacheUpdate getCacheUpdate() { + if (cacheUpdateBuilder_ == null) { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } else { + return cacheUpdateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCacheUpdate(com.google.spanner.v1.CacheUpdate value) { + if (cacheUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cacheUpdate_ = value; + } else { + cacheUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCacheUpdate(com.google.spanner.v1.CacheUpdate.Builder builderForValue) { + if (cacheUpdateBuilder_ == null) { + cacheUpdate_ = builderForValue.build(); + } else { + cacheUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCacheUpdate(com.google.spanner.v1.CacheUpdate value) { + if (cacheUpdateBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && cacheUpdate_ != null + && cacheUpdate_ != com.google.spanner.v1.CacheUpdate.getDefaultInstance()) { + getCacheUpdateBuilder().mergeFrom(value); + } else { + cacheUpdate_ = value; + } + } else { + cacheUpdateBuilder_.mergeFrom(value); + } + if (cacheUpdate_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCacheUpdate() { + bitField0_ = (bitField0_ & ~0x00000008); + cacheUpdate_ = null; + if (cacheUpdateBuilder_ != null) { + cacheUpdateBuilder_.dispose(); + cacheUpdateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.CacheUpdate.Builder getCacheUpdateBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCacheUpdateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder() { + if (cacheUpdateBuilder_ != null) { + return cacheUpdateBuilder_.getMessageOrBuilder(); + } else { + return cacheUpdate_ == null + ? com.google.spanner.v1.CacheUpdate.getDefaultInstance() + : cacheUpdate_; + } + } + + /** + * + * + *
+     * Optional. A cache update expresses a set of changes the client should
+     * incorporate into its location cache. The client should discard the changes
+     * if they are older than the data it already has. This data can be obtained
+     * in response to requests that included a `RoutingHint` field, but may also
+     * be obtained by explicit location-fetching RPCs which may be added in the
+     * future.
+     * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder> + internalGetCacheUpdateFieldBuilder() { + if (cacheUpdateBuilder_ == null) { + cacheUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.spanner.v1.CacheUpdate, + com.google.spanner.v1.CacheUpdate.Builder, + com.google.spanner.v1.CacheUpdateOrBuilder>( + getCacheUpdate(), getParentForChildren(), isClean()); + cacheUpdate_ = null; + } + return cacheUpdateBuilder_; } // @@protoc_insertion_point(builder_scope:google.spanner.v1.Transaction) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptions.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptions.java index a95462e8391..ecba9c42e3e 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptions.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/transaction.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -28,14 +29,25 @@ * * Protobuf type {@code google.spanner.v1.TransactionOptions} */ -public final class TransactionOptions extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class TransactionOptions extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.TransactionOptions) TransactionOptionsOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TransactionOptions"); + } + // Use TransactionOptions.newBuilder() to construct. - private TransactionOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TransactionOptions(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +55,13 @@ private TransactionOptions() { isolationLevel_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TransactionOptions(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_fieldAccessorTable @@ -68,7 +74,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * `IsolationLevel` is used when setting `isolation_level` for a transaction.
+   * `IsolationLevel` is used when setting the [isolation
+   * level](https://cloud.google.com/spanner/docs/isolation-levels) for a
+   * transaction.
    * 
* * Protobuf enum {@code google.spanner.v1.TransactionOptions.IsolationLevel} @@ -115,7 +123,7 @@ public enum IsolationLevel implements com.google.protobuf.ProtocolMessageEnum { * `SERIALIZABLE` transactions, only write-write conflicts are detected in * snapshot transactions. * - * This isolation level does not support Read-only and Partitioned DML + * This isolation level does not support read-only and partitioned DML * transactions. * * When `REPEATABLE_READ` is specified on a read-write transaction, the @@ -128,6 +136,16 @@ public enum IsolationLevel implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IsolationLevel"); + } + /** * * @@ -171,7 +189,7 @@ public enum IsolationLevel implements com.google.protobuf.ProtocolMessageEnum { * `SERIALIZABLE` transactions, only write-write conflicts are detected in * snapshot transactions. * - * This isolation level does not support Read-only and Partitioned DML + * This isolation level does not support read-only and partitioned DML * transactions. * * When `REPEATABLE_READ` is specified on a read-write transaction, the @@ -240,7 +258,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.TransactionOptions.getDescriptor().getEnumTypes().get(0); } @@ -324,14 +342,24 @@ public interface ReadWriteOrBuilder * * Protobuf type {@code google.spanner.v1.TransactionOptions.ReadWrite} */ - public static final class ReadWrite extends com.google.protobuf.GeneratedMessageV3 + public static final class ReadWrite extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.TransactionOptions.ReadWrite) ReadWriteOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadWrite"); + } + // Use ReadWrite.newBuilder() to construct. - private ReadWrite(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadWrite(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -340,19 +368,13 @@ private ReadWrite() { multiplexedSessionPreviousTransactionId_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadWrite(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_ReadWrite_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_ReadWrite_fieldAccessorTable @@ -379,17 +401,15 @@ public enum ReadLockMode implements com.google.protobuf.ProtocolMessageEnum { * Default value. * * * If isolation level is - * [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ], - * then it is an error to specify `read_lock_mode`. Locking semantics - * default to `OPTIMISTIC`. No validation checks are done for reads, - * except to validate that the data that was served at the snapshot time - * is unchanged at commit time in the following cases: - * 1. reads done as part of queries that use `SELECT FOR UPDATE` - * 2. reads done as part of statements with a `LOCK_SCANNED_RANGES` - * hint - * 3. reads done as part of DML statements - * * At all other isolation levels, if `read_lock_mode` is the default - * value, then pessimistic read locks are used. + * [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE], + * locking semantics default to `PESSIMISTIC`. + * * If isolation level is + * [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ], + * locking semantics default to `OPTIMISTIC`. + * * See + * [Concurrency + * control](https://cloud.google.com/spanner/docs/concurrency-control) + * for more details. *
* * READ_LOCK_MODE_UNSPECIFIED = 0; @@ -401,10 +421,17 @@ public enum ReadLockMode implements com.google.protobuf.ProtocolMessageEnum { *
        * Pessimistic lock mode.
        *
-       * Read locks are acquired immediately on read.
-       * Semantics described only applies to
+       * Lock acquisition behavior depends on the isolation level in use. In
        * [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE]
-       * isolation.
+       * isolation, reads and writes acquire necessary locks during transaction
+       * statement execution. In
+       * [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ]
+       * isolation, reads that explicitly request to be locked and writes
+       * acquire locks.
+       * See
+       * [Concurrency
+       * control](https://cloud.google.com/spanner/docs/concurrency-control) for
+       * details on the types of locks acquired at each transaction step.
        * 
* * PESSIMISTIC = 1; @@ -416,12 +443,18 @@ public enum ReadLockMode implements com.google.protobuf.ProtocolMessageEnum { *
        * Optimistic lock mode.
        *
-       * Locks for reads within the transaction are not acquired on read.
-       * Instead the locks are acquired on a commit to validate that
-       * read/queried data has not changed since the transaction started.
-       * Semantics described only applies to
+       * Lock acquisition behavior depends on the isolation level in use. In
+       * both
        * [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE]
-       * isolation.
+       * and
+       * [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ]
+       * isolation, reads and writes do not acquire locks during transaction
+       * statement execution.
+       * See
+       * [Concurrency
+       * control](https://cloud.google.com/spanner/docs/concurrency-control) for
+       * details on how the guarantees of each isolation level are provided at
+       * commit time.
        * 
* * OPTIMISTIC = 2; @@ -430,6 +463,16 @@ public enum ReadLockMode implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadLockMode"); + } + /** * * @@ -437,17 +480,15 @@ public enum ReadLockMode implements com.google.protobuf.ProtocolMessageEnum { * Default value. * * * If isolation level is - * [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ], - * then it is an error to specify `read_lock_mode`. Locking semantics - * default to `OPTIMISTIC`. No validation checks are done for reads, - * except to validate that the data that was served at the snapshot time - * is unchanged at commit time in the following cases: - * 1. reads done as part of queries that use `SELECT FOR UPDATE` - * 2. reads done as part of statements with a `LOCK_SCANNED_RANGES` - * hint - * 3. reads done as part of DML statements - * * At all other isolation levels, if `read_lock_mode` is the default - * value, then pessimistic read locks are used. + * [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE], + * locking semantics default to `PESSIMISTIC`. + * * If isolation level is + * [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ], + * locking semantics default to `OPTIMISTIC`. + * * See + * [Concurrency + * control](https://cloud.google.com/spanner/docs/concurrency-control) + * for more details. *
* * READ_LOCK_MODE_UNSPECIFIED = 0; @@ -460,10 +501,17 @@ public enum ReadLockMode implements com.google.protobuf.ProtocolMessageEnum { *
        * Pessimistic lock mode.
        *
-       * Read locks are acquired immediately on read.
-       * Semantics described only applies to
+       * Lock acquisition behavior depends on the isolation level in use. In
        * [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE]
-       * isolation.
+       * isolation, reads and writes acquire necessary locks during transaction
+       * statement execution. In
+       * [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ]
+       * isolation, reads that explicitly request to be locked and writes
+       * acquire locks.
+       * See
+       * [Concurrency
+       * control](https://cloud.google.com/spanner/docs/concurrency-control) for
+       * details on the types of locks acquired at each transaction step.
        * 
* * PESSIMISTIC = 1; @@ -476,12 +524,18 @@ public enum ReadLockMode implements com.google.protobuf.ProtocolMessageEnum { *
        * Optimistic lock mode.
        *
-       * Locks for reads within the transaction are not acquired on read.
-       * Instead the locks are acquired on a commit to validate that
-       * read/queried data has not changed since the transaction started.
-       * Semantics described only applies to
+       * Lock acquisition behavior depends on the isolation level in use. In
+       * both
        * [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE]
-       * isolation.
+       * and
+       * [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ]
+       * isolation, reads and writes do not acquire locks during transaction
+       * statement execution.
+       * See
+       * [Concurrency
+       * control](https://cloud.google.com/spanner/docs/concurrency-control) for
+       * details on how the guarantees of each isolation level are provided at
+       * commit time.
        * 
* * OPTIMISTIC = 2; @@ -546,7 +600,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.TransactionOptions.ReadWrite.getDescriptor() .getEnumTypes() .get(0); @@ -755,38 +809,38 @@ public static com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( public static com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionOptions.ReadWrite parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions.ReadWrite parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions.ReadWrite parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -809,8 +863,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -825,8 +878,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.TransactionOptions.ReadWrite} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.TransactionOptions.ReadWrite) com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder { @@ -836,7 +888,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_ReadWrite_fieldAccessorTable @@ -848,7 +900,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.TransactionOptions.ReadWrite.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -903,41 +955,6 @@ private void buildPartial0(com.google.spanner.v1.TransactionOptions.ReadWrite re } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.TransactionOptions.ReadWrite) { @@ -954,8 +971,7 @@ public Builder mergeFrom(com.google.spanner.v1.TransactionOptions.ReadWrite othe if (other.readLockMode_ != 0) { setReadLockModeValue(other.getReadLockModeValue()); } - if (other.getMultiplexedSessionPreviousTransactionId() - != com.google.protobuf.ByteString.EMPTY) { + if (!other.getMultiplexedSessionPreviousTransactionId().isEmpty()) { setMultiplexedSessionPreviousTransactionId( other.getMultiplexedSessionPreviousTransactionId()); } @@ -1193,18 +1209,6 @@ public Builder clearMultiplexedSessionPreviousTransactionId() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.TransactionOptions.ReadWrite) } @@ -1271,32 +1275,36 @@ public interface PartitionedDmlOrBuilder * * Protobuf type {@code google.spanner.v1.TransactionOptions.PartitionedDml} */ - public static final class PartitionedDml extends com.google.protobuf.GeneratedMessageV3 + public static final class PartitionedDml extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.TransactionOptions.PartitionedDml) PartitionedDmlOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartitionedDml"); + } + // Use PartitionedDml.newBuilder() to construct. - private PartitionedDml(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartitionedDml(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private PartitionedDml() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartitionedDml(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_PartitionedDml_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_PartitionedDml_fieldAccessorTable @@ -1397,38 +1405,38 @@ public static com.google.spanner.v1.TransactionOptions.PartitionedDml parseFrom( public static com.google.spanner.v1.TransactionOptions.PartitionedDml parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions.PartitionedDml parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionOptions.PartitionedDml parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions.PartitionedDml parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionOptions.PartitionedDml parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions.PartitionedDml parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -1452,8 +1460,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1467,8 +1474,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.TransactionOptions.PartitionedDml} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.TransactionOptions.PartitionedDml) com.google.spanner.v1.TransactionOptions.PartitionedDmlOrBuilder { @@ -1478,7 +1484,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_PartitionedDml_fieldAccessorTable @@ -1490,7 +1496,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.TransactionOptions.PartitionedDml.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1528,41 +1534,6 @@ public com.google.spanner.v1.TransactionOptions.PartitionedDml buildPartial() { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.TransactionOptions.PartitionedDml) { @@ -1619,18 +1590,6 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.TransactionOptions.PartitionedDml) } @@ -2017,32 +1976,36 @@ public interface ReadOnlyOrBuilder * * Protobuf type {@code google.spanner.v1.TransactionOptions.ReadOnly} */ - public static final class ReadOnly extends com.google.protobuf.GeneratedMessageV3 + public static final class ReadOnly extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.TransactionOptions.ReadOnly) ReadOnlyOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadOnly"); + } + // Use ReadOnly.newBuilder() to construct. - private ReadOnly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadOnly(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ReadOnly() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadOnly(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_ReadOnly_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_ReadOnly_fieldAccessorTable @@ -2697,38 +2660,38 @@ public static com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( public static com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionOptions.ReadOnly parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions.ReadOnly parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions.ReadOnly parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -2751,8 +2714,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2766,8 +2728,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.spanner.v1.TransactionOptions.ReadOnly} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.TransactionOptions.ReadOnly) com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder { @@ -2777,7 +2738,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_ReadOnly_fieldAccessorTable @@ -2789,7 +2750,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.TransactionOptions.ReadOnly.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2871,41 +2832,6 @@ private void buildPartialOneofs(com.google.spanner.v1.TransactionOptions.ReadOnl } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.TransactionOptions.ReadOnly) { @@ -2988,26 +2914,28 @@ public Builder mergeFrom( case 18: { input.readMessage( - getMinReadTimestampFieldBuilder().getBuilder(), extensionRegistry); + internalGetMinReadTimestampFieldBuilder().getBuilder(), extensionRegistry); timestampBoundCase_ = 2; break; } // case 18 case 26: { - input.readMessage(getMaxStalenessFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMaxStalenessFieldBuilder().getBuilder(), extensionRegistry); timestampBoundCase_ = 3; break; } // case 26 case 34: { - input.readMessage(getReadTimestampFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetReadTimestampFieldBuilder().getBuilder(), extensionRegistry); timestampBoundCase_ = 4; break; } // case 34 case 42: { input.readMessage( - getExactStalenessFieldBuilder().getBuilder(), extensionRegistry); + internalGetExactStalenessFieldBuilder().getBuilder(), extensionRegistry); timestampBoundCase_ = 5; break; } // case 42 @@ -3127,7 +3055,7 @@ public Builder clearStrong() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -3350,7 +3278,7 @@ public Builder clearMinReadTimestamp() { * .google.protobuf.Timestamp min_read_timestamp = 2; */ public com.google.protobuf.Timestamp.Builder getMinReadTimestampBuilder() { - return getMinReadTimestampFieldBuilder().getBuilder(); + return internalGetMinReadTimestampFieldBuilder().getBuilder(); } /** @@ -3401,17 +3329,17 @@ public com.google.protobuf.TimestampOrBuilder getMinReadTimestampOrBuilder() { * * .google.protobuf.Timestamp min_read_timestamp = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getMinReadTimestampFieldBuilder() { + internalGetMinReadTimestampFieldBuilder() { if (minReadTimestampBuilder_ == null) { if (!(timestampBoundCase_ == 2)) { timestampBound_ = com.google.protobuf.Timestamp.getDefaultInstance(); } minReadTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -3425,7 +3353,7 @@ public com.google.protobuf.TimestampOrBuilder getMinReadTimestampOrBuilder() { return minReadTimestampBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> @@ -3669,7 +3597,7 @@ public Builder clearMaxStaleness() { * .google.protobuf.Duration max_staleness = 3; */ public com.google.protobuf.Duration.Builder getMaxStalenessBuilder() { - return getMaxStalenessFieldBuilder().getBuilder(); + return internalGetMaxStalenessFieldBuilder().getBuilder(); } /** @@ -3726,17 +3654,17 @@ public com.google.protobuf.DurationOrBuilder getMaxStalenessOrBuilder() { * * .google.protobuf.Duration max_staleness = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getMaxStalenessFieldBuilder() { + internalGetMaxStalenessFieldBuilder() { if (maxStalenessBuilder_ == null) { if (!(timestampBoundCase_ == 3)) { timestampBound_ = com.google.protobuf.Duration.getDefaultInstance(); } maxStalenessBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -3750,7 +3678,7 @@ public com.google.protobuf.DurationOrBuilder getMaxStalenessOrBuilder() { return maxStalenessBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -3987,7 +3915,7 @@ public Builder clearReadTimestamp() { * .google.protobuf.Timestamp read_timestamp = 4; */ public com.google.protobuf.Timestamp.Builder getReadTimestampBuilder() { - return getReadTimestampFieldBuilder().getBuilder(); + return internalGetReadTimestampFieldBuilder().getBuilder(); } /** @@ -4042,17 +3970,17 @@ public com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder() { * * .google.protobuf.Timestamp read_timestamp = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimestampFieldBuilder() { + internalGetReadTimestampFieldBuilder() { if (readTimestampBuilder_ == null) { if (!(timestampBoundCase_ == 4)) { timestampBound_ = com.google.protobuf.Timestamp.getDefaultInstance(); } readTimestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -4066,7 +3994,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder() { return readTimestampBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> @@ -4296,7 +4224,7 @@ public Builder clearExactStaleness() { * .google.protobuf.Duration exact_staleness = 5; */ public com.google.protobuf.Duration.Builder getExactStalenessBuilder() { - return getExactStalenessFieldBuilder().getBuilder(); + return internalGetExactStalenessFieldBuilder().getBuilder(); } /** @@ -4349,17 +4277,17 @@ public com.google.protobuf.DurationOrBuilder getExactStalenessOrBuilder() { * * .google.protobuf.Duration exact_staleness = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getExactStalenessFieldBuilder() { + internalGetExactStalenessFieldBuilder() { if (exactStalenessBuilder_ == null) { if (!(timestampBoundCase_ == 5)) { timestampBound_ = com.google.protobuf.Duration.getDefaultInstance(); } exactStalenessBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -4435,18 +4363,6 @@ public Builder clearReturnReadTimestamp() { return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.TransactionOptions.ReadOnly) } @@ -4763,11 +4679,11 @@ public com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrB * * * If the DDL option `allow_txn_exclusion` is set to `true`, then the * updates - * made within this transaction aren't recorded in the change stream. + * made within this transaction aren't recorded in the change stream. * * * If you don't set the DDL option `allow_txn_exclusion` or if it's - * set to `false`, then the updates made within this transaction are - * recorded in the change stream. + * set to `false`, then the updates made within this transaction are + * recorded in the change stream. * * When `exclude_txn_from_change_streams` is set to `false` or not set, * modifications from this transaction are recorded in all change streams @@ -4994,38 +4910,38 @@ public static com.google.spanner.v1.TransactionOptions parseFrom( public static com.google.spanner.v1.TransactionOptions parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionOptions parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -5048,7 +4964,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -5062,7 +4978,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.TransactionOptions} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.TransactionOptions) com.google.spanner.v1.TransactionOptionsOrBuilder { @@ -5072,7 +4988,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionOptions_fieldAccessorTable @@ -5084,7 +5000,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.TransactionOptions.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -5164,39 +5080,6 @@ private void buildPartialOneofs(com.google.spanner.v1.TransactionOptions result) } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.TransactionOptions) { @@ -5264,19 +5147,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getReadWriteFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetReadWriteFieldBuilder().getBuilder(), extensionRegistry); modeCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getReadOnlyFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetReadOnlyFieldBuilder().getBuilder(), extensionRegistry); modeCase_ = 2; break; } // case 18 case 26: { - input.readMessage(getPartitionedDmlFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPartitionedDmlFieldBuilder().getBuilder(), extensionRegistry); modeCase_ = 3; break; } // case 26 @@ -5325,7 +5211,7 @@ public Builder clearMode() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions.ReadWrite, com.google.spanner.v1.TransactionOptions.ReadWrite.Builder, com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder> @@ -5514,7 +5400,7 @@ public Builder clearReadWrite() { * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ public com.google.spanner.v1.TransactionOptions.ReadWrite.Builder getReadWriteBuilder() { - return getReadWriteFieldBuilder().getBuilder(); + return internalGetReadWriteFieldBuilder().getBuilder(); } /** @@ -5555,17 +5441,17 @@ public com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder getReadWriteO * * .google.spanner.v1.TransactionOptions.ReadWrite read_write = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions.ReadWrite, com.google.spanner.v1.TransactionOptions.ReadWrite.Builder, com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder> - getReadWriteFieldBuilder() { + internalGetReadWriteFieldBuilder() { if (readWriteBuilder_ == null) { if (!(modeCase_ == 1)) { mode_ = com.google.spanner.v1.TransactionOptions.ReadWrite.getDefaultInstance(); } readWriteBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions.ReadWrite, com.google.spanner.v1.TransactionOptions.ReadWrite.Builder, com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder>( @@ -5579,7 +5465,7 @@ public com.google.spanner.v1.TransactionOptions.ReadWriteOrBuilder getReadWriteO return readWriteBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions.PartitionedDml, com.google.spanner.v1.TransactionOptions.PartitionedDml.Builder, com.google.spanner.v1.TransactionOptions.PartitionedDmlOrBuilder> @@ -5772,7 +5658,7 @@ public Builder clearPartitionedDml() { */ public com.google.spanner.v1.TransactionOptions.PartitionedDml.Builder getPartitionedDmlBuilder() { - return getPartitionedDmlFieldBuilder().getBuilder(); + return internalGetPartitionedDmlFieldBuilder().getBuilder(); } /** @@ -5814,17 +5700,17 @@ public Builder clearPartitionedDml() { * * .google.spanner.v1.TransactionOptions.PartitionedDml partitioned_dml = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions.PartitionedDml, com.google.spanner.v1.TransactionOptions.PartitionedDml.Builder, com.google.spanner.v1.TransactionOptions.PartitionedDmlOrBuilder> - getPartitionedDmlFieldBuilder() { + internalGetPartitionedDmlFieldBuilder() { if (partitionedDmlBuilder_ == null) { if (!(modeCase_ == 3)) { mode_ = com.google.spanner.v1.TransactionOptions.PartitionedDml.getDefaultInstance(); } partitionedDmlBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions.PartitionedDml, com.google.spanner.v1.TransactionOptions.PartitionedDml.Builder, com.google.spanner.v1.TransactionOptions.PartitionedDmlOrBuilder>( @@ -5838,7 +5724,7 @@ public Builder clearPartitionedDml() { return partitionedDmlBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions.ReadOnly, com.google.spanner.v1.TransactionOptions.ReadOnly.Builder, com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder> @@ -6027,7 +5913,7 @@ public Builder clearReadOnly() { * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ public com.google.spanner.v1.TransactionOptions.ReadOnly.Builder getReadOnlyBuilder() { - return getReadOnlyFieldBuilder().getBuilder(); + return internalGetReadOnlyFieldBuilder().getBuilder(); } /** @@ -6068,17 +5954,17 @@ public com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrB * * .google.spanner.v1.TransactionOptions.ReadOnly read_only = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions.ReadOnly, com.google.spanner.v1.TransactionOptions.ReadOnly.Builder, com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder> - getReadOnlyFieldBuilder() { + internalGetReadOnlyFieldBuilder() { if (readOnlyBuilder_ == null) { if (!(modeCase_ == 2)) { mode_ = com.google.spanner.v1.TransactionOptions.ReadOnly.getDefaultInstance(); } readOnlyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions.ReadOnly, com.google.spanner.v1.TransactionOptions.ReadOnly.Builder, com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder>( @@ -6103,11 +5989,11 @@ public com.google.spanner.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrB * * * If the DDL option `allow_txn_exclusion` is set to `true`, then the * updates - * made within this transaction aren't recorded in the change stream. + * made within this transaction aren't recorded in the change stream. * * * If you don't set the DDL option `allow_txn_exclusion` or if it's - * set to `false`, then the updates made within this transaction are - * recorded in the change stream. + * set to `false`, then the updates made within this transaction are + * recorded in the change stream. * * When `exclude_txn_from_change_streams` is set to `false` or not set, * modifications from this transaction are recorded in all change streams @@ -6136,11 +6022,11 @@ public boolean getExcludeTxnFromChangeStreams() { * * * If the DDL option `allow_txn_exclusion` is set to `true`, then the * updates - * made within this transaction aren't recorded in the change stream. + * made within this transaction aren't recorded in the change stream. * * * If you don't set the DDL option `allow_txn_exclusion` or if it's - * set to `false`, then the updates made within this transaction are - * recorded in the change stream. + * set to `false`, then the updates made within this transaction are + * recorded in the change stream. * * When `exclude_txn_from_change_streams` is set to `false` or not set, * modifications from this transaction are recorded in all change streams @@ -6173,11 +6059,11 @@ public Builder setExcludeTxnFromChangeStreams(boolean value) { * * * If the DDL option `allow_txn_exclusion` is set to `true`, then the * updates - * made within this transaction aren't recorded in the change stream. + * made within this transaction aren't recorded in the change stream. * * * If you don't set the DDL option `allow_txn_exclusion` or if it's - * set to `false`, then the updates made within this transaction are - * recorded in the change stream. + * set to `false`, then the updates made within this transaction are + * recorded in the change stream. * * When `exclude_txn_from_change_streams` is set to `false` or not set, * modifications from this transaction are recorded in all change streams @@ -6297,17 +6183,6 @@ public Builder clearIsolationLevel() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.TransactionOptions) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptionsOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptionsOrBuilder.java index 6d8ceb61676..06dad5e90e4 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptionsOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOptionsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/transaction.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface TransactionOptionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.TransactionOptions) @@ -180,11 +182,11 @@ public interface TransactionOptionsOrBuilder * * * If the DDL option `allow_txn_exclusion` is set to `true`, then the * updates - * made within this transaction aren't recorded in the change stream. + * made within this transaction aren't recorded in the change stream. * * * If you don't set the DDL option `allow_txn_exclusion` or if it's - * set to `false`, then the updates made within this transaction are - * recorded in the change stream. + * set to `false`, then the updates made within this transaction are + * recorded in the change stream. * * When `exclude_txn_from_change_streams` is set to `false` or not set, * modifications from this transaction are recorded in all change streams diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOrBuilder.java index 20e82465290..53adafa6a3a 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/transaction.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface TransactionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.Transaction) @@ -150,4 +152,62 @@ public interface TransactionOrBuilder * .google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 3; */ com.google.spanner.v1.MultiplexedSessionPrecommitTokenOrBuilder getPrecommitTokenOrBuilder(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cacheUpdate field is set. + */ + boolean hasCacheUpdate(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cacheUpdate. + */ + com.google.spanner.v1.CacheUpdate getCacheUpdate(); + + /** + * + * + *
+   * Optional. A cache update expresses a set of changes the client should
+   * incorporate into its location cache. The client should discard the changes
+   * if they are older than the data it already has. This data can be obtained
+   * in response to requests that included a `RoutingHint` field, but may also
+   * be obtained by explicit location-fetching RPCs which may be added in the
+   * future.
+   * 
+ * + * + * .google.spanner.v1.CacheUpdate cache_update = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.v1.CacheUpdateOrBuilder getCacheUpdateOrBuilder(); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionProto.java index e682eb52204..bbfedb2eb48 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/transaction.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; -public final class TransactionProto { +@com.google.protobuf.Generated +public final class TransactionProto extends com.google.protobuf.GeneratedFile { private TransactionProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TransactionProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,31 +42,31 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_TransactionOptions_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_TransactionOptions_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_TransactionOptions_ReadWrite_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_TransactionOptions_ReadWrite_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_TransactionOptions_PartitionedDml_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_TransactionOptions_PartitionedDml_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_TransactionOptions_ReadOnly_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_TransactionOptions_ReadOnly_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_Transaction_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_Transaction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_TransactionSelector_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_TransactionSelector_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_MultiplexedSessionPrecommitToken_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_MultiplexedSessionPrecommitToken_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -68,48 +80,50 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n#google/spanner/v1/transaction.proto\022\021g" + "oogle.spanner.v1\032\037google/api/field_behav" + "ior.proto\032\036google/protobuf/duration.prot" - + "o\032\037google/protobuf/timestamp.proto\"\367\007\n\022T" - + "ransactionOptions\022E\n\nread_write\030\001 \001(\0132/." - + "google.spanner.v1.TransactionOptions.Rea" - + "dWriteH\000\022O\n\017partitioned_dml\030\003 \001(\01324.goog" - + "le.spanner.v1.TransactionOptions.Partiti" - + "onedDmlH\000\022C\n\tread_only\030\002 \001(\0132..google.sp" - + "anner.v1.TransactionOptions.ReadOnlyH\000\022\'" - + "\n\037exclude_txn_from_change_streams\030\005 \001(\010\022" - + "M\n\017isolation_level\030\006 \001(\01624.google.spanne" - + "r.v1.TransactionOptions.IsolationLevel\032\354" - + "\001\n\tReadWrite\022T\n\016read_lock_mode\030\001 \001(\0162<.g" - + "oogle.spanner.v1.TransactionOptions.Read" - + "Write.ReadLockMode\0228\n+multiplexed_sessio" - + "n_previous_transaction_id\030\002 \001(\014B\003\340A\001\"O\n\014" - + "ReadLockMode\022\036\n\032READ_LOCK_MODE_UNSPECIFI" - + "ED\020\000\022\017\n\013PESSIMISTIC\020\001\022\016\n\nOPTIMISTIC\020\002\032\020\n" - + "\016PartitionedDml\032\250\002\n\010ReadOnly\022\020\n\006strong\030\001" - + " \001(\010H\000\0228\n\022min_read_timestamp\030\002 \001(\0132\032.goo" - + "gle.protobuf.TimestampH\000\0222\n\rmax_stalenes" - + "s\030\003 \001(\0132\031.google.protobuf.DurationH\000\0224\n\016" - + "read_timestamp\030\004 \001(\0132\032.google.protobuf.T" - + "imestampH\000\0224\n\017exact_staleness\030\005 \001(\0132\031.go" - + "ogle.protobuf.DurationH\000\022\035\n\025return_read_" - + "timestamp\030\006 \001(\010B\021\n\017timestamp_bound\"X\n\016Is" - + "olationLevel\022\037\n\033ISOLATION_LEVEL_UNSPECIF" - + "IED\020\000\022\020\n\014SERIALIZABLE\020\001\022\023\n\017REPEATABLE_RE" - + "AD\020\002B\006\n\004mode\"\233\001\n\013Transaction\022\n\n\002id\030\001 \001(\014" - + "\0222\n\016read_timestamp\030\002 \001(\0132\032.google.protob" - + "uf.Timestamp\022L\n\017precommit_token\030\003 \001(\01323." - + "google.spanner.v1.MultiplexedSessionPrec" - + "ommitToken\"\244\001\n\023TransactionSelector\022;\n\nsi" - + "ngle_use\030\001 \001(\0132%.google.spanner.v1.Trans" - + "actionOptionsH\000\022\014\n\002id\030\002 \001(\014H\000\0226\n\005begin\030\003" - + " \001(\0132%.google.spanner.v1.TransactionOpti" - + "onsH\000B\n\n\010selector\"L\n MultiplexedSessionP" - + "recommitToken\022\027\n\017precommit_token\030\001 \001(\014\022\017" - + "\n\007seq_num\030\002 \001(\005B\263\001\n\025com.google.spanner.v" - + "1B\020TransactionProtoP\001Z5cloud.google.com/" - + "go/spanner/apiv1/spannerpb;spannerpb\252\002\027G" - + "oogle.Cloud.Spanner.V1\312\002\027Google\\Cloud\\Sp" - + "anner\\V1\352\002\032Google::Cloud::Spanner::V1b\006p" - + "roto3" + + "o\032\037google/protobuf/timestamp.proto\032 goog" + + "le/spanner/v1/location.proto\"\367\007\n\022Transac" + + "tionOptions\022E\n\nread_write\030\001 \001(\0132/.google" + + ".spanner.v1.TransactionOptions.ReadWrite" + + "H\000\022O\n\017partitioned_dml\030\003 \001(\01324.google.spa" + + "nner.v1.TransactionOptions.PartitionedDm" + + "lH\000\022C\n\tread_only\030\002 \001(\0132..google.spanner." + + "v1.TransactionOptions.ReadOnlyH\000\022\'\n\037excl" + + "ude_txn_from_change_streams\030\005 \001(\010\022M\n\017iso" + + "lation_level\030\006 \001(\01624.google.spanner.v1.T" + + "ransactionOptions.IsolationLevel\032\354\001\n\tRea" + + "dWrite\022T\n\016read_lock_mode\030\001 \001(\0162<.google." + + "spanner.v1.TransactionOptions.ReadWrite." + + "ReadLockMode\0228\n+multiplexed_session_prev" + + "ious_transaction_id\030\002 \001(\014B\003\340A\001\"O\n\014ReadLo" + + "ckMode\022\036\n\032READ_LOCK_MODE_UNSPECIFIED\020\000\022\017" + + "\n\013PESSIMISTIC\020\001\022\016\n\nOPTIMISTIC\020\002\032\020\n\016Parti" + + "tionedDml\032\250\002\n\010ReadOnly\022\020\n\006strong\030\001 \001(\010H\000" + + "\0228\n\022min_read_timestamp\030\002 \001(\0132\032.google.pr" + + "otobuf.TimestampH\000\0222\n\rmax_staleness\030\003 \001(" + + "\0132\031.google.protobuf.DurationH\000\0224\n\016read_t" + + "imestamp\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mpH\000\0224\n\017exact_staleness\030\005 \001(\0132\031.google.p" + + "rotobuf.DurationH\000\022\035\n\025return_read_timest" + + "amp\030\006 \001(\010B\021\n\017timestamp_bound\"X\n\016Isolatio" + + "nLevel\022\037\n\033ISOLATION_LEVEL_UNSPECIFIED\020\000\022" + + "\020\n\014SERIALIZABLE\020\001\022\023\n\017REPEATABLE_READ\020\002B\006" + + "\n\004mode\"\326\001\n\013Transaction\022\n\n\002id\030\001 \001(\014\0222\n\016re" + + "ad_timestamp\030\002 \001(\0132\032.google.protobuf.Tim" + + "estamp\022L\n\017precommit_token\030\003 \001(\01323.google" + + ".spanner.v1.MultiplexedSessionPrecommitT" + + "oken\0229\n\014cache_update\030\005 \001(\0132\036.google.span" + + "ner.v1.CacheUpdateB\003\340A\001\"\244\001\n\023TransactionS" + + "elector\022;\n\nsingle_use\030\001 \001(\0132%.google.spa" + + "nner.v1.TransactionOptionsH\000\022\014\n\002id\030\002 \001(\014" + + "H\000\0226\n\005begin\030\003 \001(\0132%.google.spanner.v1.Tr" + + "ansactionOptionsH\000B\n\n\010selector\"L\n Multip" + + "lexedSessionPrecommitToken\022\027\n\017precommit_" + + "token\030\001 \001(\014\022\017\n\007seq_num\030\002 \001(\005B\263\001\n\025com.goo" + + "gle.spanner.v1B\020TransactionProtoP\001Z5clou" + + "d.google.com/go/spanner/apiv1/spannerpb;" + + "spannerpb\252\002\027Google.Cloud.Spanner.V1\312\002\027Go" + + "ogle\\Cloud\\Spanner\\V1\352\002\032Google::Cloud::S" + + "panner::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -118,11 +132,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.spanner.v1.LocationProto.getDescriptor(), }); internal_static_google_spanner_v1_TransactionOptions_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_spanner_v1_TransactionOptions_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_TransactionOptions_descriptor, new java.lang.String[] { "ReadWrite", @@ -133,23 +148,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Mode", }); internal_static_google_spanner_v1_TransactionOptions_ReadWrite_descriptor = - internal_static_google_spanner_v1_TransactionOptions_descriptor.getNestedTypes().get(0); + internal_static_google_spanner_v1_TransactionOptions_descriptor.getNestedType(0); internal_static_google_spanner_v1_TransactionOptions_ReadWrite_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_TransactionOptions_ReadWrite_descriptor, new java.lang.String[] { "ReadLockMode", "MultiplexedSessionPreviousTransactionId", }); internal_static_google_spanner_v1_TransactionOptions_PartitionedDml_descriptor = - internal_static_google_spanner_v1_TransactionOptions_descriptor.getNestedTypes().get(1); + internal_static_google_spanner_v1_TransactionOptions_descriptor.getNestedType(1); internal_static_google_spanner_v1_TransactionOptions_PartitionedDml_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_TransactionOptions_PartitionedDml_descriptor, new java.lang.String[] {}); internal_static_google_spanner_v1_TransactionOptions_ReadOnly_descriptor = - internal_static_google_spanner_v1_TransactionOptions_descriptor.getNestedTypes().get(2); + internal_static_google_spanner_v1_TransactionOptions_descriptor.getNestedType(2); internal_static_google_spanner_v1_TransactionOptions_ReadOnly_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_TransactionOptions_ReadOnly_descriptor, new java.lang.String[] { "Strong", @@ -160,38 +175,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReturnReadTimestamp", "TimestampBound", }); - internal_static_google_spanner_v1_Transaction_descriptor = - getDescriptor().getMessageTypes().get(1); + internal_static_google_spanner_v1_Transaction_descriptor = getDescriptor().getMessageType(1); internal_static_google_spanner_v1_Transaction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_Transaction_descriptor, new java.lang.String[] { - "Id", "ReadTimestamp", "PrecommitToken", + "Id", "ReadTimestamp", "PrecommitToken", "CacheUpdate", }); internal_static_google_spanner_v1_TransactionSelector_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_spanner_v1_TransactionSelector_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_TransactionSelector_descriptor, new java.lang.String[] { "SingleUse", "Id", "Begin", "Selector", }); internal_static_google_spanner_v1_MultiplexedSessionPrecommitToken_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_spanner_v1_MultiplexedSessionPrecommitToken_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_MultiplexedSessionPrecommitToken_descriptor, new java.lang.String[] { "PrecommitToken", "SeqNum", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.spanner.v1.LocationProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelector.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelector.java index 2219f7a90b2..025aa4cb8e6 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelector.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/transaction.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -33,32 +34,37 @@ * * Protobuf type {@code google.spanner.v1.TransactionSelector} */ -public final class TransactionSelector extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class TransactionSelector extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.TransactionSelector) TransactionSelectorOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TransactionSelector"); + } + // Use TransactionSelector.newBuilder() to construct. - private TransactionSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TransactionSelector(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private TransactionSelector() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TransactionSelector(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionSelector_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionSelector_fieldAccessorTable @@ -426,38 +432,38 @@ public static com.google.spanner.v1.TransactionSelector parseFrom( public static com.google.spanner.v1.TransactionSelector parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionSelector parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionSelector parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionSelector parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.TransactionSelector parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.TransactionSelector parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -480,7 +486,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -499,7 +505,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.TransactionSelector} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.TransactionSelector) com.google.spanner.v1.TransactionSelectorOrBuilder { @@ -509,7 +515,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TransactionProto .internal_static_google_spanner_v1_TransactionSelector_fieldAccessorTable @@ -521,7 +527,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.spanner.v1.TransactionSelector.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -587,39 +593,6 @@ private void buildPartialOneofs(com.google.spanner.v1.TransactionSelector result } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.spanner.v1.TransactionSelector) { @@ -681,7 +654,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getSingleUseFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetSingleUseFieldBuilder().getBuilder(), extensionRegistry); selectorCase_ = 1; break; } // case 10 @@ -693,7 +667,7 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getBeginFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetBeginFieldBuilder().getBuilder(), extensionRegistry); selectorCase_ = 3; break; } // case 26 @@ -730,7 +704,7 @@ public Builder clearSelector() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder> @@ -904,7 +878,7 @@ public Builder clearSingleUse() { * .google.spanner.v1.TransactionOptions single_use = 1; */ public com.google.spanner.v1.TransactionOptions.Builder getSingleUseBuilder() { - return getSingleUseFieldBuilder().getBuilder(); + return internalGetSingleUseFieldBuilder().getBuilder(); } /** @@ -941,17 +915,17 @@ public com.google.spanner.v1.TransactionOptionsOrBuilder getSingleUseOrBuilder() * * .google.spanner.v1.TransactionOptions single_use = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder> - getSingleUseFieldBuilder() { + internalGetSingleUseFieldBuilder() { if (singleUseBuilder_ == null) { if (!(selectorCase_ == 1)) { selector_ = com.google.spanner.v1.TransactionOptions.getDefaultInstance(); } singleUseBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder>( @@ -1040,7 +1014,7 @@ public Builder clearId() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder> @@ -1221,7 +1195,7 @@ public Builder clearBegin() { * .google.spanner.v1.TransactionOptions begin = 3; */ public com.google.spanner.v1.TransactionOptions.Builder getBeginBuilder() { - return getBeginFieldBuilder().getBuilder(); + return internalGetBeginFieldBuilder().getBuilder(); } /** @@ -1260,17 +1234,17 @@ public com.google.spanner.v1.TransactionOptionsOrBuilder getBeginOrBuilder() { * * .google.spanner.v1.TransactionOptions begin = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder> - getBeginFieldBuilder() { + internalGetBeginFieldBuilder() { if (beginBuilder_ == null) { if (!(selectorCase_ == 3)) { selector_ = com.google.spanner.v1.TransactionOptions.getDefaultInstance(); } beginBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.TransactionOptions, com.google.spanner.v1.TransactionOptions.Builder, com.google.spanner.v1.TransactionOptionsOrBuilder>( @@ -1284,17 +1258,6 @@ public com.google.spanner.v1.TransactionOptionsOrBuilder getBeginOrBuilder() { return beginBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.TransactionSelector) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelectorOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelectorOrBuilder.java index 38a78bb4618..cad31c1c653 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelectorOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TransactionSelectorOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/transaction.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface TransactionSelectorOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.TransactionSelector) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Type.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Type.java index d420ebf450a..d5eec528e77 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Type.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/Type.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/type.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.spanner.v1.Type} */ -public final class Type extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Type extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.spanner.v1.Type) TypeOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + // Use Type.newBuilder() to construct. - private Type(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Type(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,18 +58,12 @@ private Type() { protoTypeFqn_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Type(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.spanner.v1.TypeProto.internal_static_google_spanner_v1_Type_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TypeProto.internal_static_google_spanner_v1_Type_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -358,8 +364,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.spanner.v1.TypeAnnotationCode.TYPE_ANNOTATION_CODE_UNSPECIFIED.getNumber()) { output.writeEnum(4, typeAnnotation_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protoTypeFqn_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, protoTypeFqn_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protoTypeFqn_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, protoTypeFqn_); } getUnknownFields().writeTo(output); } @@ -383,8 +389,8 @@ public int getSerializedSize() { != com.google.spanner.v1.TypeAnnotationCode.TYPE_ANNOTATION_CODE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, typeAnnotation_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protoTypeFqn_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, protoTypeFqn_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protoTypeFqn_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, protoTypeFqn_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -478,38 +484,38 @@ public static com.google.spanner.v1.Type parseFrom( public static com.google.spanner.v1.Type parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Type parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Type parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.spanner.v1.Type parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.spanner.v1.Type parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.spanner.v1.Type parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -532,7 +538,7 @@ public Builder toBuilder() { } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -547,7 +553,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.spanner.v1.Type} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.spanner.v1.Type) com.google.spanner.v1.TypeOrBuilder { @@ -556,7 +562,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.spanner.v1.TypeProto .internal_static_google_spanner_v1_Type_fieldAccessorTable @@ -569,15 +575,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getArrayElementTypeFieldBuilder(); - getStructTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetArrayElementTypeFieldBuilder(); + internalGetStructTypeFieldBuilder(); } } @@ -654,39 +660,6 @@ private void buildPartial0(com.google.spanner.v1.Type result) { 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.v1.Type) { @@ -751,13 +724,14 @@ public Builder mergeFrom( case 18: { input.readMessage( - getArrayElementTypeFieldBuilder().getBuilder(), extensionRegistry); + internalGetArrayElementTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getStructTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStructTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -887,7 +861,7 @@ public Builder clearCode() { } private com.google.spanner.v1.Type arrayElementType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> @@ -1046,7 +1020,7 @@ public Builder clearArrayElementType() { public com.google.spanner.v1.Type.Builder getArrayElementTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getArrayElementTypeFieldBuilder().getBuilder(); + return internalGetArrayElementTypeFieldBuilder().getBuilder(); } /** @@ -1081,14 +1055,14 @@ public com.google.spanner.v1.TypeOrBuilder getArrayElementTypeOrBuilder() { * * .google.spanner.v1.Type array_element_type = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder> - getArrayElementTypeFieldBuilder() { + internalGetArrayElementTypeFieldBuilder() { if (arrayElementTypeBuilder_ == null) { arrayElementTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.Type, com.google.spanner.v1.Type.Builder, com.google.spanner.v1.TypeOrBuilder>( @@ -1099,7 +1073,7 @@ public com.google.spanner.v1.TypeOrBuilder getArrayElementTypeOrBuilder() { } private com.google.spanner.v1.StructType structType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> @@ -1258,7 +1232,7 @@ public Builder clearStructType() { public com.google.spanner.v1.StructType.Builder getStructTypeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getStructTypeFieldBuilder().getBuilder(); + return internalGetStructTypeFieldBuilder().getBuilder(); } /** @@ -1293,14 +1267,14 @@ public com.google.spanner.v1.StructTypeOrBuilder getStructTypeOrBuilder() { * * .google.spanner.v1.StructType struct_type = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder> - getStructTypeFieldBuilder() { + internalGetStructTypeFieldBuilder() { if (structTypeBuilder_ == null) { structTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.spanner.v1.StructType, com.google.spanner.v1.StructType.Builder, com.google.spanner.v1.StructTypeOrBuilder>( @@ -1571,17 +1545,6 @@ public Builder setProtoTypeFqnBytes(com.google.protobuf.ByteString value) { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.spanner.v1.Type) } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeAnnotationCode.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeAnnotationCode.java index bd8e0bea2a8..4d60e66a4d3 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeAnnotationCode.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeAnnotationCode.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/type.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -32,6 +33,7 @@ * * Protobuf enum {@code google.spanner.v1.TypeAnnotationCode} */ +@com.google.protobuf.Generated public enum TypeAnnotationCode implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -89,6 +91,16 @@ public enum TypeAnnotationCode implements com.google.protobuf.ProtocolMessageEnu UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TypeAnnotationCode"); + } + /** * * @@ -207,7 +219,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.TypeProto.getDescriptor().getEnumTypes().get(1); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeCode.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeCode.java index 438c99a009f..cbe38593cf4 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeCode.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeCode.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/type.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; /** @@ -34,6 +35,7 @@ * * Protobuf enum {@code google.spanner.v1.TypeCode} */ +@com.google.protobuf.Generated public enum TypeCode implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -186,7 +188,7 @@ public enum TypeCode implements com.google.protobuf.ProtocolMessageEnum { * - Whitespace characters are not preserved. * - If a JSON object has duplicate keys, only the first key is preserved. * - Members of a JSON object are not guaranteed to have their order - * preserved. + * preserved. * - JSON array elements will have their order preserved. *
* @@ -242,6 +244,16 @@ public enum TypeCode implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TypeCode"); + } + /** * * @@ -405,7 +417,7 @@ public enum TypeCode implements com.google.protobuf.ProtocolMessageEnum { * - Whitespace characters are not preserved. * - If a JSON object has duplicate keys, only the first key is preserved. * - Members of a JSON object are not guaranteed to have their order - * preserved. + * preserved. * - JSON array elements will have their order preserved. *
* @@ -549,7 +561,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.spanner.v1.TypeProto.getDescriptor().getEnumTypes().get(0); } diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeOrBuilder.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeOrBuilder.java index 68b785c340f..5e035a1c696 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeOrBuilder.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/type.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; +@com.google.protobuf.Generated public interface TypeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.spanner.v1.Type) diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java index 6ea74cf77a9..42c68057534 100644 --- a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/TypeProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,26 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/spanner/v1/type.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.8 package com.google.spanner.v1; -public final class TypeProto { +@com.google.protobuf.Generated +public final class TypeProto extends com.google.protobuf.GeneratedFile { private TypeProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TypeProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,15 +42,15 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_Type_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_Type_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_StructType_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_StructType_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_v1_StructType_Field_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_spanner_v1_StructType_Field_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -99,35 +111,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), }); - internal_static_google_spanner_v1_Type_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_spanner_v1_Type_descriptor = getDescriptor().getMessageType(0); internal_static_google_spanner_v1_Type_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_Type_descriptor, new java.lang.String[] { "Code", "ArrayElementType", "StructType", "TypeAnnotation", "ProtoTypeFqn", }); - internal_static_google_spanner_v1_StructType_descriptor = - getDescriptor().getMessageTypes().get(1); + internal_static_google_spanner_v1_StructType_descriptor = getDescriptor().getMessageType(1); internal_static_google_spanner_v1_StructType_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_StructType_descriptor, new java.lang.String[] { "Fields", }); internal_static_google_spanner_v1_StructType_Field_descriptor = - internal_static_google_spanner_v1_StructType_descriptor.getNestedTypes().get(0); + internal_static_google_spanner_v1_StructType_descriptor.getNestedType(0); internal_static_google_spanner_v1_StructType_Field_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_spanner_v1_StructType_Field_descriptor, new java.lang.String[] { "Name", "Type", }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/change_stream.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/change_stream.proto index 53c71078d0e..e7d12e6084c 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/change_stream.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/change_stream.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/commit_response.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/commit_response.proto index b29663501f8..20d2850bb64 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/commit_response.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/commit_response.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,7 +16,9 @@ syntax = "proto3"; package google.spanner.v1; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; +import "google/spanner/v1/location.proto"; import "google/spanner/v1/transaction.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; @@ -61,4 +63,12 @@ message CommitResponse { // timestamp at which all reads in the transaction ran. This timestamp is // never returned. google.protobuf.Timestamp snapshot_timestamp = 5; + + // Optional. A cache update expresses a set of changes the client should + // incorporate into its location cache. The client should discard the changes + // if they are older than the data it already has. This data can be obtained + // in response to requests that included a `RoutingHint` field, but may also + // be obtained by explicit location-fetching RPCs which may be added in the + // future. + CacheUpdate cache_update = 6 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/keys.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/keys.proto index bce2a07b02f..5e30e831e64 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/keys.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/keys.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/location.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/location.proto new file mode 100644 index 00000000000..870dc0ec0a9 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/location.proto @@ -0,0 +1,388 @@ +// Copyright 2026 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.v1; + +import "google/protobuf/struct.proto"; +import "google/spanner/v1/type.proto"; + +option csharp_namespace = "Google.Cloud.Spanner.V1"; +option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb"; +option java_multiple_files = true; +option java_outer_classname = "LocationProto"; +option java_package = "com.google.spanner.v1"; +option php_namespace = "Google\\Cloud\\Spanner\\V1"; +option ruby_package = "Google::Cloud::Spanner::V1"; + +// A `Range` represents a range of keys in a database. The keys themselves +// are encoded in "sortable string format", also known as ssformat. Consult +// Spanner's open source client libraries for details on the encoding. +// +// Each range represents a contiguous range of rows, possibly from multiple +// tables/indexes. Each range is associated with a single paxos group (known as +// a "group" throughout this API), a split (which names the exact range within +// the group), and a generation that can be used to determine whether a given +// `Range` represents a newer or older location for the key range. +message Range { + // The start key of the range, inclusive. Encoded in "sortable string format" + // (ssformat). + bytes start_key = 1; + + // The limit key of the range, exclusive. Encoded in "sortable string format" + // (ssformat). + bytes limit_key = 2; + + // The UID of the paxos group where this range is stored. UIDs are unique + // within the database. References `Group.group_uid`. + uint64 group_uid = 3; + + // A group can store multiple ranges of keys. Each key range is named by an + // ID (the split ID). Within a group, split IDs are unique. The `split_id` + // names the exact split in `group_uid` where this range is stored. + uint64 split_id = 4; + + // `generation` indicates the freshness of the range information contained + // in this proto. Generations can be compared lexicographically; if generation + // A is greater than generation B, then the `Range` corresponding to A is + // newer than the `Range` corresponding to B, and should be used + // preferentially. + bytes generation = 5; +} + +// A `Tablet` represents a single replica of a `Group`. A tablet is served by a +// single server at a time, and can move between servers due to server death or +// simply load balancing. +message Tablet { + // Indicates the role of the tablet. + enum Role { + // Not specified. + ROLE_UNSPECIFIED = 0; + + // The tablet can perform reads and (if elected leader) writes. + READ_WRITE = 1; + + // The tablet can only perform reads. + READ_ONLY = 2; + } + + // The UID of the tablet, unique within the database. Matches the + // `tablet_uids` and `leader_tablet_uid` fields in `Group`. + uint64 tablet_uid = 1; + + // The address of the server that is serving this tablet -- either an IP + // address or DNS hostname and a port number. + string server_address = 2; + + // Where this tablet is located. This is the name of a Google Cloud region, + // such as "us-central1". + string location = 3; + + // The role of the tablet. + Role role = 4; + + // `incarnation` indicates the freshness of the tablet information contained + // in this proto. Incarnations can be compared lexicographically; if + // incarnation A is greater than incarnation B, then the `Tablet` + // corresponding to A is newer than the `Tablet` corresponding to B, and + // should be used preferentially. + bytes incarnation = 5; + + // Distances help the client pick the closest tablet out of the list of + // tablets for a given request. Tablets with lower distances should generally + // be preferred. Tablets with the same distance are approximately equally + // close; the client can choose arbitrarily. + // + // Distances do not correspond precisely to expected latency, geographical + // distance, or anything else. Distances should be compared only between + // tablets of the same group; they are not meaningful between different + // groups. + // + // A value of zero indicates that the tablet may be in the same zone as + // the client, and have minimum network latency. A value less than or equal to + // five indicates that the tablet is thought to be in the same region as the + // client, and may have a few milliseconds of network latency. Values greater + // than five are most likely in a different region, with non-trivial network + // latency. + // + // Clients should use the following algorithm: + // * If the request is using a directed read, eliminate any tablets that + // do not match the directed read's target zone and/or replica type. + // * (Read-write transactions only) Choose leader tablet if it has an + // distance <=5. + // * Group and sort tablets by distance. Choose a random + // tablet with the lowest distance. If the request + // is not a directed read, only consider replicas with distances <=5. + // * Send the request to the fallback endpoint. + // + // The tablet picked by this algorithm may be skipped, either because it is + // marked as `skip` by the server or because the corresponding server is + // unreachable, flow controlled, etc. Skipped tablets should be added to the + // `skipped_tablet_uid` field in `RoutingHint`; the algorithm above should + // then be re-run without including the skipped tablet(s) to pick the next + // best tablet. + uint32 distance = 6; + + // If true, the tablet should not be chosen by the client. Typically, this + // signals that the tablet is unhealthy in some way. Tablets with `skip` + // set to true should be reported back to the server in + // `RoutingHint.skipped_tablet_uid`; this cues the server to send updated + // information for this tablet should it become usable again. + bool skip = 7; +} + +// A `Group` represents a paxos group in a database. A group is a set of +// tablets that are replicated across multiple servers. Groups may have a leader +// tablet. Groups store one (or sometimes more) ranges of keys. +message Group { + // The UID of the paxos group, unique within the database. Matches the + // `group_uid` field in `Range`. + uint64 group_uid = 1; + + // A list of tablets that are part of the group. Note that this list may not + // be exhaustive; it will only include tablets the server considers useful + // to the client. The returned list is ordered ascending by distance. + // + // Tablet UIDs reference `Tablet.tablet_uid`. + repeated Tablet tablets = 2; + + // The last known leader tablet of the group as an index into `tablets`. May + // be negative if the group has no known leader. + int32 leader_index = 3; + + // `generation` indicates the freshness of the group information (including + // leader information) contained in this proto. Generations can be compared + // lexicographically; if generation A is greater than generation B, then the + // `Group` corresponding to A is newer than the `Group` corresponding to B, + // and should be used preferentially. + bytes generation = 4; +} + +// A `KeyRecipe` provides the metadata required to translate reads, mutations, +// and queries into a byte array in "sortable string format" (ssformat)that can +// be used with `Range`s to route requests. Note that the client *must* tolerate +// `KeyRecipe`s that appear to be invalid, since the `KeyRecipe` format may +// change over time. Requests with invalid `KeyRecipe`s should be routed to a +// default server. +message KeyRecipe { + // An ssformat key is composed of a sequence of tag numbers and key column + // values. `Part` represents a single tag or key column value. + message Part { + // The remaining fields encode column values. + enum Order { + // Default value, equivalent to `ASCENDING`. + ORDER_UNSPECIFIED = 0; + + // The key is ascending - corresponds to `ASC` in the schema definition. + ASCENDING = 1; + + // The key is descending - corresponds to `DESC` in the schema definition. + DESCENDING = 2; + } + + // The null order of the key column. This dictates where NULL values sort + // in the sorted order. Note that columns which are `NOT NULL` can have a + // special encoding. + enum NullOrder { + // Default value. This value is unused. + NULL_ORDER_UNSPECIFIED = 0; + + // NULL values sort before any non-NULL values. + NULLS_FIRST = 1; + + // NULL values sort after any non-NULL values. + NULLS_LAST = 2; + + // The column does not support NULL values. + NOT_NULL = 3; + } + + // If non-zero, `tag` is the only field present in this `Part`. The part + // is encoded by appending `tag` to the ssformat key. + uint32 tag = 1; + + // Whether the key column is sorted ascending or descending. Only present + // if `tag` is zero. + Order order = 2; + + // How NULLs are represented in the encoded key part. Only present if `tag` + // is zero. + NullOrder null_order = 3; + + // The type of the key part. Only present if `tag` is zero. + Type type = 4; + + // Only present if `tag` is zero. + oneof value_type { + // `identifier` is the name of the column or query parameter. + string identifier = 5; + + // The constant value of the key part. + // It is present when query uses a constant as a part of the key. + google.protobuf.Value value = 6; + + // If true, the client is responsible to fill in the value randomly. + // It's relevant only for the INT64 type. + bool random = 8; + } + + // It is a repeated field to support fetching key columns from nested + // structs, such as `STRUCT` query parameters. + repeated int32 struct_identifiers = 7; + } + + // A recipe can be associated with a table, index, or query. Tables recipes + // are used to encode read and write keys; index recipes are used for index + // reads, and query recipes are used only for SQL queries. + oneof target { + // A table name, matching the name from the database schema. + string table_name = 1; + + // An index name, matching the name from the database schema. + string index_name = 2; + + // The UID of a query, matching the UID from `RoutingHint`. + uint64 operation_uid = 3; + } + + // Parts are in the order they should appear in the encoded key. + repeated Part part = 4; +} + +// A `RecipeList` contains a list of `KeyRecipe`s, which share the same +// schema generation. +message RecipeList { + // The schema generation of the recipes. To be sent to the server in + // `RoutingHint.schema_generation` whenever one of the recipes is used. + // `schema_generation` values are comparable with each other; if generation A + // compares greater than generation B, then A is a more recent schema than B. + // Clients should in general aim to cache only the latest schema generation, + // and discard more stale recipes. + bytes schema_generation = 1; + + // A list of recipes to be cached. + repeated KeyRecipe recipe = 3; +} + +// A `CacheUpdate` expresses a set of changes the client should incorporate into +// its location cache. These changes may or may not be newer than what the +// client has in its cache, and should be discarded if necessary. `CacheUpdate`s +// can be obtained in response to requests that included a `RoutingHint` +// field, but may also be obtained by explicit location-fetching RPCs which may +// be added in the future. +message CacheUpdate { + // An internal ID for the database. Database names can be reused if a database + // is deleted and re-created. Each time the database is re-created, it will + // get a new database ID, which will never be re-used for any other database. + uint64 database_id = 1; + + // A list of ranges to be cached. + repeated Range range = 2; + + // A list of groups to be cached. + repeated Group group = 3; + + // A list of recipes to be cached. + RecipeList key_recipes = 5; +} + +// `RoutingHint` can be optionally added to location-aware Spanner +// requests. It gives the server hints that can be used to route the request to +// an appropriate server, potentially significantly decreasing latency and +// improving throughput. To achieve improved performance, most fields must be +// filled in with accurate values. +// +// The presence of a valid `RoutingHint` tells the server that the client +// is location-aware. +// +// `RoutingHint` does not change the semantics of the request; it is +// purely a performance hint; the request will perform the same actions on the +// database's data as if `RoutingHint` were not present. However, if +// the `RoutingHint` is incomplete or incorrect, the response may include +// a `CacheUpdate` the client can use to correct its location cache. +message RoutingHint { + // A tablet that was skipped by the client. See `Tablet.tablet_uid` and + // `Tablet.incarnation`. + message SkippedTablet { + // The tablet UID of the tablet that was skipped. See `Tablet.tablet_uid`. + uint64 tablet_uid = 1; + + // The incarnation of the tablet that was skipped. See `Tablet.incarnation`. + bytes incarnation = 2; + } + + // A session-scoped unique ID for the operation, computed client-side. + // Requests with the same `operation_uid` should have a shared 'shape', + // meaning that some fields are expected to be the same, such as the SQL + // query, the target table/columns (for reads) etc. Requests with the same + // `operation_uid` are meant to differ only in fields like keys/key + // ranges/query parameters, transaction IDs, etc. + // + // `operation_uid` must be non-zero for `RoutingHint` to be valid. + uint64 operation_uid = 1; + + // The database ID of the database being accessed, see + // `CacheUpdate.database_id`. Should match the cache entries that were used + // to generate the rest of the fields in this `RoutingHint`. + uint64 database_id = 2; + + // The schema generation of the recipe that was used to generate `key` and + // `limit_key`. See also `RecipeList.schema_generation`. + bytes schema_generation = 3; + + // The key / key range that this request accesses. For operations that + // access a single key, `key` should be set and `limit_key` should be empty. + // For operations that access a key range, `key` and `limit_key` should both + // be set, to the inclusive start and exclusive end of the range respectively. + // + // The keys are encoded in "sortable string format" (ssformat), using a + // `KeyRecipe` that is appropriate for the request. See `KeyRecipe` for more + // details. + bytes key = 4; + + // If this request targets a key range, this is the exclusive end of the + // range. See `key` for more details. + bytes limit_key = 5; + + // The group UID of the group that the client believes serves the range + // defined by `key` and `limit_key`. See `Range.group_uid` for more details. + uint64 group_uid = 6; + + // The split ID of the split that the client believes contains the range + // defined by `key` and `limit_key`. See `Range.split_id` for more details. + uint64 split_id = 7; + + // The tablet UID of the tablet from group `group_uid` that the client + // believes is best to serve this request. See `Group.local_tablet_uids` and + // `Group.leader_tablet_uid`. + uint64 tablet_uid = 8; + + // If the client had multiple options for tablet selection, and some of its + // first choices were unhealthy (e.g., the server is unreachable, or + // `Tablet.skip` is true), this field will contain the tablet UIDs of those + // tablets, with their incarnations. The server may include a `CacheUpdate` + // with new locations for those tablets. + repeated SkippedTablet skipped_tablet_uid = 9; + + // If present, the client's current location. This should be the name of a + // Google Cloud zone or region, such as "us-central1". + // + // If absent, the client's location will be assumed to be the same as the + // location of the server the client ends up connected to. + // + // Locations are primarily valuable for clients that connect from regions + // other than the ones that contain the Spanner database. + string client_location = 10; +} diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/mutation.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/mutation.proto index 41f032b9695..7e3306a2038 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/mutation.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/mutation.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package google.spanner.v1; import "google/api/field_behavior.proto"; import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; import "google/spanner/v1/keys.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; @@ -75,6 +76,40 @@ message Mutation { KeySet key_set = 2 [(google.api.field_behavior) = REQUIRED]; } + // Arguments to [send][google.spanner.v1.Mutation.send] operations. + message Send { + // Required. The queue to which the message will be sent. + string queue = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The primary key of the message to be sent. + google.protobuf.ListValue key = 2 [(google.api.field_behavior) = REQUIRED]; + + // The time at which Spanner will begin attempting to deliver the message. + // If `deliver_time` is not set, Spanner will deliver the message + // immediately. If `deliver_time` is in the past, Spanner will replace it + // with a value closer to the current time. + google.protobuf.Timestamp deliver_time = 3; + + // The payload of the message. + google.protobuf.Value payload = 4; + } + + // Arguments to [ack][google.spanner.v1.Mutation.ack] operations. + message Ack { + // Required. The queue where the message to be acked is stored. + string queue = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The primary key of the message to be acked. + google.protobuf.ListValue key = 2 [(google.api.field_behavior) = REQUIRED]; + + // By default, an attempt to ack a message that does not exist will fail + // with a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack + // will succeed even if the message does not exist. This is useful for + // unconditionally acking a message, even if it is missing or has already + // been acked. + bool ignore_not_found = 3; + } + // Required. The operation to perform. oneof operation { // Insert new rows in a table. If any of the rows already exist, @@ -111,5 +146,11 @@ message Mutation { // Delete rows from a table. Succeeds whether or not the named // rows were present. Delete delete = 5; + + // Send a message to a queue. + Send send = 6; + + // Ack a message from a queue. + Ack ack = 7; } } diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/query_plan.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/query_plan.proto index cc7ff5ab684..5850ff97fb2 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/query_plan.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/query_plan.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ syntax = "proto3"; package google.spanner.v1; +import "google/api/field_behavior.proto"; import "google/protobuf/struct.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; @@ -122,10 +123,34 @@ message PlanNode { google.protobuf.Struct execution_stats = 7; } +// Output of query advisor analysis. +message QueryAdvisorResult { + // Recommendation to add new indexes to run queries more efficiently. + message IndexAdvice { + // Optional. DDL statements to add new indexes that will improve the query. + repeated string ddl = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Estimated latency improvement factor. For example if the query + // currently takes 500 ms to run and the estimated latency with new indexes + // is 100 ms this field will be 5. + double improvement_factor = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Index Recommendation for a query. This is an optional field and + // the recommendation will only be available when the recommendation + // guarantees significant improvement in query performance. + repeated IndexAdvice index_advice = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + // Contains an ordered list of nodes appearing in the query plan. message QueryPlan { // The nodes in the query plan. Plan nodes are returned in pre-order starting // with the plan root. Each [PlanNode][google.spanner.v1.PlanNode]'s `id` // corresponds to its index in `plan_nodes`. repeated PlanNode plan_nodes = 1; + + // Optional. The advise/recommendations for a query. Currently this field will + // be serving index recommendations for a query. + QueryAdvisorResult query_advice = 2 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/result_set.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/result_set.proto index c80bff2ae7f..3851d688ce2 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/result_set.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/result_set.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package google.spanner.v1; import "google/api/field_behavior.proto"; import "google/protobuf/struct.proto"; +import "google/spanner/v1/location.proto"; import "google/spanner/v1/query_plan.proto"; import "google/spanner/v1/transaction.proto"; import "google/spanner/v1/type.proto"; @@ -60,6 +61,14 @@ message ResultSet { // [Commit][google.spanner.v1.Spanner.Commit] request for this transaction. MultiplexedSessionPrecommitToken precommit_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A cache update expresses a set of changes the client should + // incorporate into its location cache. The client should discard the changes + // if they are older than the data it already has. This data can be obtained + // in response to requests that included a `RoutingHint` field, but may also + // be obtained by explicit location-fetching RPCs which may be added in the + // future. + CacheUpdate cache_update = 6 [(google.api.field_behavior) = OPTIONAL]; } // Partial results from a streaming read or SQL query. Streaming reads and @@ -181,6 +190,14 @@ message PartialResultSet { // stream. The server might optionally set this field. Clients shouldn't rely // on this field being set in all cases. bool last = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A cache update expresses a set of changes the client should + // incorporate into its location cache. The client should discard the changes + // if they are older than the data it already has. This data can be obtained + // in response to requests that included a `RoutingHint` field, but may also + // be obtained by explicit location-fetching RPCs which may be added in the + // future. + CacheUpdate cache_update = 10 [(google.api.field_behavior) = OPTIONAL]; } // Metadata about a [ResultSet][google.spanner.v1.ResultSet] or diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto index e4ce605ec4f..a6796c9f187 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; import "google/spanner/v1/keys.proto"; +import "google/spanner/v1/location.proto"; import "google/spanner/v1/mutation.proto"; import "google/spanner/v1/result_set.proto"; import "google/spanner/v1/transaction.proto"; @@ -360,10 +361,10 @@ message BatchCreateSessionsRequest { // Parameters to apply to each created session. Session session_template = 2; - // Required. The number of sessions to be created in this batch call. - // The API can return fewer than the requested number of sessions. If a - // specific number of sessions are desired, the client can make additional - // calls to `BatchCreateSessions` (adjusting + // Required. The number of sessions to be created in this batch call. At least + // one session is created. The API can return fewer than the requested number + // of sessions. If a specific number of sessions are desired, the client can + // make additional calls to `BatchCreateSessions` (adjusting // [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count] // as necessary). int32 session_count = 3 [(google.api.field_behavior) = REQUIRED]; @@ -412,8 +413,8 @@ message Session { string creator_role = 5; // Optional. If `true`, specifies a multiplexed session. Use a multiplexed - // session for multiple, concurrent read-only operations. Don't use them for - // read-write transactions, partitioned reads, or partitioned queries. Use + // session for multiple, concurrent operations including any combination of + // read-only and read-write transactions. Use // [`sessions.create`][google.spanner.v1.Spanner.CreateSession] to create // multiplexed sessions. Don't use // [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions] to @@ -516,6 +517,15 @@ message RequestOptions { PRIORITY_HIGH = 3; } + // Container for various pieces of client-owned context attached to a request. + message ClientContext { + // Optional. Map of parameter name to value for this request. These values + // will be returned by any SECURE_CONTEXT() calls invoked by this request + // (e.g., by queries against Parameterized Secure Views). + map secure_context = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + // Priority for the request. Priority priority = 1; @@ -534,8 +544,9 @@ message RequestOptions { // A tag used for statistics collection about this transaction. // Both `request_tag` and `transaction_tag` can be specified for a read or // query that belongs to a transaction. - // The value of transaction_tag should be the same for all requests belonging - // to the same transaction. + // To enable tagging on a transaction, `transaction_tag` must be set to the + // same value for all requests belonging to the same transaction, including + // [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. // If this request doesn't belong to any transaction, `transaction_tag` is // ignored. // Legal characters for `transaction_tag` values are all printable characters @@ -543,6 +554,9 @@ message RequestOptions { // characters. Values that exceed this limit are truncated. // Any leading underscore (_) characters are removed from the string. string transaction_tag = 3; + + // Optional. Optional context that may be needed for some requests. + ClientContext client_context = 4 [(google.api.field_behavior) = OPTIONAL]; } // The `DirectedReadOptions` can be used to indicate which replicas or regions @@ -812,6 +826,14 @@ message ExecuteSqlRequest { // constraints). Given this, successful execution of a DML statement shouldn't // be assumed until a subsequent `Commit` call completes successfully. bool last_statement = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Makes the Spanner requests location-aware if present. + // + // It gives the server hints that can be used to route the request + // to an appropriate server, potentially significantly decreasing latency and + // improving throughput. To achieve improved performance, most fields must be + // filled in with accurate values. + RoutingHint routing_hint = 18 [(google.api.field_behavior) = OPTIONAL]; } // The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. @@ -997,7 +1019,8 @@ message PartitionQueryRequest { // operations. string sql = 3 [(google.api.field_behavior) = REQUIRED]; - // Parameter names and values that bind to placeholders in the SQL string. + // Optional. Parameter names and values that bind to placeholders in the SQL + // string. // // A parameter placeholder consists of the `@` character followed by the // parameter name (for example, `@firstName`). Parameter names can contain @@ -1009,18 +1032,18 @@ message PartitionQueryRequest { // `"WHERE id > @msg_id AND id < @msg_id + 100"` // // It's an error to execute a SQL statement with unbound parameters. - google.protobuf.Struct params = 4; + google.protobuf.Struct params = 4 [(google.api.field_behavior) = OPTIONAL]; - // It isn't always possible for Cloud Spanner to infer the right SQL type - // from a JSON value. For example, values of type `BYTES` and values - // of type `STRING` both appear in + // Optional. It isn't always possible for Cloud Spanner to infer the right SQL + // type from a JSON value. For example, values of type `BYTES` and values of + // type `STRING` both appear in // [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings. // // In these cases, `param_types` can be used to specify the exact // SQL type for some or all of the SQL query parameters. See the // definition of [Type][google.spanner.v1.Type] for more information // about SQL types. - map param_types = 5; + map param_types = 5 [(google.api.field_behavior) = OPTIONAL]; // Additional options that affect how many partitions are created. PartitionOptions partition_options = 6; @@ -1244,6 +1267,14 @@ message ReadRequest { // Optional. Lock Hint for the request, it can only be used with read-write // transactions. LockHint lock_hint = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Makes the Spanner requests location-aware if present. + // + // It gives the server hints that can be used to route the request + // to an appropriate server, potentially significantly decreasing latency and + // improving throughput. To achieve improved performance, most fields must be + // filled in with accurate values. + RoutingHint routing_hint = 18 [(google.api.field_behavior) = OPTIONAL]; } // The request for @@ -1270,6 +1301,14 @@ message BeginTransactionRequest { // randomly select one of the mutations from the mutation set and send it as a // part of this request. Mutation mutation_key = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Makes the Spanner requests location-aware if present. + // + // It gives the server hints that can be used to route the request + // to an appropriate server, potentially significantly decreasing latency and + // improving throughput. To achieve improved performance, most fields must be + // filled in with accurate values. + RoutingHint routing_hint = 5 [(google.api.field_behavior) = OPTIONAL]; } // The request for [Commit][google.spanner.v1.Spanner.Commit]. @@ -1324,6 +1363,14 @@ message CommitRequest { // results in a `FailedPrecondition` error. MultiplexedSessionPrecommitToken precommit_token = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Makes the Spanner requests location-aware if present. + // + // It gives the server hints that can be used to route the request + // to an appropriate server, potentially significantly decreasing latency and + // improving throughput. To achieve improved performance, most fields must be + // filled in with accurate values. + RoutingHint routing_hint = 10 [(google.api.field_behavior) = OPTIONAL]; } // The request for [Rollback][google.spanner.v1.Spanner.Rollback]. @@ -1378,6 +1425,11 @@ message BatchWriteResponse { google.rpc.Status status = 2; // The commit timestamp of the transaction that applied this batch. - // Present if `status` is `OK`, absent otherwise. + // Present if status is OK and the mutation groups were applied, absent + // otherwise. + // + // For mutation groups with conditions, a status=OK and missing + // commit_timestamp means that the mutation groups were not applied due to the + // condition not being satisfied after evaluation. google.protobuf.Timestamp commit_timestamp = 3; } diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto index d3ad6e86903..f7cbccae8b7 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/transaction.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ package google.spanner.v1; import "google/api/field_behavior.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "google/spanner/v1/location.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb"; @@ -39,35 +40,46 @@ message TransactionOptions { // Default value. // // * If isolation level is + // [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE], + // locking semantics default to `PESSIMISTIC`. + // * If isolation level is // [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ], - // then it is an error to specify `read_lock_mode`. Locking semantics - // default to `OPTIMISTIC`. No validation checks are done for reads, - // except to validate that the data that was served at the snapshot time - // is unchanged at commit time in the following cases: - // 1. reads done as part of queries that use `SELECT FOR UPDATE` - // 2. reads done as part of statements with a `LOCK_SCANNED_RANGES` - // hint - // 3. reads done as part of DML statements - // * At all other isolation levels, if `read_lock_mode` is the default - // value, then pessimistic read locks are used. + // locking semantics default to `OPTIMISTIC`. + // * See + // [Concurrency + // control](https://cloud.google.com/spanner/docs/concurrency-control) + // for more details. READ_LOCK_MODE_UNSPECIFIED = 0; // Pessimistic lock mode. // - // Read locks are acquired immediately on read. - // Semantics described only applies to + // Lock acquisition behavior depends on the isolation level in use. In // [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE] - // isolation. + // isolation, reads and writes acquire necessary locks during transaction + // statement execution. In + // [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ] + // isolation, reads that explicitly request to be locked and writes + // acquire locks. + // See + // [Concurrency + // control](https://cloud.google.com/spanner/docs/concurrency-control) for + // details on the types of locks acquired at each transaction step. PESSIMISTIC = 1; // Optimistic lock mode. // - // Locks for reads within the transaction are not acquired on read. - // Instead the locks are acquired on a commit to validate that - // read/queried data has not changed since the transaction started. - // Semantics described only applies to + // Lock acquisition behavior depends on the isolation level in use. In + // both // [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE] - // isolation. + // and + // [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ] + // isolation, reads and writes do not acquire locks during transaction + // statement execution. + // See + // [Concurrency + // control](https://cloud.google.com/spanner/docs/concurrency-control) for + // details on how the guarantees of each isolation level are provided at + // commit time. OPTIMISTIC = 2; } @@ -153,7 +165,9 @@ message TransactionOptions { bool return_read_timestamp = 6; } - // `IsolationLevel` is used when setting `isolation_level` for a transaction. + // `IsolationLevel` is used when setting the [isolation + // level](https://cloud.google.com/spanner/docs/isolation-levels) for a + // transaction. enum IsolationLevel { // Default value. // @@ -178,7 +192,7 @@ message TransactionOptions { // `SERIALIZABLE` transactions, only write-write conflicts are detected in // snapshot transactions. // - // This isolation level does not support Read-only and Partitioned DML + // This isolation level does not support read-only and partitioned DML // transactions. // // When `REPEATABLE_READ` is specified on a read-write transaction, the @@ -262,6 +276,14 @@ message Transaction { // attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] // request for this transaction. MultiplexedSessionPrecommitToken precommit_token = 3; + + // Optional. A cache update expresses a set of changes the client should + // incorporate into its location cache. The client should discard the changes + // if they are older than the data it already has. This data can be obtained + // in response to requests that included a `RoutingHint` field, but may also + // be obtained by explicit location-fetching RPCs which may be added in the + // future. + CacheUpdate cache_update = 5 [(google.api.field_behavior) = OPTIONAL]; } // This message is used to select the transaction in which a diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto index 3e01729fcb1..e3e85a770af 100644 --- a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto +++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/type.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index e18079d9abd..cbe88a08fec 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -23,8 +23,8 @@ 1.8 UTF-8 0.31.1 - 2.76.0 - 3.77.0 + 2.84.0 + 3.85.0 @@ -33,7 +33,7 @@ com.google.cloud google-cloud-spanner - 6.102.0 + 6.112.0 @@ -145,7 +145,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.4 + 3.5.5 10 false diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 6bd5be5f7a7..b991052f679 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -23,8 +23,8 @@ 1.8 UTF-8 0.31.1 - 2.76.0 - 3.77.0 + 2.84.0 + 3.85.0 @@ -32,7 +32,7 @@ com.google.cloud google-cloud-spanner - 6.102.1 + 6.113.1-SNAPSHOT @@ -144,7 +144,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.4 + 3.5.5 10 false diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 0a89a74a885..5891a36b359 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -34,7 +34,7 @@ com.google.cloud libraries-bom - 26.70.0 + 26.78.0 pom import @@ -126,7 +126,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.4 + 3.5.5 10 false @@ -155,7 +155,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.4 + 3.5.5 10 false diff --git a/samples/snippets/src/main/java/com/example/spanner/IsolationLevelAndReadLockModeSample.java b/samples/snippets/src/main/java/com/example/spanner/IsolationLevelAndReadLockModeSample.java new file mode 100644 index 00000000000..ca2e1a9d751 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/spanner/IsolationLevelAndReadLockModeSample.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.spanner; + +import com.google.cloud.spanner.DatabaseClient; +import com.google.cloud.spanner.DatabaseId; +import com.google.cloud.spanner.Options; +import com.google.cloud.spanner.ResultSet; +import com.google.cloud.spanner.Spanner; +import com.google.cloud.spanner.SpannerOptions; +import com.google.cloud.spanner.SpannerOptions.Builder.DefaultReadWriteTransactionOptions; +import com.google.cloud.spanner.Statement; +import com.google.spanner.v1.TransactionOptions.IsolationLevel; +import com.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode; + +public class IsolationLevelAndReadLockModeSample { + + // [START spanner_isolation_level] + static void isolationLevelSetting(DatabaseId db) { + // The isolation level specified at the client-level will be applied to all + // RW transactions. + DefaultReadWriteTransactionOptions transactionOptions = + DefaultReadWriteTransactionOptions.newBuilder() + .setIsolationLevel(IsolationLevel.SERIALIZABLE) + .build(); + SpannerOptions options = + SpannerOptions.newBuilder() + .setDefaultTransactionOptions(transactionOptions) + .build(); + Spanner spanner = options.getService(); + DatabaseClient dbClient = spanner.getDatabaseClient(db); + dbClient + // The isolation level specified at the transaction-level takes precedence + // over the isolation level configured at the client-level. + .readWriteTransaction(Options.isolationLevel(IsolationLevel.REPEATABLE_READ)) + .run(transaction -> { + // Read an AlbumTitle. + String selectSql = + "SELECT AlbumTitle from Albums WHERE SingerId = 1 and AlbumId = 1"; + String title = null; + try (ResultSet resultSet = transaction.executeQuery(Statement.of(selectSql))) { + if (resultSet.next()) { + title = resultSet.getString("AlbumTitle"); + } + } + System.out.printf("Current album title: %s\n", title); + + // Update the title. + String updateSql = + "UPDATE Albums " + + "SET AlbumTitle = 'New Album Title' " + + "WHERE SingerId = 1 and AlbumId = 1"; + long rowCount = transaction.executeUpdate(Statement.of(updateSql)); + System.out.printf("%d record updated.\n", rowCount); + return null; + }); + } + // [END spanner_isolation_level] + + // [START spanner_read_lock_mode] + static void readLockModeSetting(DatabaseId db) { + // The read lock mode specified at the client-level will be applied to all + // RW transactions. + DefaultReadWriteTransactionOptions transactionOptions = + DefaultReadWriteTransactionOptions.newBuilder() + .setReadLockMode(ReadLockMode.OPTIMISTIC) + .build(); + SpannerOptions options = + SpannerOptions.newBuilder() + .setDefaultTransactionOptions(transactionOptions) + .build(); + Spanner spanner = options.getService(); + DatabaseClient dbClient = spanner.getDatabaseClient(db); + dbClient + // The read lock mode specified at the transaction-level takes precedence + // over the read lock mode configured at the client-level. + .readWriteTransaction(Options.readLockMode(ReadLockMode.PESSIMISTIC)) + .run(transaction -> { + // Read an AlbumTitle. + String selectSql = + "SELECT AlbumTitle from Albums WHERE SingerId = 1 and AlbumId = 1"; + String title = null; + try (ResultSet resultSet = transaction.executeQuery(Statement.of(selectSql))) { + if (resultSet.next()) { + title = resultSet.getString("AlbumTitle"); + } + } + System.out.printf("Current album title: %s\n", title); + + // Update the title. + String updateSql = + "UPDATE Albums " + + "SET AlbumTitle = 'New Album Title' " + + "WHERE SingerId = 1 and AlbumId = 1"; + long rowCount = transaction.executeUpdate(Statement.of(updateSql)); + System.out.printf("%d record updated.\n", rowCount); + return null; + }); + } + // [END spanner_read_lock_mode] +} \ No newline at end of file diff --git a/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java b/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java index 575d8068cb3..a01b00c0f6c 100644 --- a/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java +++ b/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java @@ -32,7 +32,6 @@ import com.google.cloud.spanner.KeyRange; import com.google.cloud.spanner.KeySet; import com.google.cloud.spanner.Mutation; -import com.google.cloud.spanner.Options; import com.google.cloud.spanner.ReadOnlyTransaction; import com.google.cloud.spanner.ResultSet; import com.google.cloud.spanner.Spanner; @@ -40,7 +39,6 @@ import com.google.cloud.spanner.SpannerException; import com.google.cloud.spanner.SpannerExceptionFactory; import com.google.cloud.spanner.SpannerOptions; -import com.google.cloud.spanner.SpannerOptions.Builder.DefaultReadWriteTransactionOptions; import com.google.cloud.spanner.Statement; import com.google.cloud.spanner.Struct; import com.google.cloud.spanner.TimestampBound; @@ -73,7 +71,6 @@ import com.google.spanner.admin.database.v1.RestoreDatabaseRequest; import com.google.spanner.admin.database.v1.RestoreInfo; import com.google.spanner.v1.ExecuteSqlRequest.QueryOptions; -import com.google.spanner.v1.TransactionOptions.IsolationLevel; import java.math.BigDecimal; import java.time.Instant; import java.time.ZoneId; @@ -1555,47 +1552,6 @@ static void queryWithQueryOptions(DatabaseClient dbClient) { } // [END spanner_query_with_query_options] - // [START spanner_isolation_level] - static void isolationLevelSetting(DatabaseId db) { - // The isolation level specified at the client-level will be applied to all - // RW transactions. - DefaultReadWriteTransactionOptions transactionOptions = - DefaultReadWriteTransactionOptions.newBuilder() - .setIsolationLevel(IsolationLevel.SERIALIZABLE) - .build(); - SpannerOptions options = - SpannerOptions.newBuilder() - .setDefaultTransactionOptions(transactionOptions) - .build(); - Spanner spanner = options.getService(); - DatabaseClient dbClient = spanner.getDatabaseClient(db); - dbClient - // The isolation level specified at the transaction-level takes precedence - // over the isolation level configured at the client-level. - .readWriteTransaction(Options.isolationLevel(IsolationLevel.REPEATABLE_READ)) - .run(transaction -> { - // Read an AlbumTitle. - String selectSql = - "SELECT AlbumTitle from Albums WHERE SingerId = 1 and AlbumId = 1"; - ResultSet resultSet = transaction.executeQuery(Statement.of(selectSql)); - String title = null; - while (resultSet.next()) { - title = resultSet.getString("AlbumTitle"); - } - System.out.printf("Current album title: %s\n", title); - - // Update the title. - String updateSql = - "UPDATE Albums " - + "SET AlbumTitle = 'New Album Title' " - + "WHERE SingerId = 1 and AlbumId = 1"; - long rowCount = transaction.executeUpdate(Statement.of(updateSql)); - System.out.printf("%d record updated.\n", rowCount); - return null; - }); - } - // [END spanner_isolation_level] - // [START spanner_create_backup] static void createBackup(DatabaseAdminClient dbAdminClient, String projectId, String instanceId, String databaseId, String backupId, Timestamp versionTime) { @@ -2152,9 +2108,6 @@ static void run( case "querywithqueryoptions": queryWithQueryOptions(dbClient); break; - case "isolationlevelsettings": - isolationLevelSetting(database); - break; case "createbackup": createBackup(dbAdminClient, database.getInstanceId().getProject(), database.getInstanceId().getInstance(), database.getDatabase(), @@ -2265,7 +2218,6 @@ static void printUsageAndExit() { System.err.println(" SpannerExample querywithtimestampparameter my-instance example-db"); System.err.println(" SpannerExample clientwithqueryoptions my-instance example-db"); System.err.println(" SpannerExample querywithqueryoptions my-instance example-db"); - System.err.println(" SpannerExample isolationlevelsettings my-instance example-db"); System.err.println(" SpannerExample createbackup my-instance example-db"); System.err.println(" SpannerExample listbackups my-instance example-db"); System.err.println(" SpannerExample listbackupoperations my-instance example-db backup-id"); diff --git a/versions.txt b/versions.txt index c0f13b84f99..975d46f0cc4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,13 +1,13 @@ # Format: # module:released-version:current-version -proto-google-cloud-spanner-admin-instance-v1:6.102.1:6.102.1 -proto-google-cloud-spanner-v1:6.102.1:6.102.1 -proto-google-cloud-spanner-admin-database-v1:6.102.1:6.102.1 -grpc-google-cloud-spanner-v1:6.102.1:6.102.1 -grpc-google-cloud-spanner-admin-instance-v1:6.102.1:6.102.1 -grpc-google-cloud-spanner-admin-database-v1:6.102.1:6.102.1 -google-cloud-spanner:6.102.1:6.102.1 -google-cloud-spanner-executor:6.102.1:6.102.1 -proto-google-cloud-spanner-executor-v1:6.102.1:6.102.1 -grpc-google-cloud-spanner-executor-v1:6.102.1:6.102.1 +proto-google-cloud-spanner-admin-instance-v1:6.113.0:6.113.1-SNAPSHOT +proto-google-cloud-spanner-v1:6.113.0:6.113.1-SNAPSHOT +proto-google-cloud-spanner-admin-database-v1:6.113.0:6.113.1-SNAPSHOT +grpc-google-cloud-spanner-v1:6.113.0:6.113.1-SNAPSHOT +grpc-google-cloud-spanner-admin-instance-v1:6.113.0:6.113.1-SNAPSHOT +grpc-google-cloud-spanner-admin-database-v1:6.113.0:6.113.1-SNAPSHOT +google-cloud-spanner:6.113.0:6.113.1-SNAPSHOT +google-cloud-spanner-executor:6.113.0:6.113.1-SNAPSHOT +proto-google-cloud-spanner-executor-v1:6.113.0:6.113.1-SNAPSHOT +grpc-google-cloud-spanner-executor-v1:6.113.0:6.113.1-SNAPSHOT